Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: cooldog 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
-
photocell with comparator
-
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
-
(http://www.facstaff.bucknell.edu/mastascu/elessonsHTML/Interfaces/ConvComp01.gif)
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
-
like this
(sorry it was quick)
http://s273.photobucket.com/albums/jj217/connornijsse/?action=view¤t=led.jpg
any idea what resistor i should use
where can i get a comparator
-
take apart an auto on nightlight.
-
simple and genius
one problem most nightlights run from a wall plug not battery's
-
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.
-
has anone ever seen a battery powered night light
-
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)
-
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
-
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.
(http://img186.imageshack.us/img186/1502/lednightlightrp9.th.png) (http://img186.imageshack.us/my.php?image=lednightlightrp9.png)
Fixed the schematic :)
-
thanks
that cleared a lot up
anyone have a pic od a comparator (i already checked google)
anyone know where to buy them
-
here is one http://www.robotroom.com/Comparator.html
-
anyone know where to buy them
-
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?
-
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)
-
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=LM339NNS-ND
(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 (http://www.allelectronics.com/cgi-bin/item/LM339/search/QUAD_COMP_14_PIN_.html)
-
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.
-
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
-
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¤t=ledscimatic.jpg
also can anyone tell me the max voltage it can take
-
radio shack. just use the 5 fingered coupon
-
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.
-
FYI i was being sarcastic.
-
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
-
I found this on evilmadscientist.com. It's a dark-detecting LED circuit.
http://www.evilmadscientist.com/article.php/nightlight (http://www.evilmadscientist.com/article.php/nightlight)
-
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
-
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
-
if you search on google i found a couple of night lights that were battery powered but none had a light sensor (photoresistor)