
jstarne1
USA
Asked
— Edited
Ok so I need to make ir buy a light sensor that I can place ontop of my bot through a drilled hole on Omnibots head or neck area. I will have about 25-50 5mm forward facing ir LEDs and 25-50 inside omnibots eye sockets so it illuminates the most where omnibot is looking. They will all not even draw a amp because LEDs are so low power. Any ideas of how to switch on the LEDs? I would like for it to switch the IR on when it hits a certain level of darkness. I believe my IR LEDs run on 2.5v and draw .02A thanks
KEVIN look at the manual on EZB it says can only source or sink 25 ma,thats about 1 led,there are low current leds 1 ma ,what you might be looking at is scanning leds then you are only driving one led at a time its near the bottom of manual under specs for max current source or sink 25ma
on comparator circuit there is a pin can be used to over-ride it,chip is 8 pin and comparator circuit can drive EZB digital input and then drive a mosfet or relay ,so you have both over ride and trigger other events set point on photocell will be hard to set without a pot,will need a meter and measure it,or in the photocell voltage divider add a pot on top of the divider string or bottom depending on photocell circuit for EZB
photocell power is very low current ,its near 10k for most of them its near .00025 amp or 250 ua
also when using led you need to set the current of each led ,about 470 ohms with a 5 volt source. ,7.4 volt source use near 370 ohms,but i would use a 5 volt source or source with regulator another problem you need to look at is total current for servo's,motors,EZB,and anything else you add ,for to stay near the limits of each regulator,also stay well under less heat
@robotmaker
I am driving 2 lilypad LEDs direct with EZB digital I/O with no problems....I am not quite sure what DJ means about the 25mA 'High current sink' on the Digital I/O as servos draw much more than that (micro servos draw like 200mA) when operating.
I am also driving a larson scanner LED kit directly (at the same time) off an EZB I/O port with no issues whatsoever where up to 4 LEDs are lit at a time.
btw the Larson scanner is an awesome augentation to any bot....highly recommended!
Larson Scanner
servos are not driven from a port only pwm signal is,they use 5 volt supply to drive servo power thats why DJ has a seperate power supply can be hook up
lily pads leds are 2 ma leds so can drive upto 12 of them it you look at any microcontroller data sheet it shows max current drive is 25 ma ,thats one led.like the arduino same think if you asked the same question on thier website site you will get the same answer 25 ma total current drive at 500 ma at 2.5 volts meens it need a high power transistor to drive it ,alot more then what pic or arduino uses most people source a led ,meens cathode to ground ,5 volts out using 470 ohm to set the current of led using at 20ma logic 1 turns on led logic 0 turns off
on the larson scanner circuit is different it uses another chip to drive the leds and it scans the leds,so current is little lower,plus i see they use I/O FOR EACH LED total of 9 pins on chip also for 500 ma you need a heatsink or regulator will get hot,i dont think any micro has a heatsink inside,thats why can handle 500 ma needed for 25 leds,now can use 12 1 ma leds from HP AND 2 I/O ports or 25 I/O Ports driving one 20 LED EACH
took some time but i found the data sheet on cpu that EZB is using 18f4685 it says the same thing for digital I/O PIN High-Current Sink/source 25 mA/25 mA ,witch meens total current drive on any digital pin
check the arduino lilypad total source/sink is 40 ma max,so can drive two 20 ma leds
That makes sense. I was mixing up the I/O current with the current available on the Vcc pin which is alot higher. I will say the lilypads are great LEDs..very bright. Very good if you are trying to save power.....
I would say its best to just use the ezb to trigger a low power relay. Like a reed relay from radioshack. This way.I can put a switch on the back of my bot so I can manually turn off the led lighting as it could be annoying at certain times. So is a comparitor circuit the way to do this? Agian I only want to use ezb as trigger I don't want to power any accessories with it.
it depends if you want to want to make a extra script for it and measure the phot cell analog output for darkness you have for it to come on using analog port,other is making a comparator circuit with parts from radio shack board and parts fairly cheap,then add a pot to adjust it and use a simple digital input script to trigger the digital output relay,reed switch is fairly good way to go,will need pnp transistor to turn it on from the digital port mosfet is better and about the same price of reed relay plus transistor
keep in mind will need 25 resistors for 25 leds. for 20 ma at 5 volts supply 470 ohms
Larson scanner would be cool if it only came on when talking. Just like evolver . His was LEDs that would light in the center and go towards right and left edges.when.he spoke.
you can use LM3915 circuit for mouth,when sound apply to input the leds move to be like he is talking they sell board complete for it,i think website is canakits
here is is,you need 2 of them led vu meter kit
or 10 led vu kit 1 of them can put in series 10 led vu mter kit