Thursday 24 November 2016

Driving an LED with resistor directly from 3.3v GPIO pin of a microcontroller


Schematic



schematic


simulate this circuit – Schematic created using CircuitLab


I am a newbie in electronics and I am trying to drive an LED with a series resistor from a 3.3V microcontroller. The max strength of my microcontroller is 6mA and I have purchased an LED that has a forward current of 5mA and forward voltage of 2.9V (SMLE13BC8T from element14).


LED Datasheet - http://www.farnell.com/datasheets/2291105.pdf?_ga=2.248677317.314538259.1522008542-1628637695.1510818085&_gac=1.187272666.1519702428.CjwKCAiA_c7UBRAjEiwApCZi8b1AXd13x8uo1jKdDvDSS0hVLYvivMQv_-U7Wa3ZxPwHUqg1C72JOhoCITMQAvD_BwE


I did the resistor calculation and found that a 100 ohm resistor will be able to drop my voltage to a usable range for LED. Before testing this on the actual microcontroller I tried the LED - resistor combination by supplying 3.3V and found that the LED is super bright and heats up in few minutes usage. Hence I measured the current across my circuit using a multimeter and found that it is 71.6mA. I tried to increase my resistance to 200 ohms and the LED did not glow. Can someone help me to solve this. Am I using a wrong LED ?


I did search the forum for similar issues and did not find the answer, hence please don't close this as duplicate.



Answer



I think I found out the issue. My LED and resistor was already soldered into my microcontroller board (even though the MCU was not powered up) and somehow the resistance across my LED is showing as 300 Ohms while it is placed on the board. Hence it took more current to light up the LED. I have now taken out the LED from the MCU and everything seems to be fine.


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...