Forum Index > Projects > Other projects
 Dark detector with white LED
 |  Printable Version
By: Windell (offline) on Tuesday, April 29 2008 @ 10:11 PM PDT (Read 19488 times)  
Windell

Here's a question that I got by E-mail from Jennifer:

Hello Evil Mad Scientist -

I absolutely LOVE your site and all of your projects. I'm in the middle of building your dark-detecting
led and got it working nicely. Great instructions! I'd like to mod it a bit and I'm new to electronics so I
was hoping that you could help me figure out what I need to get the modified circuit working
properly. I'm planning on using the following superbright led:
http://superbrightleds.com/specs/W15120_specs.htm and I've got a 3.6V power supply. I'm having
trouble figuring out the correct resistor value that will work with the rest of the components. When I
test it, the led is either extremely bright and doesn't dim with lower resistor values even when I
hover the circuit over a lamp. Or the led is very dull with higher resistor values even if I'm in a pitch-
black room. I can't seem to get the resistor value correct. Any advice?

Thank you in advance for your help!
Jennifer



And, here's my response:

Hi Jennifer,
A typical white LED like yours takes roughly 3.6 V to turn on fully. That's called the Forward Voltage ( "Vf" ), and is one of the items listed on that list of specs.

Back up a moment. On the red version (with the 3 V battery), the forward voltage of that LED is around 2 V. The transistor also has a forward voltage of about 0.5 V. When we put 2.5 V to the base of the transistor, current can flow from the base of the transistor to the emitter (0.5 V) and then flows through the diode (2 V). What we do then, is to use the phototransistor to control whether or not the base gets as high as 2.5 V. When the phototransistor senses light and turns on, current flowing through the resistor pulls the base of the transistor down to about 1.5 V-- too low for the LED to stay on.

Now to recap: this all works because the base of the transistor can be moved above and below a voltage of about (0.5 V + Vf). In your case, with the white LED, using this circuit design means that you really need to be able to move that transistor base to a voltage of about 3.6+0.5V = 4.1 V, which isn't really gonna work with your 3.6 V battery. As you have already discovered, all that you can do by changing the resistor is to choke the LED to not work at all or (with a low resistor value) make it so that the transistor base goes to 3.6 V, turning on the LED mostly, but not fully-- and with no sensitivity to darkness.

It gets worse. I don't know what kind of 3.6 V power supply you've got, but our example was using a small lithium battery, which has a whole lot of internal resistance that prevents the battery from blowing up the LED when the transistor turns on all the way. If you are using something else-- like a plug-in power supply or even alkaline batteries, there's very little to limit the current through the LED to safe levels. You'll need to add a current-limiting resistor to keep things safe. The resistor *replaces* the wire segment that goes between the top of the resistor and the top of the transistor. The value for the limiting resistor should be R (in ohms) = (Vbattery-Vf)/(0.025 A), to limit the current through the LED to a safe 25 mA.

