Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
projekte:epson-stylus-sx100 [2016-06-04 18:21] – [Operation] crackiprojekte:epson-stylus-sx100 [2017-01-17 01:01] (current) – external edit 127.0.0.1
Line 7: Line 7:
 Uebrig sind: Uebrig sind:
  
-  * Contact Image Sensor mit LEDs+  * [[projekte:contact_image_sensor|Contact Image Sensor]] mit LEDs
   * Schrittmotor (96 Schritte, 18 Ohm, ~0.2-0.3 Ampere)   * Schrittmotor (96 Schritte, 18 Ohm, ~0.2-0.3 Ampere)
   * zwei DC Motoren, vmtl brushed   * zwei DC Motoren, vmtl brushed
Line 16: Line 16:
  
 Beschriftungen: FC11B913F56 F KTH0351-2 Beschriftungen: FC11B913F56 F KTH0351-2
 +
 +Numerierung:
 +  * Rohm: Pin 1 aussen.
 +  * PCB: Pin 1 innen <- die nehmen wir
 +
 +==== Beleuchtung ====
  
 Die LEDs brauchen so 2-3 Volt, Strom ~20 mA bringt schon Licht. Die LEDs brauchen so 2-3 Volt, Strom ~20 mA bringt schon Licht.
Line 21: Line 27:
 die TO Pins am PCB sind: V+, Blau, Rot, Gruen. die TO Pins am PCB sind: V+, Blau, Rot, Gruen.
  
-Numerierung: +Bei 5V Versorgung sollte mit folgenden Widerständen nach Erde gezogen werden fuer weisses PapierRot:50, Grün:50, Blau:220.
-  * RohmPin 1 aussen. +
-  * PCBPin 1 innen <- die nehmen wir+
  
 <pagebreak> <pagebreak>
Line 33: Line 37:
 |     4 |    |    |    |  x |    | LED GND Blau | |     4 |    |    |    |  x |    | LED GND Blau |
 |     5 |    |  R |  G |  B |  x | LED + | |     5 |    |  R |  G |  B |  x | LED + |
 +
 +==== Datensignale ====
  
 Spannung 1 mA: Spannung 1 mA:
Line 43: Line 49:
 |    11 | <typo bg:#bdb2ff>1.85</typo> | <typo bg:#ffe0b2>0.61</typo> | <typo bg:#bdb2ff>1.85</typo> | <typo bg:#b2f1ff>1.51</typo> | <typo bg:#bdb2ff>1.85</typo> |    x | <typo bg:#bdb2ff>1.85</typo> | 1    | dünn               | 300/600 dpi | unter der Mittleren Flaeche, ueber #12 | |    11 | <typo bg:#bdb2ff>1.85</typo> | <typo bg:#ffe0b2>0.61</typo> | <typo bg:#bdb2ff>1.85</typo> | <typo bg:#b2f1ff>1.51</typo> | <typo bg:#bdb2ff>1.85</typo> |    x | <typo bg:#bdb2ff>1.85</typo> | 1    | dünn               | 300/600 dpi | unter der Mittleren Flaeche, ueber #12 |
 |    12 | <typo bg:#bbb2ff>1.84</typo> | <typo bg:#ffe0b2>0.61</typo> | <typo bg:#bbb2ff>1.84</typo> | <typo bg:#b2f4ff>1.50</typo> | <typo bg:#b9b2ff>1.83</typo> | <typo bg:#bbb2ff>1.84</typo> |    x | 1    | dünn               | Aout       | ueber der unteren Flaeche, unter #11 | |    12 | <typo bg:#bbb2ff>1.84</typo> | <typo bg:#ffe0b2>0.61</typo> | <typo bg:#bbb2ff>1.84</typo> | <typo bg:#b2f4ff>1.50</typo> | <typo bg:#b9b2ff>1.83</typo> | <typo bg:#bbb2ff>1.84</typo> |    x | 1    | dünn               | Aout       | ueber der unteren Flaeche, unter #11 |
 +
 +==== Insgesamt ====
  
 sieht verdammt nach [[http://rohmfs.rohm.com/en/products/databook/datasheet/module/contact_image_sensor/flatbed/lsh3008-ca10a.pdf]] aus sieht verdammt nach [[http://rohmfs.rohm.com/en/products/databook/datasheet/module/contact_image_sensor/flatbed/lsh3008-ca10a.pdf]] aus
Line 91: Line 99:
  
 bool dpimode = 1; bool dpimode = 1;
-uint16_t pixels = dpimode ? 5268 2634;+uint16_t pixels = dpimode ? 5184 2592; 
 + 
 +uint32_t linetime = 20000; // us 
 +uint32_t sched = 0;
  
 void setup() { void setup() {
Line 99: Line 110:
  
   digitalWrite(DPIMODE, dpimode);   digitalWrite(DPIMODE, dpimode);
-} 
  
-uint16_t linetime 10000// us +  sched micros()
-uint32_t sched = 0;+}
  
 void loop() { void loop() {
Line 110: Line 120:
   digitalWrite(START, LOW);   digitalWrite(START, LOW);
  
-  for (uint16_t counter = 0; counter < pixels; counter += 1)+  for (uint16_t counter = 0; counter < 82 + pixels; counter += 1)
   {   {
     PORTD |= _BV(PORTD3);     PORTD |= _BV(PORTD3);
Line 119: Line 129:
  
   sched += linetime;   sched += linetime;
-  int16_t dt = sched - micros();+  int32_t dt = sched - micros(); 
 +  while (dt > 0x4000) 
 +  { 
 +    delayMicroseconds(0x4000); 
 +    dt -= 0x4000; 
 +  }
   if (dt > 0)   if (dt > 0)
     delayMicroseconds(dt);     delayMicroseconds(dt);
Navigation



You are not allowed to add pages