Photodiodes are the devil. Simple photodiode -> LED circuit

Thread Starter

sirchuck

Joined Feb 14, 2016
150
I just purchased these photodiodes from amazon http://www.amazon.com/gp/product/B00NQ6RF8U?psc=1&redirect=true&ref_=oh_aui_detailpage_o02_s01

I built the circuit in the image, and my LED stays lit, even when I completely cover the photodiode. My impression was when the photodiode sees light, it will allow current to pass and light the LED, but when it's dark, the current will stop and the LED will shut off.

After searching the forums I found loads of photodiode questions, but none that could help me understand this expectedly simplistic circuit.
photodiodeCircuit.png
Any help would be appreciated. :)
 

Hypatia's Protege

Joined Mar 1, 2015
3,228
I just purchased these photodiodes from amazon http://www.amazon.com/gp/product/B00NQ6RF8U?psc=1&redirect=true&ref_=oh_aui_detailpage_o02_s01

I built the circuit in the image, and my LED stays lit, even when I completely cover the photodiode. My impression was when the photodiode sees light, it will allow current to pass and light the LED, but when it's dark, the current will stop and the LED will shut off.

After searching the forums I found loads of photodiode questions, but none that could help me understand this expectedly simplistic circuit.
View attachment 100687
What are you trying to do???:confused: At best, reverse conduction of the diode will cut the transistor off....
 

Thread Starter

sirchuck

Joined Feb 14, 2016
150
What are you trying to do???:confused: At best, reverse conduction of the diode will cut the transistor off....
I was trying to make a circuit that lights up an LED and turns it off depending on if light hits the photodiode. I thought it should be a simple circuit, but I guess it's not possible. A phototransitor works of course, but I was hoping a photodiode would work the same way seeing as I have 100 of them.

I thought if there is no light, the photodiode wouldn't send any current, and therefor I could get it to work like a light based switch.
 

Hypatia's Protege

Joined Mar 1, 2015
3,228
I was trying to make a circuit that lights up an LED and turns it off depending on if light hits the photodiode. I thought it should be a simple circuit, but I guess it's not possible. A phototransitor works of course, but I was hoping a photodiode would work the same way seeing as I have 100 of them.

I thought if there is no light, the photodiode wouldn't send any current, and therefor I could get it to work like a light based switch.
Photo-diodes exhibit varying degrees of reverse conduction in well-neigh direct proportion to varying levels of illumination -- the circuit attached to your OP 'inverts' said function and (depending upon the specific diode, BJT and applied EMF{s}) probably offers insufficient gain for your application... FYI - The advantage of photo-diodes is, principally, that of 'speed' -- whereas photo-transistors are markedly more 'sensitive' but s-l-o-w...

Best regards and good luck!:)
HP
 
Last edited:

Thread Starter

sirchuck

Joined Feb 14, 2016
150
Hi, Try this one-
That looked so promising, the way you drew the circuit really made me think I understood why it would work that way. Alas, the LED stays lit regardless of the amount of light hitting the photodiode :(

I added a resister between the photodiode and the positive lead, as my 5v DC blew up the first photodiode. :) Before it blew up though I got the same results. The LED stayed lit at consistent brightness regardless of how dark or bright I made the photodiode.

I know photodiodes are usually used with some sort of amplifier. I wonder if maybe the 5vdc is just too much power and it just jumps over the diode as if it's not there. I ordered a 3v regulator, I'll test with that when I get it.


Hypatia's Protege: I'm just an after-hour hobbiest, from what I gather you were talking about some sort of dragon and leprechaun sacred dance correct? In my reading I did understand photodiodes were faster, but it kinda seemed to me that I could make it work as a switch based on the amount of light, slowly switching the LED off as the light fades.

By "reverse conduction" do you mean that the 5vdc flows one way through the diode when dark, but the more light that the photodiode receives the more flow it creates in the opposite direction of the power source, making it harder and harder to push the 5vdc through the photodiode?
 

crutschow

Joined Mar 14, 2008
34,281
With your first circuit, the transistor is on and the LED lights, when the photodiode is not conducting.
If the photodiode is illuminated sufficiently to conduct all the current through the 100k resistor, then the LED will turn off.
If you need more sensitivity then add another transistor to make a Darlington stage and increase the size of the resistor (say to 1 megohm or more).
 

tcmtech

Joined Nov 4, 2013
2,867
You are likely simply be over driving the photodiode with the 100K resistor.

Try the circuit with mega ohm and higher resistances and see what you get.

Also try putting the 1K resistor on the transistor's emitter end between it and the ground point so that when the photodiode conducts it pulls the transistors base down below its emitter voltage a bit forcing it into full turn off.
 
By "reverse conduction" do you mean that the 5vdc flows one way through the diode when dark, but the more light that the photodiode receives the more flow it creates in the opposite direction of the power source, making it harder and harder to push the 5vdc through the photodiode?
I mean merely that, over the diode's dynamic range, reverse conduction increases with luminous intensity...

