Does anyone have experience driving either an analog or digital PIC input with a phototransistor?
I'm wondering whether I'll need to add an amplifier stage, either a transistor or an op amp.
Does anyone have experience driving either an analog or digital PIC input with a phototransistor?
I'm wondering whether I'll need to add an amplifier stage, either a transistor or an op amp.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
I have used them for digital with out an amp.
Anode at 5VDC
Cathode to PIC pin with a 10 meg pull up resistor.
Have not used one for analog though.
Dave
Always wear safety glasses while programming.
Lately I have used the TSL250R for analog reading. It works pretty well.
http://www.taosinc.com/productdetail.aspx?product=63
Al.
All progress began with an idea
Last time I investigated photo transistors, I found that they (at least the ones I acquired) had a very sharp change in status (off - on.) Not good for controling on at dark lights, as adjustment for desired light level next to impossible using the usual adjustment to the other comparator input. I did not try adjusting the bias, which might have worked?
They would have worked great to pull a PIC pin low.
Well, the typical phototransistor has two modes, kind of like most garden-variety transistors: Switch mode and active mode. Switch mode is easy to work with, but active mode means you are dealing with current that ranges over four or five orders of magnitude, from a few microamps to milliamps or even tens of milliamps.
Driving a digital input in switch mode is no problem; it's just like saturating a transistor. Active mode, especially in low light levels, requires some massaging--playing with the emitter resistor (in a common collector configuration), then amplifying.
What I was trying to do was end up with a light sensor that gave me two things at the same time, an analog signal (intensity/signal strength) and a digital signal (is light present, yes or no, regardless of intensity).
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
Use it in active mode with an emitter resister and feed a ADC. ?
What PIC are you using? does it have an ADC?
Bookmarks