Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: megaman935 on June 20, 2007, 06:53:01 PM

Title: LED Light
Post by: megaman935 on June 20, 2007, 06:53:01 PM
Ok for a while I completely gave up on robotics. Now I have money and still have some old electronics.
I opened up one of my old GBA battery chargers by madcatz and am wondering whether or not to save the LED light. What can an LED light do to help me in robotics/ how can I use one on a robot? ???
Title: Re: LED Light
Post by: ed1380 on June 20, 2007, 06:54:54 PM
to show status. definitely save it
Title: Re: LED Light
Post by: megaman935 on June 20, 2007, 07:16:58 PM
So it may be able to show, say, battery life or something like that? :-\
Title: Re: LED Light
Post by: ed1380 on June 20, 2007, 10:44:13 PM
it would, but if you do it by brightness it'll be hard to interpret.

maybe if you put a row of leds and more voltage more leds on
Title: Re: LED Light
Post by: TrickyNekro on June 21, 2007, 02:17:00 AM
You can also use it a switch!!! That's an old trick!!!
You simply light the led and then turn it off and mesure the ADC readings... Should the light being emmited being reflected back to the led the ADC reading would higher than half...
This is due to the ability the Led has to conver light to voltage!!!Don't expect much current only some mA but there 're enought to trigger the ADC!!!

Friendly,
Lefteris, Greece
Title: Re: LED Light
Post by: megaman935 on June 21, 2007, 07:25:33 AM
Quote 'it would, but if you do it by brightness it'll be hard to interpret.

maybe if you put a row of leds and more voltage more leds on'
end quote

Well, the light used to change from orange to green when your battery was done. by that I mean it could be green then when it starts to die, it could turn orange? ???

Quote 'You can also use it a switch!!! That's an old trick!!!
You simply light the led and then turn it off and mesure the ADC readings... Should the light being emmited being reflected back to the led the ADC reading would higher than half...
This is due to the ability the Led has to conver light to voltage!!!Don't expect much current only some mA but there 're enought to trigger the ADC!!!'
end quote.

I know you're trying to help but I'm sorry to say I really have no Idea what you're saying....It's a sad day... :-[
Title: Re: LED Light
Post by: ed1380 on June 21, 2007, 08:45:10 AM
ok so it's a dual colored led.
thats cool, but you'll have to program the mcu, to measure teh battery voltage, and if it's greater than x light up teh green led, less than x light up the red led.

does it have 3 leads
Title: Re: LED Light
Post by: megaman935 on June 21, 2007, 03:33:58 PM
If by three leads you mean a positive (red), neutral (black), and ground (green) wires then yes  ;D
So basically I'd have to solder it onto a microcontroller then have it programmed (by a programmer?) so that when the battery life gets to, say, 5% it turns from green to orange?
Or could I program it so that it changes when it's sharp IR rangefinder finds an enemy in a sumo bot competition and starts to chase it? what all could I make it do? :)
*glad I didn't throw it away* ;)
Title: Re: LED Light
Post by: ed1380 on June 21, 2007, 03:37:36 PM
either. but the second one would not be of much value to you.

AFAIK the middle leg is ground and the others are for +.
some change color because of voltage and some because of pwm.
 
Title: Re: LED Light
Post by: megaman935 on June 21, 2007, 03:45:40 PM
and I'd have to have a programmer take care of telling the microcontroller what to do? Anyone have any suggestions on a microcontroller/programmer? :D
Title: Re: LED Light
Post by: rgcustodio on June 21, 2007, 06:11:21 PM
You can also use it a switch!!! That's an old trick!!!
You simply light the led and then turn it off and mesure the ADC readings... Should the light being emmited being reflected back to the led the ADC reading would higher than half...
This is due to the ability the Led has to conver light to voltage!!!Don't expect much current only some mA but there 're enought to trigger the ADC!!!

This is how this works:
http://mvh.sr.unh.edu/mvhinvestigations/light_investigations.htm (http://mvh.sr.unh.edu/mvhinvestigations/light_investigations.htm)

Now, you can connect your LED to your MCUs ADC port, and have your application sample the ADC port. More about ADCs here: http://www.societyofrobots.com/programming_fuzzy_logic.shtml (http://www.societyofrobots.com/programming_fuzzy_logic.shtml)
Title: Re: LED Light
Post by: ed1380 on June 21, 2007, 08:01:14 PM
Quote
http://mvh.sr.unh.edu/mvhinvestigations/light_investigations.htm
aweseom. I never know of that
Title: Re: LED Light
Post by: megaman935 on June 22, 2007, 08:19:56 AM
So it can be like a solar panel giving energy to your robot? :o
Title: Re: LED Light
Post by: megaman935 on June 22, 2007, 06:08:33 PM
Ok, so I've cut it off the green chip thing it was connected to (don't think it was a MCU (that's a microcontroller, right?)) and now I need to resolder it to a microcontroller's ADC port? how does this work? I also have a second- can I solder it somewhere on the microcontroller and have on like a solar panel while the other tells me how much battery life I've got? And please, if anyone can recommend a microcontroller/programmer I'd be much abliged. :D

I'm sorry everyone- I'm making this a little more complicated than it began.. ;)

Mega
Title: Re: LED Light
Post by: ed1380 on June 22, 2007, 08:59:15 PM
I'd recoment the arduino with atmega8/16. same chip as on the $50 robot.

you'd need alot of leds for it to act as a solar panel.

heres a diagram on how you can make the outputs.

IDk how to measure voltage
Title: Re: LED Light
Post by: megaman935 on July 20, 2007, 07:08:51 PM
in your diagram ed, what is the one thing (conductor?)
I'm trying to help someone else on how to power and change the color of a bi LED- would it still work like in your diagram?