Tri-Color LED Resistor Question
June 4, 2009
I've seen Oddbots tutorial about LEDs and picking the right resistor, but since this LED costs a few bucks and the wordage is different on Radio Shacks parts I want to make sure I have it right.
Supply coltage is 5 volts
Forward Current 30mA (green/blue), 50mA(red)
Forward Supply 3.5 volts typical, 4 volts max (green/blue); 2 volts typical, 2.6 volts max (red)
I am thinking I need to use a 51 ohm resistor for green and blue and a 68 ohm for the red to get them as close to max as possible using resistors I already have on hand. Can someone verify this? I already blew one a few months ago when I was playing around and at almost $4 it is an expensive POOF! :)
Also since the LEDs all have a common anode I was going to hook up the resistors to the cathode for each LED and then to a PIN on a pixace 28x1. How would I turn on the LED on a specific pin doing it this way? I am assuming I would set th epin to LOW to run the LED on. What state would it have to stay in to turn the LED off? I know this is probably a RTFM moment so feel free to reply with RTFM "subject" and I will research it ;) I just wasn't sure WHAT to look up in the first place. This is for my DOGU bot I hope to have finished by the end of next week. A blog is to come in a few days once I make visible progress.