Author Topic: LED turn on at night  (Read 8107 times)

0 Members and 1 Guest are viewing this topic.

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
LED turn on at night
« on: February 03, 2008, 07:49:21 PM »
all in want is to wire a photocell and a led together with a circut and have it tun on when it is dark out

anyone kno of a simple cirut that will do this
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: LED turn on at night
« Reply #1 on: February 03, 2008, 07:58:28 PM »
photocell with comparator
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #2 on: February 03, 2008, 08:01:46 PM »
whats a comparator ???

i found this but i still don't know what it is

http://www.facstaff.bucknell.edu/mastascu/elessonsHTML/Interfaces/ConvComp.html
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: LED turn on at night
« Reply #3 on: February 03, 2008, 08:04:19 PM »


Ok you see in this picture V+ and V-

When there is more voltage in V+ then in V- the output of the triangle( comparator) is logic 1, or + 5 V
when the voltage in V- is greater , then the output is 0

so you have a photocell that changes value connected to V+ and a resistor connected to V-. When photocell has less resistance than resistor , output is +5V
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #4 on: February 03, 2008, 08:24:24 PM »
like this

(sorry it was quick)

http://s273.photobucket.com/albums/jj217/connornijsse/?action=view&current=led.jpg

any idea what resistor i should use

where can i get a comparator
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: LED turn on at night
« Reply #5 on: February 03, 2008, 08:41:04 PM »
take apart an auto on nightlight.
Robots are awesome!

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #6 on: February 03, 2008, 08:43:01 PM »
simple and genius

one problem most nightlights run from a wall plug not battery's
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: LED turn on at night
« Reply #7 on: February 03, 2008, 08:55:51 PM »
Quote
simple and genius
thx  ;D. hmm good point about the wall plug.....I don't think there are led's that can take that voltage. I'm guessing that there is a circuit of some kind that steps down the voltage. maybe an easy hack. they aren't that expensive so you might want to try it.
« Last Edit: February 03, 2008, 08:57:11 PM by Trumpkin »
Robots are awesome!

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #8 on: February 03, 2008, 08:59:23 PM »
has anone ever seen a battery powered night light
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: LED turn on at night
« Reply #9 on: February 03, 2008, 09:19:47 PM »
has anone ever seen a battery powered night light

nope


I attached the schematic

the resistor value you need to find out


when photoresistor gives out greater voltage than the resistor,  then the LED turned on, otherwise its not

EDIT: In my schematic the LED is connected to the positive , it should be connected to ground( negative)
« Last Edit: February 03, 2008, 09:21:34 PM by airman00 »
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #10 on: February 04, 2008, 06:46:25 AM »
so the led should be between the 12 and the battery???


also how can i find out the resistor

you said that when the photocell gives off more power the led will turn on. but don't photocells gve off more power if there is more light.  i want it to turn on at night
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: LED turn on at night
« Reply #11 on: February 04, 2008, 11:14:56 AM »
The more light, the less resistance there is through the photocell.

So, lets say you have a battery of 9v
You run 5v(depending on the threshold you choose for the amount of light) to the Positive(+) pole of the comparator. Then you would put the photocell in series between the battery and the Negative(-) pole of the comparator. During the day or lighted conditions, the photocell will have less resistance therefore letting more voltage through to the comparator. During lighted conditions, that of course depending on the threshold you choose, the photocell will let more than 5v through to the negative poll, therefore the output bit would be Zero(0). During darker conditions, the photocell will resist the voltage more and thus less than 5v will get to the comparators negative poll resulting in the output bit being One(1) which, if im not mistaken, should be 5volts output. I guess that would depend on the source voltage though. Then just run that 5v directly to the LED but through a resistor so that only about 1volt gets to the LED to extend its life time... or 2 volts if you want it to be much brighter but not last as long.


Fixed the schematic :)
« Last Edit: February 04, 2008, 12:06:08 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #12 on: February 04, 2008, 05:04:42 PM »
thanks

that cleared a lot up

anyone have a pic od a comparator (i already checked google)

