Go Down

Topic: Changing the digital ports voltage? (Read 2 times) previous topic - next topic


is there a way to regulate the current that the digital ports on the Arduino Uno put out?

There is no one way to reglate the current  but multiple ways, based on your application.

1) For some applications, you can rely on the internal resistance of the mcu output pin: it is simple and can be effective for leds whose forward drop voltage is close to the supply voltage;
2) For small leds, you can use a resistor: simple but less efficient.
3) You can also use other ways, like a jfet, or a dedicated CCS driver, or a current mirror with multiple output legs.
4) There are also dedicated switching mode ccs drivers. they offer flexibility and a wide range of output current / voltage options.

Our led's can only hand up to 3.3 volts and I am unsure how much the ports put out.

You will find that your leds can take far more than 3.3v, especially those high power leds.


Dec 03, 2012, 06:52 pm Last Edit: Dec 03, 2012, 06:54 pm by pwillard Reason: 1
Dhenry... please stop...

When someone says:
First off I'm new to the electronics side of the house.

Right away your answers numbered 1,3 and 4 are just completely unfair to someone that probably does not even know about Ohms law.

Answer #1 should be stricken entirely.  A newcomer would BARELY know when these conditions apply and you are leading them down a path to get it wrong before even knowing why. (damaging their LED, Arduino or both)
Answer #2 should read "For standard leds, you use a proper value current limiting resistor." (period!)  There is nothing inefficient about it.
Answers #3 and #4... really?  Once again... they said "New to electronics"

Telling a newcomer to Google for LED RESISTOR CALCULATOR is far better advice than you are giving.


Dec 03, 2012, 06:55 pm Last Edit: Dec 03, 2012, 07:01 pm by Grumpy_Mike Reason: 1
Dhenry... please stop...

Actually I am beginning to think that he has mental health problems.

You must admit he is consistently very wrong on this and it is getting tiring trying to correct him.
This of course confuses beginners as they do not know who to believe. But on this topic dear henry seems to want people to damage their arduinos. I don't know why, he must get some sort of kick from it.

For further information of why you need current limiting to keep things safe see this:-
Note that I managed to draw 250mA from an arduino pin, that is way over the damage point of 40mA.


Dec 03, 2012, 07:11 pm Last Edit: Dec 04, 2012, 01:53 am by pwillard Reason: 1
I mean really.  How is a person new electronics going to make sense of an answer  that says "use a JFET".   ...and would you ever recommend telling anyone to buy or even build Constant Current Source for a simple LED.  The LED being used by the OP still has not been explained.

The original poster is merely asking will 5V hurt my LED.  The correct answer is: Your LED will be safe if you correctly limit the current.

Sadly, nobody explained HOW that current is limited based on application of OHMS law prior to DHENRY's response.

R=V/I  or resistance you need is Voltage divided by Current.  So, you have 5V divided by ~20mA (typical current of a standard LED)
This is a basic simple calculation to get you in the right "area", a more accurate calculation can be achieved taking into account forward voltage drop of the LED.

So. 5/.025 = 250.  Closest Resistor value = 220   So, to drive a "normal/standard" 5MM LED from an Arduino pin, you insert a 220 Ohm resistor in the path from the Pin to the LED.

If you want to have some fun... go here  http://led.linear1.org/led.wiz

If you want to know more.  Google OHMS LAW.


So. 5/.025 = 250.

Ohm's law applies to just linear devices. The above calculation reflects your complete lack of understanding about Ohm's law.

It still can be used here, just not the way you did - the resulting current would be considerably less what what you your calculation suggested.

Go Up