For example, this circuit could work well with a white LED and a 4.5 V alkaline battery (e.g., 3 AAA's in series). The current-limiting resistor value in that case would be (4.5-3.6)/.025 = 36 ohms or more; so a common 39 ohm resistor would be perfect.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: gleasone (offline) on Friday, March 11 2011 @ 02:21 PM PST  
gleasone

Hello,
I'm new to the site and to the forum, so please be gentle.... Confused When you say "replace the wire segment on top of the transistor to the top of the resistor", where exactly are you placing the current limiting resistor? Referencing the hand drawn schematic for the dark detecting LED, I'm not sure where to place the current limiting resistor to use a white LED.

I would really appreciate any help with this, or even another schematic drawn with the current limiting resistor added, would be awesome!!!

Thanks for the help!!


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: Windell (offline) on Sunday, March 13 2011 @ 10:33 PM PDT  
Windell

When you say "replace the wire segment on top of the transistor to the top of the resistor", where exactly are you placing the current limiting resistor? Referencing the hand drawn schematic for the dark detecting LED, I'm not sure where to place the current limiting resistor to use a white LED.



What I actually said is "the resistor *replaces* the wire segment that goes between the top of the resistor and the top of the transistor."

First, learn to identify the components on the diagram. There is only one transistor, and only one resistor. Second, don't turn the diagram upside down, so you understand what the "tops" are. There is a stretch of wire that goes between the top of the transistor and the top of the transistor. The resistor goes THERE, where that stretch of wire is.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: gleasone (offline) on Monday, March 14 2011 @ 02:03 PM PDT  
gleasone

Ok, I'm sorry for asking! I just didn't understand what you were meaning by the "top". I do understand the components on the diagram. I didn't mean to piss you off, just didn't understand what you were meaning - my fault.

sorry...


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: Windell (offline) on Tuesday, March 15 2011 @ 04:28 AM PDT  
Windell

No need to be so offended, I'm just trying to answer your question.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: gleasone (offline) on Tuesday, March 15 2011 @ 01:53 PM PDT  
gleasone

I apologize for the attitude...

So, the current limiting resistor would "limit current" coming from the phototransistor, going to the "regular" transistor, correct? Collector of the phototransistor, to the collector of the regular transistor?


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: gleasone (offline) on Tuesday, March 15 2011 @ 06:19 PM PDT  
gleasone

Does the current limiting resistor go in between the 1k resistor and the collector on the 2N3904 transistor? Eek!


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: Windell (offline) on Wednesday, March 16 2011 @ 11:52 AM PDT  
Windell

So, the current limiting resistor would "limit current" coming from the phototransistor, going to the "regular" transistor, correct?


Not really. The phototransistor current is already pretty small, nothing to worry about there.

Collector of the phototransistor, to the collector of the regular transistor?

I'm not sure what you're asking. There's already a resistor in that location, you don't need to add anything there.


Does the current limiting resistor go in between the 1k resistor and the collector on the 2N3904 transistor?


Yes, and I think that I've indicated that several times now.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Windell (offline) on Wednesday, March 16 2011 @ 11:57 AM PDT  
Windell

Does the current limiting resistor go in between the 1k resistor and the collector on the 2N3904 transistor?

Also, you can't just *add* a resistor there. You have to replace the wire. If you leave the wire and add the resistor next to the wire, the resistor won't do anything.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: gleasone (offline) on Wednesday, March 16 2011 @ 02:03 PM PDT  
gleasone

I realize you have to replace the wire with the resistor.... I know you're probably getting frustrated with me, but I originally did not understand what you meant by top of the resistor and transistor in your prior posts. Now that I understand where the current limiting resistor goes, it would be at the "top" of the diagram, between the 1k and the transistor.

I appreciate all your help with this and I'm sorry that you had to get so in depth explaining it to me.

If you don't mind answering more questions, I have a couple more to ask you about the phototransistor. It has to do with the overall project I am working on. Probably need your opinion more that answering questions. Would that be ok?

Thanks for your help!


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: Windell (offline) on Thursday, March 17 2011 @ 06:10 PM PDT  
Windell

> Would that be ok?

So... your question is... "can I ask more questions?" Doesn't seem like a very efficient use of time.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: squall_line (offline) on Friday, March 18 2011 @ 06:34 AM PDT  
squall_line

Actually, I believe the question was, "I will need your opinion, rather than fact-based answers about something. Is that okay to ask, or is this forum for technical support only?"


Forum Mad Scientist
Mad Scientist

Status: offline

Registered: 04/13/10
Posts: 96
Iowa, USA

Profile Email    
   
By: gleasone (offline) on Friday, March 18 2011 @ 02:56 PM PDT  
gleasone

Well, I hope Windell's "opinion" is fact... Wink

Ok, here's my question/opinion needed.....

I am building a spybot using the Lego Mindstorms NXT. The spybot is going to be equipped with a 2.4ghz mini wireless camera. I found some instructions on how to build a light (headlight) for my spybot (using a white led and a few Lego pieces). I can get 4.3v from any of the sensor or motor outputs on the brain. I am using the 4.3v to power a single (maybe double) white LED for my headlight. The 4.3v coming from the Mindstorm brain is "hot" as soon as the brain is turned on. Obviously, I want the headlight on my spybot to light up areas in my house that aren't well lit - as I go from room to room with it. Now, we're talking about normal house lighting like lamps, ceiling lights, etc. I was looking at your diagram for the dark detector, and wanted to incorporate it with my white led so the headlight would switch on or off, depending on the lighting conditions.

Here's where your opinion is needed (ok, maybe a question answered).

Will the phototransistor you used in the dark detector project work like I am wanting it to do (as described in the above paragraph)? If not, what would you recommend or what's your "opinion" on it?

Once again, I appreciate your time and any info you can share with me.


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: gleasone (offline) on Friday, March 18 2011 @ 02:59 PM PDT  
gleasone

Quote by: Windell

> Would that be ok?

So... your question is... "can I ask more questions?" Doesn't seem like a very efficient use of time.



I know, very inefficient. I wanted to make sure you were good with me asking more questions, or getting your opinion before I did it. I didn't know if you were tired of me, after the whole "current limiting resistor" ordeal.


Forum Apprentice
Apprentice

Status: offline

Registered: 03/11/11
Posts: 8

Profile Email    
   
By: Windell (offline) on Sunday, March 20 2011 @ 09:01 PM PDT  
Windell

I am building a spybot using the Lego Mindstorms NXT. The spybot is going to be equipped with a 2.4ghz mini wireless camera. I found some instructions on how to build a light (headlight) for my spybot (using a white led and a few Lego pieces). I can get 4.3v from any of the sensor or motor outputs on the brain. I am using the 4.3v to power a single (maybe double) white LED for my headlight. The 4.3v coming from the Mindstorm brain is "hot" as soon as the brain is turned on. Obviously, I want the headlight on my spybot to light up areas in my house that aren't well lit - as I go from room to room with it. Now, we're talking about normal house lighting like lamps, ceiling lights, etc. I was looking at your diagram for the dark detector, and wanted to incorporate it with my white led so the headlight would switch on or off, depending on the lighting conditions.
[...]
Will the phototransistor you used in the dark detector project work like I am wanting it to do (as described in the above paragraph)? If not, what would you recommend or what's your "opinion" on it?



Fact: The phototransistor can work in the project like you want it to, assuming that the areas of your house that *are* lit are lit with incandescent light or sunlight.

Opinion: It seems a bit silly. Aside of all the power that your 'bot will use, the power to run an extra LED or two is negligible. It's a lot of complexity for very little gained.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   



 All times are PDT. The time is now 11:04 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?