Offline
Newbie
Karma: 0
Posts: 2
|
 |
« on: December 02, 2012, 02:42:15 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #1 on: December 02, 2012, 02:56:11 pm » |
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
|
|
|
|
« Last Edit: December 02, 2012, 02:58:52 pm by retrolefty »
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 137
Posts: 19015
I don't think you connected the grounds, Dave.
|
 |
« Reply #2 on: December 02, 2012, 02:57:08 pm » |
Your question is confusing. Can you post the spec of your LEDs?
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #3 on: December 02, 2012, 03:01:47 pm » |
Well how much does the digital ports output in volts? I don't want to fry my leds I can regulate it with resistors.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #4 on: December 02, 2012, 03:05:09 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #5 on: December 02, 2012, 07:39:31 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Cumming, Ga
Offline
Edison Member
Karma: 12
Posts: 1388
Ultimate DIY: Arduino
|
 |
« Reply #6 on: December 03, 2012, 12:52:21 pm » |
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.
|
|
|
|
« Last Edit: December 03, 2012, 12:54:31 pm by pwillard »
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 272
Posts: 25464
Solder is electric glue
|
 |
« Reply #7 on: December 03, 2012, 12:55:48 pm » |
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.htmlNote that I managed to draw 250mA from an arduino pin, that is way over the damage point of 40mA.
|
|
|
|
« Last Edit: December 03, 2012, 01:01:15 pm by Grumpy_Mike »
|
Logged
|
|
|
|
|
Cumming, Ga
Offline
Edison Member
Karma: 12
Posts: 1388
Ultimate DIY: Arduino
|
 |
« Reply #8 on: December 03, 2012, 01:11:09 pm » |
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.wizIf you want to know more. Google OHMS LAW.
|
|
|
|
« Last Edit: December 03, 2012, 07:53:27 pm by pwillard »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #9 on: December 03, 2012, 05:28:05 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 272
Posts: 25464
Solder is electric glue
|
 |
« Reply #10 on: December 03, 2012, 05:36:49 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Cumming, Ga
Offline
Edison Member
Karma: 12
Posts: 1388
Ultimate DIY: Arduino
|
 |
« Reply #11 on: December 03, 2012, 07:39:28 pm » |
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.
|
|
|
|
« Last Edit: December 03, 2012, 07:57:19 pm by pwillard »
|
Logged
|
|
|
|
|
Malmö, Sweden
Offline
Newbie
Karma: 1
Posts: 8
|
 |
« Reply #12 on: December 04, 2012, 05:36:49 am » |
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!
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Faraday Member
Karma: 15
Posts: 2852
Gorm deficient
|
 |
« Reply #13 on: December 04, 2012, 05:53:40 am » |
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.
|
|
|
|
|
Logged
|
Per Arduino ad Astra
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 272
Posts: 25464
Solder is electric glue
|
 |
« Reply #14 on: December 04, 2012, 05:54:51 am » |
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. 
|
|
|
|
|
Logged
|
|
|
|
|
|