Saturday 28 May 2016

Driving RGB LED using GPIO



I am trying to drive this RGB using the GPIO of STM32F072. The GPIO can source around 25mA and the LED consumes around 20mA.
Would there be any issues?



Answer



Don't source more than 80mA. Absolute maximum. And you have to spread this 80mA over all GPIO banks.



The GPIOs (general purpose input/outputs) can sink or source up to +/-8 mA, and sink or source up to +/- 20 mA (with a relaxed VOL/VOH).



At 20mA, you'll be looking at VDDIOx –1.3V, so for 3.3V the output voltage can be as low as 2 Volt. (or as high as 1.3V sinking)


Looking at the forward voltages of your LED:




USD :1.6-2.4 V
NG :2.7-3.9 V
NB :2.7-3.9 V



This means you can only reliably drive the red led.


Don't drive the LED direclty from the chip. Use a LED driver or get an WS2812 or similar serial LED.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...