Using diodes to limit current to an LEDs SOLVED

I'm setting up a microcontroller to drive an array of LEDs and blink them in different patterns. Rather than putting a series resistor in line with each LED, I was wondering about just using a couple diodes to get the voltage down to the right range.

by eamadas4353
November 18, 2016

1 Answer

Answer by agiustino45

I think what you are proposing might actually end up working in practice (not for the reasons you think), but it's its a no no from a design perspective.

To start with, I think your mental model of an LED isn't quite right. You were probably thinking of an LED as an ideal diode. Something that looks like this

Then thinking that that all you have to do is get $V_{LED} to be right at the 2.2 forward voltage, and the 20 mA through the diode magically happens. In reality though diodes have an exponential relationship between voltage and current. When a datasheet says you have say 2.2V forward voltage and 20mA certain current, it is telling you only one point on that curve, a higher V_{LED} will result in the LED drawing much more current than 20mA. So the picture above is close, but it just means there is more to the story.

So, back to your question. You are proposing something like this

If you were to think of diodes as ideal diodes, you can't even solve this circuit, The current through the diodes is infinite! So if you wanted to control the current you could add a current limiting resistor, and do some math to figure out how much current is flowing through your circuit (this is a basic LED homework problem).

However if you simulate the circuit above CircuitLab does give you answer for the current, and its not infinity! That is because diodes are not ideal devices. However the current through the LEDs is dependent on a whole lot of things. Slight variations in temperature, variations in the power supply, anything will make the current change dramatically (and thats probably not what you want).

Another fun fact here is that you may actually get unexpected help from your microcontroller. The digital output pin you are using has some output impedance. Probably a couple of ohms. And I think in your particular case it might work out just right depending on what that resistance is.

So if you are able to find the real output resistance of your microcontroller, you can design with it in mind and get a working circuit. Or just add a resistor of known size so you can know exactly what you are dealing with and design accordingly.

ACCEPTED +2 votes
by agiustino45
November 18, 2016

Your Answer

You must log in or create an account (free!) to answer a question.

Log in Create an account

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

Search Questions & Answers

Ask a Question

Anyone can ask a question.

Did you already search (see above) to see if a similar question has already been answered? If you can't find the answer, you may ask a question.

About This Site

CircuitLab's Q&A site is a FREE questions and answers forum for electronics and electrical engineering students, hobbyists, and professionals.

We encourage you to use our built-in schematic & simulation software to add more detail to your questions and answers.

Acceptable Questions:

  • Concept or theory questions
  • Practical engineering questions
  • “Homework” questions
  • Software/hardware intersection
  • Best practices
  • Design choices & component selection
  • Troubleshooting

Unacceptable Questions:

  • Non-English language content
  • Non-question discussion
  • Non-electronics questions
  • Vendor-specific topics
  • Pure software questions
  • CircuitLab software support

Please respect that there are both seasoned experts and total newbies here: please be nice, be constructive, and be specific!

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.