# Question for all you electrogeniuses



## Undeadvoodoomonkey (Aug 4, 2007)

I want to hook up an l.e.d. to a battery pack but instead of a switch for the power supply, I wanted to hook up a light sensor so the l.e.d. would come on in the dark only. Any ideas?


----------



## Abunai (Oct 28, 2007)

Undeadvoodoomonkey said:


> I want to hook up an l.e.d. to a battery pack but instead of a switch for the power supply, I wanted to hook up a light sensor so the l.e.d. would come on in the dark only. Any ideas?


Some hobby shops may have photoelectric sensors that would be easy to integrate into a project.

Last year, I was trying to find a cheap motion sensor for a prop. I ended up going to Walmart and buying a replacement sensor from a security light system. I noticed a lot of them had light sensors in them as well (so they don't turn on during the day.) I don't know if they sell spare light sensors, but you could probably cannibalize one from a security light system and integrate it fairly easily into your project.


----------



## heresjohnny (Feb 15, 2006)

I have never built it, but here is a light triggered switch 
http://www.zen22142.zen.co.uk/Circuits/Switching/ldet.htm


----------



## Bone Dancer (Oct 7, 2005)

Sounds like a night light to me. Except DC instead of AC. Maybe check the toy or baby departments to see if there is something you can hack.


----------



## Undeadvoodoomonkey (Aug 4, 2007)

Oooopps sorry wrong section. Thanks for the responses all, I should have mentioned in the first post that I can do basic electronics but it's not my forte. Would using a 3 volt L.E.D. and 3 volt power supply worked with a hacked photoelectric cell? And am I correct in saying that a larger battery will last longer than a smaller one. So if I had a choice in battery life or output 3 volt or 1.5 volt, how much longer a C or D battery with a 1.5 L.E.D. last? Or say two AA batteries and a 3 volt L.E.D. (I have a small space to use). Any more input would really help, thanks again.


----------



## Abunai (Oct 28, 2007)

Undeadvoodoomonkey said:


> Oooopps sorry wrong section. Thanks for the responses all, I should have mentioned in the first post that I can do basic electronics but it's not my forte. Would using a 3 volt L.E.D. and 3 volt power supply worked with a hacked photoelectric cell? And am I correct in saying that a larger battery will last longer than a smaller one. So if I had a choice in battery life or output 3 volt or 1.5 volt, how much longer a C or D battery with a 1.5 L.E.D. last? Or say two AA batteries and a 3 volt L.E.D. (I have a small space to use). Any more input would really help, thanks again.


I don't know for certain how the photoelectric cell works. It would seem to be like a switch; open when it's light out, closed when it's dark. I don't know if it requires a power source to operate. If it does not require a power source, then it should be able to be placed in pretty much any circuit where a switch would go. I liked the nightlight idea posted previously. That would probably be the cheapest source for a photoelectric cell. And, again, if these cells don't require a power source and simply act as a switch activated by light levels, then there should be little if any difference in using one on an AC circuit or a DC circuit.

As far as batteries and LEDs go; Yes, a bigger battery would last longer, given the same current draw from the LED. Every standard battery (AAA, AA, B, C, D) supplies 1.5 volts DC. If you can only fit one size D battery...then you would want to go with a 1.5v LED. If the brightness is a consideration, I would think that a 3v LED would be brighter, but would require two of whatever size batteries you could fit. The bigger the batteries, the longer the LED will run.


----------



## heresjohnny (Feb 15, 2006)

Hmm, search around on ebay, for example http://cgi.ebay.com/Sensor-LED-Flicker-Battery-Candle-Night-Light-on-sale_W0QQitemZ310015743058QQihZ021QQcategoryZ16115QQssPageNameZWDVWQQrdZ1QQcmdZViewItem.

You can probably also find LED lights that will fit in a night light. There are also battery powered night lights available. It all depends on what you are trying to do.


----------



## Liam (Mar 23, 2007)

Radio Shack used to sell a five pack of photoresistors for a few bucks. I think that would work for you, just put one of them inline with the LED. Please correct me if I'm wrong, I'm no pro at this electronic stuff.


----------



## Undeadvoodoomonkey (Aug 4, 2007)

WOW thanks again for all the hand holding on this thread (I should have takin' that electronics course instead of Byzantine economics ). I found some Light dependent resistors at a local store. http://tbn0.google.com/images?q=tbn...anarotr.co.kr/products/images/06_m1-pic25.jpg
I added them inline on the positive in front of my L.E.D and it would only turn on when the light was on it! The stronger the light the brighter my L.E.D.  It also seemed to draw some power from my L.E.D. Is there another way to hook up this circuit? Or should I look for those cool candles or night lights? Thanks again!


----------



## heresjohnny (Feb 15, 2006)

By adding a photoresistor in series with the LED, with the light off the photoresistor has a high resistance, and the LED will be off or very dim. As the light gets brighter the photoresistor offers less resistance, allowing more current to the LED, and a brighter light. I imagine the LED does not go off, it only gets dim. If this meets your needs there is nothing wrong with doing it this way, but I would disconnect the battery when you are not using it because this circuit will draw power even in the dark (as heat from the resistor). Also, when you are hooking up LEDs to batteries I recommend using a calculator like http://led.linear1.org/led.wiz to make sure you don't burn out your LEDs.

If this is not giving you the effect you want, and want to mess around with some electronics, the next step would be to use the photoresistor to control a 'switch' that actually turns the LED on and off. The difference between this and what you have now is that the LED will be off, not just dim, and when the LED turns on it will be at a steady brightness. Finally, this will not suck the batteries nearly as much while the LED is off. The circuit I posted earlier is one example.

And you can always go the night light route too! All depends on what you want. Hope this helps


----------



## Undeadvoodoomonkey (Aug 4, 2007)

Thanks Jonny! I am getting a dim L.E.D with the way I had it all hooked up plus it was working in reverse to the way I want it to. The Photoresistor connected to a switch like you suggested is exactly what I want, I'll try to figure out the circuit map you posted before. I just got back for Canadian Tire with some night lights so we will see how this all works it self out in the end. The only issue with them is they are plug in socket models not battery operated like I was hoping. I'll post pics when I'm done. Thanks all.


----------



## Undeadvoodoomonkey (Aug 4, 2007)

Heres a link to the project you all helped me with, Thanks again I probably would have electrified myself if it had not been for you. :googly:

http://hauntforum.com/showthread.php?t=9881


----------

