Go Down

Topic: Using arduino to control many LEDs (Read 161 times) previous topic - next topic


Hi guys, probably there is a very simple solution to this but I'm an engineer rather than elecronics guy.

Essentially what I need is that for a given input, I need to power multiple LEDs simultaneously.  The script for outputting to the LED is available, my problem is that it will be 20 LEDs on each panel that need to be lit, which I  suspect is beyond the current limit of the arduino.

I also want to take advantage of the 12v rail that runs round the project, I have found that four LEDs in series on the 12v supply is great for powering the LEDs at the ideal brightness,  so if I can make the arduino output capable of switching on and off the 12v that would be perfect. The LEDs dont need to modulate, just go on and off at command,.

Any suggestions gratefully received




Searching for "Arduino MOSFET switch" will give you loads of examples. Many will show switching motors but if you just replace the motor with your 4 series LEDs (or 5 sets of 4 if you need to light up 20) you'll be there.



Great, many thanks

If I have any further questions I will get back




How much current do those LEDs take? I assume you have a resistor in series, or what else do you use for current limiting?

An 8-channel MOSFET array such as the TPIC6259 or  BTS4130QGAXUMA1 may be useful for you.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.


You are one lucky guy, I would guess there are not many red ones! Typically, the forward voltage of an LED is between 1.8 and 3.3 volts. It varies by the color of the LED. Contrary to popular belief LEDs are current devices not voltage devices. They have to have enough voltage to avalanche (Vf) but brightness is controlled by current. Exceeding the current rating destroys them very rapidly. Use Ohm's law to calculate the resistors. http://www.ohmslawcalculator.com/ohms-law-calculator. Determine the maximum voltage the 12V supply will reach then use that to calculate your minimum resistance using the calculator and the current rating of the LED. To drive the LEDs a simple logic level avalanche rated MOSFET will work great. No resistor would be needed in the gate. If this is an automotive application you have a lot more homework to do. This response is to help you get started in solving your problem, not solve it for you.

Good Luck & Have Fun!


You could control a small relay as the LED switch, and the Arduino would be electrically isolated from the LED setup.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Go Up