- I used this zd1901 photo interrupter from JayCar (datasheet).
- I copied the schematic from this post which had a 10k resistor between the + anode (long wires) and a 230 ohm resistor between the two short (- cathode) wires. That design was based on this RPI-574 datasheet .
- Since I didn’t have a 230 ohm resistor I used a 100 (which measured at 180 on my multimeter) in series with a 103 10k potentiometer that I tried to dial in 230 ohm total.
- All was going well until I figured a lower than 230 ohm resistor would be interesting to try, only I managed to provide a path of 0 ohm resistance for long enough to fry my IR led.
Which resulted in:
- A kinda / sorta working output voltage in the range 4.7 – 5 volts. Ranged from the high 900’s to 1023 on arduino analog input A0 by moving a piece of paper between the gap.
- A failed attempt to use a variable resistor to drive the analog values from close to 0 up to 1023 so I could use it as a digital input to my arduino.
- A short across what should have been a 230 ohm resistor resulting in a loud pop, smoke and a nasty smell!!!
Note to self: