Find the resistance value

Thread Starter

awesome3000

Joined Apr 7, 2010
2
Hi guys,

I have a question in regards to connecting an LED to a Microcontroller unit.
What is the best resistor value to make sure the LED is bright as much as possible.

i am not sure i am using a simple way of like

R=(Voltage from MCU - Voltage LED)/Max currentof MCU Pin.

and then divide the reslut by 2 to ensure not to reach the max condition.

but the other one which i am confused i have been given a source current for I/O pin for MCU and is asking to find the value of resistor to be connected to the LED to ensure the LED is bright.

Can any one advice me or give me a hint on how to extract the information form the graph.

Note: i have attached two pictures . 1 has the question in it and the 2nd one is the I/O soure current

Many thanks

Sam
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
I've cropped/exported the chart so it's easier to read online:



You do not want to exceed the maximum I/O current for the AVR pin.

On the chart, choose the horizontal line that has the maximum AVR current or the desired LED current, whichever is less. This will be your LED_current.

Follow the line to the right until it gets to the expected temperature the system will be operating in. Just for example, it looks to me that 50mA output at 25°C (77°F) is just about 3.6v. You're better off to err a bit on the high side voltage-wise than low.

Then calculate Rlimit = (AVR_Voh - Vf_LED) / LED_current
 

Attachments

Top