
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
THERE 2 WAYS one is use a photocell with resistor in series ,photo cell to gnd and on resistor other end v+ like a voltage divider ,where the resistor and photocell comes together is the output then use a simple comparator circuit to turn on a transistor then switch on led
other way is get a PHIDGETS light sensor and output goes to comparator circuit
phidgets light sensor
to set the trip point use a pot,transistor needed to drive led is pnp lke 2n2222,mostly any will work will need a base resistor from output of comparator to base of transistor ,i use like 4.7k
Ok , not sure.how to apply this. Are you suggesting this run to.USB adv then a output triggers a relay to power on the LEDs? I may have half a amp worth of whites / ir
you use a photocell board or photocell divider to op amp set up as comparator way it works you have a photocell putting analog voltage when it dark and set point on comparator using voltage divider and when light hits the photo cell voltage drops below the set point you set and turns on a transistor switch that turns on a led lm311 comparator circuits
you use LM311 single comparator chip AND 5 VOLTS supply single ended if you find a photocell any type and find out the dark resistance and then get a resistor to match the value set point with 2.5 volts ,half of voltage supply ,then get a pot of twice the value of the photcell to set above or below 2.5 volt threshold if you need help on circuit or values i can help you
on current driving of leds a mosfet will be the best answer,can drive more then 1 amp and low current drive from comparator
@ jstarne1 Or use one of these Mini Photo Cell simple and very cheap
Then feed the output into an EZB ADC port and add a script to switch on your IR lamps via EZ B digital port
Also do you really need that many IR LED's I would try a few experiments 1st and see what works with your camera
that can also work easy too,still need a mosfet as a led driver,better then using a relay any cheap photocell will work,goldmine-elect has some very very cheap
on using A/D port on EZ board might have to adjust the values alot ? sometime other light sources will trigger it and turn on the light,but depends on what you want to use the light detecting circuit for at work we make LUX meter ,witch uses a photo cell design LUX is the illuminance measure of light in units LX, higher the LX brighter the room is
Why not drive the LED direct from the EZB that is what I am doing....works fine...it does take up another port on the EZB however.
v/r
Kevin
kevin he has 2 problems one is it needs about .5 amp ,most outputs can only sink about 10 to 20 ma and 25 of them are .5 amps ,so the outputs would go bad
second wants to turn them on when near dark,so photo cell is only way to go,now to fine tune the photo cell on EZ-BOARD can use a pot or use a meter and measure the output voltage at the level you want lights to come on and set that voltage in EZ-ROBOT script and use mosfet to drive all of the leds,can use a relay ,like reed relay but still need a transistor to turn on the relay(i have many can sell very very cheap)
on making a comparator circuit witch is easy to make,dont need to make any scripts,or tie up analog port and is adjustable
some info about using relays and mosfets most relays use high current on coil,not as fast switching,needs switching transistor reed relays fast switching low current coil small size,needs switching transistor mosfets very small size ,very low current drive ,low rds on ,sometimes dont need a switching transistor like relays need, also higher power transistors will work ,might need a switching transistor
@robotmaker,
I must be missing something. You can easily drive multiple LEDs off a single ezb port (much less than .5 amps). A simple script can be written to turn them on when the ADC port from the photocell registers above/below a certain value. If the photo cell power is an issue, you can power itl from a different source if needed so long as you have a common ground. I use an analog accelerometer to turn on/off motors depending on tilt of the bots waist. Works great. That circuit could just as easy be a photocell and LEDs.
Comparator circuit would surely work but then you are hard wired. I would like control to be able to over ride it, if desired, and also use the photo-cell information to trigger other events.
v/r
Kevin