Changing the digital ports voltage?

Code:
First off I'm new to the electronics side of the house. I'm trying to mulitplex leds, is there a way to regulate the current that the digital ports on the Arduino Uno put out? Our led's can only hand up to 3.3 volts and I am unsure how much the ports put out.

The way (and only way) to 'regulate' the current being drawn from an arduino output pins is by having proper current limiting control on the external circuitry. For led's this is usually done by wiring properly sized resistors in series with the output pins being used.

And while leds do have a forward voltage drop specification, you don't operate a LED with a simple constant voltage amount, but rather you just make sure your circuitry controls the amount of current flowing through the led to it's rated value.

Lefty

Your question is confusing.
Can you post the spec of your LEDs?

Well how much does the digital ports output in volts? I don't want to fry my leds I can regulate it with resistors.

Code:
Well how much does the digital ports output in volts? I don't want to fry my leds I can regulate it with resistors.

The standard Uno board output pins have a nominal +5vdc output when set high. Output pin current should be limited to 30ma or less as the 40ma absolute maximum rating is a value you should never be using continuously. If your LEDs require more then 30ma for full brightness then you should use extra external components (transistors, IC drivers, etc) to drive the leds.

Lefty

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.

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.

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:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html
Note that I managed to draw 250mA from an arduino pin, that is way over the damage point of 40mA.

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.

It still can be used here, just not the way you did

OK so how would use it in this case and how would the result be different?

So. 5/.025 = 250.

(dhenry) 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.

In this case... Even if you take into account forward voltage drop of a typical 5 mm LED, you still end up with 220 ohms (Or 180 ohms if you went the other way in standard values). If you do not understand how Ohms law applies to control the amount of current in a simple 5V LED circuit, those who take your advise should do so with much suspicion now.

Ohms Law calculation is about the resistor... which is linear... and used to control the current in that section of the circuit... which includes and LED, which for all practical purposes is a unidirectional conductor.

It is YOU who do not understand. That is clear to me now.

pwillard:

So. 5/.025 = 250.

(dhenry) 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.

In this case... Even if you take into account forward voltage drop of a typical 5 mm LED, you still end up with 220 ohms (Or 180 ohms if you went the other way in standard values). If you do not understand how Ohms law applies to control the amount of current in a simple 5V LED circuit, those who take your advise should do so with much suspicion now.

Ohms Law calculation is about the resistor... which is linear... and used to control the current in that section of the circuit... which includes and LED, which for all practical purposes is a unidirectional conductor.

It is YOU who do not understand. That is clear to me now.

Guys - please stop the flaming... I thought this forum was about helping people interested in using Arduinos in their different projects, not for flaming those who try to help!

@pwillard - I think You too have a reason to review the link posted by Grumpy_Mike. Btw, Your calculation is wrong unless You have different laws of mathematics than the rest of us... 5/0.025 is not equal to 250 - it is equal to 200... And to be honest, if You use a 220 ohm resistor You will end up with a dimly lit led...

@Code - Do not drive the leds directly from an Arduino pin without any current limitation, You may/will end up letting the magic smoke out. Check the specs for Your leds (voltage drop and current needed) and read the link posted by Grumpy_Mike. It is imho a good guide to the correct way to light a standard low power led. Good luck with Your project!

IMO flaming a user who gives poor, misleading or plain simple willy-waving advice is entirely justified.
I wish dhenry would shut up and go elsewhere.

I thought this forum was about helping people interested in using Arduinos in their different projects, not for flaming those who try to help!

It is the problem is that dhenry has some strange ideas about lighting up LEDs and throws in all sorts of irrelevant curve balls that the net result is that a beginner is confused. He says things and will not back them up, or talks about fourth and fifth order effects of something as if it was a first order effect. For example he is always banging on about the 40R output impedance of an arduino pin and ignoring the fact that this is only for small currents and I have measured pulses up to 250mA from a pin which puts the impedance down to at the most 20R. Anyway I think the result is that he has scared away another newcomer in a effort to make himself look smarter than he is. It is a shame.

It is always been my belief that electronics can be simple. The trick is to simply things as much as possible but not to such an extent as to be wrong. That is what I try to do, I don't always succeed.

On this topic I normally say:-
With an LED you always need something to limit the current, the simplest of which is a resistor.
Now that is not like saying:-
You always need a resistor.
But it avoids all the complication of mentioning constant current supplies and the rest when all the beginner needs to be told is that you can't just stick an LED across a digital output.

Thanks for the comments on my links. :slight_smile:

Henrik67:

pwillard:

So. 5/.025 = 250.

(dhenry) 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.

In this case... Even if you take into account forward voltage drop of a typical 5 mm LED, you still end up with 220 ohms (Or 180 ohms if you went the other way in standard values). If you do not understand how Ohms law applies to control the amount of current in a simple 5V LED circuit, those who take your advise should do so with much suspicion now.

Ohms Law calculation is about the resistor... which is linear... and used to control the current in that section of the circuit... which includes and LED, which for all practical purposes is a unidirectional conductor.

It is YOU who do not understand. That is clear to me now.

Guys - please stop the flaming... I thought this forum was about helping people interested in using Arduinos in their different projects, not for flaming those who try to help!

@pwillard - I think You too have a reason to review the link posted by Grumpy_Mike. Btw, Your calculation is wrong unless You have different laws of mathematics than the rest of us... 5/0.025 is not equal to 250 - it is equal to 200... And to be honest, if You use a 220 ohm resistor You will end up with a dimly lit led...

@Code - Do not drive the leds directly from an Arduino pin without any current limitation, You may/will end up letting the magic smoke out. Check the specs for Your leds (voltage drop and current needed) and read the link posted by Grumpy_Mike. It is imho a good guide to the correct way to light a standard low power led. Good luck with Your project!

Basically not true about the 'dimly lit led' with a 220 ohm resistor. We have had reports (and I've recreated it on my board) of being able to see a led 'dimly lit' just having the internal pull-up enabled and the pin still in input mode! And that represents about a 40k ohm series current limiting resistor wired to the grounded LED! Today's high efficiency leds will light at a very wide range of currents, there is no need to run them at 20ma just because that is their recommended maximum continuous current rating. The standard arduino boards use a 1K series resistor for the on-board pin 13 led and no one usually complains about the blink sketch being too dim.

So bottom line simple low power leds do need series current limiting resistors to protect the led and the output pin, but anything from 200 to 1K ohms will do the job safely and effectively.

Lefty

Quite right, I have a white LED that is too bright to look at directly and that has a 1K resistor in line with it.

Ok, I stand corrected...

Could you invite dhenry to stand next to you?

Groove:
Could you invite dhenry to stand next to you?

ignored

Henrik67:

Groove:
Could you invite dhenry to stand next to you?

ignored

Wisely :wink:

Lefty