

Usually, they have two pins, emitter and collector. How is the 150ohm resistor from vcc a pullup resistor and not just limiting current to the phototransistor?ĭo you know anything at all about phototransistors?įor one thing, they don't have Vcc, GND and OUT pins as you've labelled them. *I'm new to all this and think that is the proper term for what is going on Should I have things hooked up differently? I am using the code on this page to test the setup for now KISS. I was using another LED on the ouput of the IR detector (no 47k) to try to figure out the proper pinout of the phototransistor and accidentally figured out that the LED flashed signifigantly brighter with gnd tied to vcc.

I have the collector current limited with a 150 ohm resistor and tied to ground with another 150ohm resistor, and the signal pin pulled high* with a 47k to the nano (because that's what I had lying around). I came to the arrangement in the picture by accident. I had found several web pages that said you can hook up only the collector and emitter to generate a pulse when IR is detected, but couldn't get that to work. I have it set up and working on a breadboard, but I don't understand why the electrical connections on the IR phototransistor are working.

I'm trying to build an optical tachometer with a nano and IR components salvaged from an old ps2 ball mouse.
