Maker Pro
Maker Pro

LED monitor using phototransistor

Hi all,
I have a requirement to monitor a LED using a photo transistor.
The LED is powered from a 3V3 supply via a resistor, the cathode if the LED is going to a I/O line of a micro. So a logic 1 keeps the LED off and a logic 0 lights the LED. If I use a phototransistor, do I need to match the peak wavelength of the LED and phototransistor?
Also I need a logic 0 to represent on I.e. logic 1. This will be fed into a A/D of a micro.
Best regards,
Raj
 
Last edited by a moderator:
If its a Red, Green, Yellow or Blue LED, you will need a Visible Light Photo transistor.
But these also Detect Ambient Light, so that can be a problem, unless shielded from outside light sources.

Or use an Ultra Violet LED and Photo transistor.
 

hevans1944

Hop - AC8NS
Do you wish to determine whether the LED is illuminated or not illuminated? In other words, whether the LED is defective? What is the color of the LED? How much current flows through it from the 3.3 V DC source when the microprocessor output is low? How do you plan to couple the LED light output to the photo transistor without obstructing the view of the LED? If it is not necessary to view the LED light output, why do you need to use an LED? And no, most photo transistors have a rather broad spectral response in visible wavelengths and do not need matching to the peak wavelength emitted by any LED from near-infrared to blue. An ultraviolet LED may need a special photo transistor. So, please tell us what you are trying to DO.
 
Hi,
The LED will need to be monitored as part of tests, that could be 24-72 hours long, we are checking when it illuminates. So hence need to be an automated system. The LED(s) is red, current is 15mA. I intend to build a small PCB which will have the phototransistor circuitry on, this will then be placed next to the LED. There is luckily enough space beside the LED.
Best regards,
Raj
 
When I Said:Or use an Ultra Violet LED and Photo transistor.
I Also ment a Ultra Violet Photo transistor.
Most Photo Transistors now are designed for Ultra Violet.

This will give the best sensitivity and little effects from natural light.
 

hevans1944

Hop - AC8NS
I would try to use a short piece of transparent tubing (Tygon or similar) that will fit over the LED and contain on the other end the photo transistor, connected to your PCB with a length of twisted-pair wire. If you have a problem with stray light, paint the tubing black and depend on your external circuit to determine when the test LED is on or off. You should 'echo' that test LED status (on or off) with an LED on your PCB instrumentation board, which presumably communicates with some sort of data acquisition system..
 
Hi,
thanks for your help so far. much appreciared.
i am not 100% sure on the uv and visible light scenario, but the led is red and the other is green. could i not use
a uv phototransistor with these? what would happen if i did?
i am looking to power the led via 3v3 supply and resistor. the phototransistor base close to the led via a tube, the collector to 3v3 and a resisor from emitter to ground. The output to be taken from the emitter / resistor junction to an A/D of a microcontroller.
Best regards,
Raj
 

hevans1944

Hop - AC8NS
A uv phototransistor may require uv light to operate, depending on what coating (if any) is on the phototransistor entrance aperture. I wouldn't bother going there. Just get a pair of inexpensive visible-light, garden variety, vanilla, phototransistors. Anything you can find online is probably going to work if the physical size matches up with the existing LED you want to test.

If you are using a phototransistor with access to the base, you can operate this as an ordinary photo-voltaic diode by tying the base and emitter together and measuring the voltage generated between the collector and the base/emitter. It will be somewhere close to zero when the LED is off and about 0.7 V DC when the LED is on. Any ordinary phototransistor should work for sensing either the red or green LED illumination over a short, closely-coupled distance. If you have a two-lead phototransistor, such as this one, you can do as you said: put +3.3 V DC on the collector, a 10 kΩ resistor from emitter to common, and measure the output across the resistor with the ADC in a microcontroller. Adjust the value of the resistor upward or downward to increase or decrease the sensitivity. You should be able to breadboard this with a pair of red and green LEDs, three resistors, a phototransistor, a 3.3 V lithium-ion battery or two series-connected alkaline AA cells (3 V), and a multimeter to verify that it works. Total cost to buy parts should be less than $2.00. This is NOT rocket science, but if you want to make it so there are plenty of articles on the Internet to look at.
 
Last edited:
Response_silicon_photodiode.svg

PD's are broad spectrum unless they are for IR with dyalight blocking black lens.
The below link shows the common emitter cct which inverts voltage by current amplification.

Photons of LED light should saturate the collecter R of 10k for a logic 1 with the absence of light being pulled up by the Rc and may also be triggered by ceiling lights if aimed up.

If the ambient light is too strong , a shroud can block ambient light and/or you can lower the collector R to say raise the threshold for detection. Let's say a photo transistor has hFE of 50 and 10k Rc, the with 5V logic needs almost 500uA of current for an output of logic "0" or an input of 10uA or 20uW of optical power to turn on which should be doable for a tiny 50mW LED.

PD's in in 5mm size are usually 0.5mA/mW of light. If this is not sensitive enough Rc can be increase to say 100k or lowered to 10k and try again. Since the gap loss is inverse squared, gap length is another factor

https://www.fairchildsemi.com/application-notes/AN/AN-3005.pdf
 

hevans1944

Hop - AC8NS
And if your project is really strapped for cash, you can pair the red LED with another red LED and use that LED as a photodiode. Do the same with the green LED: pair it with another green LED and use that LED as a photodiode. Using an LED as a photodiode isn't very efficient, but it does work. See the links on this Google page.

Hey! Maybe this is approaching rocket science in complexity! Still, lots of fun without (much) risk of an explosion in the lab. Supervisors hate when that happens. Don't ask me how I know.
 
Top