common anode rgb with anode hooked to 5v and cathodes on teensy 3.6 i/o?

Status
Not open for further replies.

mmalex

Member
i know the 3.6 isnt 5v tolerant, but if I wanted to drive a single common anode RGB LED with minimal part count whose forward voltage is very close to 3.3v (3.1v it seems from the data sheet), could I hook the common anode to 5v (Vin) and then the 3 cathodes (thru current limiting resistors) to digital output pins, even tho they will only go from 0-3.3v. my thinking is- the forward voltage on the red led is 1.8v, but the G/B is over 3.1v - feels a bit close to 3.3v? so I was thinking it might be ok if the anode was 5v, as the drop across the LED means that the pin would never see more than 5-1.8v which is under 3.3v. am I going mad?
should I just run it off 3.3v at the anode and be happy?
sorry for the dumb question.
 
Going by the math you are correct. However there may be some current limit per group of pins that may become a fly in the ointment. Also if one of the LEDs gets accidently shorted Cathode to anode, you're out of luck. The best/safest way to drive discrete LEDs from a Teensy digital pin would be to use a (digital) transistor or MOSFET to drive the LED. That way when accidents happen, you will only have to replace a $0.20 transistor and not a $30.00 Teensy. There are also transistor arrays, quad, hex or octal buffers that have several drive channels in a single package which would help save space too.
 
Status
Not open for further replies.
Back
Top