anyone know where to buy them
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: LED turn on at night
« Reply #13 on: February 04, 2008, 05:09:27 PM »
Robots are awesome!

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #14 on: February 04, 2008, 05:12:40 PM »
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: LED turn on at night
« Reply #15 on: February 04, 2008, 06:10:33 PM »
you buy a comparator in a chip


search for comparator chips ,

some comparator chips off the top of my head

LM324 - two comparators in a package
LM339 -  four comparators in a package


Within the IC is more than one comparator, just look in the datasheet of the chip to see which pins are connected to which comparator


Which distributor do you want?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #16 on: February 04, 2008, 06:53:19 PM »
Which distributor do you want?

digikey

or any store located in canada

(i know digikey isn't loctaed in canada i just have experience with them) ($50 robot)
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: LED turn on at night
« Reply #17 on: February 04, 2008, 06:56:53 PM »
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=LM339NNS-ND



I don't like digikey ,  I usually buy from allelectronics.com

they are much cheaper than digikey and have amazing service

buy this part from allelectronics
http://www.allelectronics.com/cgi-bin/item/LM339/search/QUAD_COMP_14_PIN_.html
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline bukowski

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: LED turn on at night
« Reply #18 on: February 04, 2008, 07:08:48 PM »
or you could do a voltage divider with the photoresistor in parallel with the led. The more light, the less voltage goes to the LED.

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: LED turn on at night
« Reply #19 on: February 04, 2008, 07:10:59 PM »
or you could do a voltage divider with the photoresistor in parallel with the led. The more light, the less voltage goes to the LED.

but then the led would be on when its slightly dark


cooldog wants it either on when its very dark or off when its a little light outside
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #20 on: February 05, 2008, 04:31:36 PM »
any one know where i can sample a 2N4401 NPN Transistor, 100k ohms resistor, 470 ohms resistor

would something like this work
http://s273.photobucket.com/albums/jj217/connornijsse/?action=view&current=ledscimatic.jpg

also can anyone tell me the max voltage it can take
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: LED turn on at night
« Reply #21 on: February 05, 2008, 06:13:38 PM »
radio shack. just use the 5 fingered coupon
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: LED turn on at night
« Reply #22 on: February 05, 2008, 07:25:23 PM »
radio shack. just use the 5 fingered coupon
Dont encourage stuff like that. That kind of thing pisses me off. If you dont have the money to go buy a few resistors, go around and look for some cans to turn in.
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: LED turn on at night
« Reply #23 on: February 05, 2008, 08:22:11 PM »
FYI i was being sarcastic.
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: LED turn on at night
« Reply #24 on: February 05, 2008, 09:00:52 PM »
radio shack. just use the 5 fingered coupon

funny but slighty true... brings back memorys ::) just kidding ;D

also it'd the 5 finger discount not coupon

Which distributor do you want?

digikey

or any store located in canada

(i know digikey isn't loctaed in canada i just have experience with them) ($50 robot)

notice in canada. i was wondering about samples because they ship free. FYI radio shack doesn't ship to canada
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline javafiend

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: LED turn on at night
« Reply #25 on: February 06, 2008, 08:00:07 AM »
I found this on evilmadscientist.com. It's a dark-detecting LED circuit.

http://www.evilmadscientist.com/article.php/nightlight

paulstreats

  • Guest
Re: LED turn on at night
« Reply #26 on: February 06, 2008, 08:14:59 AM »
You could also use an undervoltage monitor. Its a 3 pin package where +v goes in 1 end and gnd at the other. the third pin depends on what type you want so voltage will flow out of the 3rd if the input voltage is above or below a certain threshhold depending on the type you get. Most companies with samples programmes offer them

paulstreats

  • Guest
Re: LED turn on at night
« Reply #27 on: February 06, 2008, 08:16:52 AM »
p.s. There could also be a market for well designed battery powered night lights since it is now recommended for parents of young children not to use the plug in variety since it encourages children to the plug sockets

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: LED turn on at night
« Reply #28 on: February 06, 2008, 09:33:49 AM »
if you search on google i found a couple of night lights that were battery powered but none had a light sensor (photoresistor)
Robots are awesome!

 


Get Your Ad Here

data_list