Note: "Reverse conduction" refers to conduction under the condition that Cathode EMF > Anode EMF (i.e. conduction under reverse bias sans breakdown).

For practical circuit suggestions please see posts #9 and #10

Best regards
HP:)
 
Last edited:

Thread Starter

sirchuck

Joined Feb 14, 2016
150
(say to 1 megohm o
Thanks for the new circuit ideas. First I tried with the 1m resistor and a 1k resistor on the emitter. Still the LED remained constant. I then added a second transistor, still the LED remained constant. Putting the LED on the emitter or collector of the second transmitter was dim but consistent. I used the 1k resistor on the emitter for both tests.

I'll keep playing around with your idea's but so far the LED doesn't even flicker one way or another. So weird. Have any of you built a circuit like this before that worked as expected?

Some things I'll try, I'll post if I ever find a solution in case anyone else ever wants to build the circuit with a photodiode for fun:
1) Replace all parts in case broken - I have extras
2) Add another transistor, then a fourth transistor if that doesn't work.
3) Use two 1m resistors instead of one.
4) Use a 3v regulator when it arrives.

Photodiodes are where makers dreams go to die. My Circuit:
PhotoDiode2.png
 

tcmtech

Joined Nov 4, 2013
2,867
Could you do a voltage measurement across your photodiode while it's in series with the 1 meg resistor( transistor disconnected) and give us the light and dark voltage readings across it?

From there the correct value for the pull up resistor can be calculated. I have suspicion that your photodiodes have very low current handling abilities and the pull up resistor may need to be in the multi to tens of megaohms range to work sufficiently in a simple circuit like this.
 

Thread Starter

sirchuck

Joined Feb 14, 2016
150
Could you do a voltage measurement across your photodiode while it's in series with the 1 meg resistor( transistor disconnected) and give us the light and dark voltage readings across it?

From there the correct value for the pull up resistor can be calculated. I have suspicion that your photodiodes have very low current handling abilities and the pull up resistor may need to be in the multi to tens of megaohms range to work sufficiently in a simple circuit like this.
Ah, good diagnostic question. I should have started there myself. I'm getting 0.42v using a 10m pull-up resistor. My 1m resistor got lost in the pile :D Do you need me to use a 1m for the calculation or just divide by 10?

0.42v light or dark, consistent, which makes me think you are on the right path of adding more resistance.

Thanks for the schematic Bordodynov, that circuit with my parts keeps a consistently lit LED in light or dark environments. :(

I really hope TCMTECH's calculation can solve this problem, I'd like to share the completed circuit with some other forums if we get it to work. It's surprising to me how difficult this circuit is, I guess it's because any sane person would just use a photo transistor instead and be done. I'd give up myself, but now i'm just curious. Bordodynov's circuit has the correct logic in my mind, hopefully it's just a matter of the correct resistance for my specific part.

Lesson: Don't buy parts without a datasheet unless you know the proper calculations.
 
I'm getting 0.42v using a 10m pull-up resistor.
---Assuming you mean 10MΩ (i.e. [10^7]Ω)---
Are you certain the diode is not under forward bias? 420mV is likely a 'ball park' Vf under such light load...

Please try reversing the diode vs. PSU polarity then re-running the test...:cool:

Best regards
HP
 
Last edited:

Thread Starter

sirchuck

Joined Feb 14, 2016
150
---Assuming you mean 10MΩ (i.e. [10^7]Ω)---
Are you certain the diode is not under forward bias? 420mV is likely a 'ball park' Vf under such light load...

Please try reversing the diode vs. PSU polarity then re-running the test...:cool:

Best regards
HP
I did flip the positive lead on the photodiode away from the 10M resistor and it works. Initially like you said I had the positive lead on the positive side of the circuit. I might have caught this sooner as I tried changing the position a few times, but the sensitivity was smaller than I thought. I have a bright little white LED bike light that I shine on the photodiode, but I just found out that unless the white LED is directly pointed at the photodiode it wont even see the light. ( at least not enough to do its job )

So yes, flipping the + and - side of the photodiode in the circuit along with accounting for how much light you need for a reaction, the circuit now works. :) In direct light the LED goes out, and in non-direct light / dark the LED lights up.

Thanks for your help everyone, hopefully someone else will also be helped by your efforts.
 

Thread Starter

sirchuck

Joined Feb 14, 2016
150
I just tested three 10MΩ resistors on it now ( 30MΩ ). In dark it shows -0.18v and when I use the bike light I get around 0.05v.

The LED is pretty dim, and now I think I understand why someone would use the Darlington stage transistors heh.

10MΩ seems to be a good resistance for the circuit, with the Darlington I should be able to make the LED brighter on the other end, if I understand it right.

Thanks again for everyone's time, there wasn't much about a simple circuit like this on the net.
 
Top