Go Down

Topic: Will a 12V power supply burn out my Arduino Uno if it's running 24/7? (Read 15664 times) previous topic - next topic

usilika

Code: [Select]
#include <LEDFader.h>


#define LED_NUM 6

// 6 LEDs (perhaps 2 RGB LEDs)
LEDFader leds[LED_NUM] = {
  LEDFader(3),
  LEDFader(5),
  LEDFader(6),
  LEDFader(9),
  LEDFader(10),
  LEDFader(11)
};

void setup() {
}

void loop() {

  // Update all LEDs and start new fades if any are done
  for (byte i = 0; i < LED_NUM; i++) {
    LEDFader *led = &leds[i];
    led->update();

    // Set new fade
    if (led->is_fading() == false) {
      int duration = random(1000, 9000); // between 1 - 3 seconds

      // Up
      if (led->get_value() == 0) {
        byte color = random(100, 255);
        led->fade(color, duration);
      }
      // Down
      else {
        led->fade(0, duration);
      }
    }
  }
}


Hello! I'm putting together my first project using this code where I'm fading out LEDs at random intervals. I'm attaching 16 12v LEDs to the 6 PWM outputs on the Arduino and to power the Arduino I'm using a 12VDC adapter that plugs into the wall.
The output on the adapter says 12V and 0.5A and input says 100-240V~50/60Hz 0.2A.

I'm very new to electronics, so if I left this on 24/7, will the power eventually burn out my Arduino Uno? Any help will be appreciated, thank you!

weedpharma

If the 12v is plugged into the power input it will work as the suggested voltage is 7-12v. The preferred voltage is 9v.

What will happen with 12v is that the regulator will run hotter than you really want. Plug pack voltage also depends on load unless it is a switchmode supply. Transformer supplies will get higher than 12v.

The preferred voltage of 9v would be better for long term.

Weedpharma

tmd3


CrossRoads

The 12V into the IO pin will kill the IO pins. You need a buffer between the IO and the LEDs, a ULN2003 or UNL2803 for example.
12V into the regulator to make 5V is okay.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

68tjs

The answer depends on three parameters :
  • the power in the regulator
  • The ambiant temperature
  • The thermal resistor of the regulator welded on the PCB.

To know the power in the regulator we will use the well-known formula is P=UI where I is the current and U is the voltage across the régulator so in your case U = Vin-5V.
Note that you will have the same power (for example 0,7W) in the regulator with Vin=12V and I = 100mA or with Vin = 9V and I= 175 mA.

If  we know the thermal resistance of regulator welded on the PCB it is possible to calculate the chip temperature regulator, which generally should not exceed 150 ° C (value to be confirm in the regulator datasheet) , but we don't know it. ::)

In the regulator datasheet we can find the max junction temperature and the thermal resistance junction/case (Rth junction/case).
If you have a suitable thermometer you can measure the temperature of the regulator's case and deduce this of the chip.

Preg = power in the regulator.  Preg =  (Vin - 5V) I
DT = Junction temperature - Case temperature = Preg/Rthjunction/case
and = Tjunction = Tcase + DT.

What about the ambiant temperature ?
If you measure Tcase = 80°C at Tambiant = 20 °C, at Tambiant = 40°C Tcase will increase of the difference 80+(40-20) =100°C.

Example:
Preg = 0.7 W  (Vin = 12V, I = 100mA)
Rthj/c = 50°C/W  (-> given by the datasheet)

Measured Case temperature = 80°C
Measured Tambiant = +20°C
Calculated DT = 0.7W*50°C/W = 35°C

Tjunction = 80 +35 = 115°C
As Tjunction <130 ° C it is good (it is prudent to keep a safety margin : 150 ° C -> 130 ° C).

Important :
 1) if the current will be 200 mA Preg = 1,4W, DT = 70 °C and Tjunction = 150°C it fail.

2) Even with I = 100 mA, if Tambiant increase from +20 °C to +45°C, Tcase will increase of the same quantity and the new value of Tjunction will be :
Tjunction = (80 + 25)°C + 35°C = 140 °C
. It also fail.

You can see that the problem is very complex. It is for this reason that we recommend to always use the lowest possible Vin (Vin must be > 7.5V)
Ceux qui savent qu'ils ne savent rien en connaisse autant que ceux qui croient tout savoir et qui n'en connaissent pas plus qu'eux.
Pierre DAC.

usilika

Thank you all so much!

If the 12v is plugged into the power input it will work as the suggested voltage is 7-12v. The preferred voltage is 9v.

What will happen with 12v is that the regulator will run hotter than you really want. Plug pack voltage also depends on load unless it is a switchmode supply. Transformer supplies will get higher than 12v.

The preferred voltage of 9v would be better for long term.

Weedpharma
Thank you! Will 9V be enough to power all the 12V LEDs though?

The 12V into the IO pin will kill the IO pins. You need a buffer between the IO and the LEDs, a ULN2003 or UNL2803 for example.
12V into the regulator to make 5V is okay.
I have the power plugged into the 2.1mm power input, will I still need a buffer if I lowered it to 9V?

tmd3

It's not clear that your LEDs will work at a lower voltage.  You call them 12V LEDs, which suggests that they have current limiting circuitry built-in, or that they are actually several LEDs in series.  Maybe they're designed for automotive use.  Can you provide a link to information about those LEDs?

It's not clear how you've connected the LEDs to the Arduino pins.  If you've connected the pins directly to the cathode of the LEDs, then we'd expect that the LEDs would still deliver current to the Arduino pins when the pins are set to HIGH, or to INPUT, since their supply voltage is much higher than the Arduino's onboard 5V supply.  That current might be very low, depending on the internals of the 12V LEDs.  Or, it might not.  If you have some kind of driver between the Arduino and the LEDs, then everything might well be OK.  Can you tell us how the LEDs are connected to the Arduino, and to the power supply?

It's not clear how much current you're drawing through the Arduino pins.  A 12V LED isn't the usual component, and it might draw considerable current when it's on.  The Arduino pins are generally limited to 20 mA, long term, and there are other considerations about how much total current certain combinations of pins can draw safely.  Again, how are the LEDs connected?

Finally, it's not clear what other hardware is drawing power from the Arduino's 5V supply.  It might be that the 5V supply serves only the Arduino itself, or it might be that you've got other things connected to it.  if the Arduino's 5V regulator serves other circuitry, it will increase the power that the regulator consumes.  If that gets too high, it could damage the regulator.  What does the rest of your hardware setup look like?

usilika

It's not clear that your LEDs will work at a lower voltage.  You call them 12V LEDs, which suggests that they have current limiting circuitry built-in, or that they are actually several LEDs in series.  Maybe they're designed for automotive use.  Can you provide a link to information about those LEDs?

It's not clear how you've connected the LEDs to the Arduino pins.  If you've connected the pins directly to the cathode of the LEDs, then we'd expect that the LEDs would still deliver current to the Arduino pins when the pins are set to HIGH, or to INPUT, since their supply voltage is much higher than the Arduino's onboard 5V supply.  That current might be very low, depending on the internals of the 12V LEDs.  Or, it might not.  If you have some kind of driver between the Arduino and the LEDs, then everything might well be OK.  Can you tell us how the LEDs are connected to the Arduino, and to the power supply?

It's not clear how much current you're drawing through the Arduino pins.  A 12V LED isn't the usual component, and it might draw considerable current when it's on.  The Arduino pins are generally limited to 20 mA, long term, and there are other considerations about how much total current certain combinations of pins can draw safely.  Again, how are the LEDs connected?

Finally, it's not clear what other hardware is drawing power from the Arduino's 5V supply.  It might be that the 5V supply serves only the Arduino itself, or it might be that you've got other things connected to it.  if the Arduino's 5V regulator serves other circuitry, it will increase the power that the regulator consumes.  If that gets too high, it could damage the regulator.  What does the rest of your hardware setup look like?
Sorry for not being clear, here's a link to the kind of LEDs I'm using, they will be the green ones and there will be 16 of them, and looks like they should run at 9V (derp i answered my own question). I've also attached a quick sketch of how i'm going to connect them. Just imagine there will be 11 more(i only put 6 in the drawing to keep it simple) and they won't be red. They will be soldered onto a board like this one. So looks like I just need to step down the 12v, would a LM7809 be the simplest way?

Hope this clears things up a little. Thanks for your help!

tmd3

Thanks.  Based on your description and your sketch, I still can't quite tell how you intend to operate this gizmo.  I can't tell from the sketch where the 12V, or maybe 9V, connects.  

Can you illuminate?

Where are you in the process of implementing this?  Conceptual design, bought parts, hooked it up for a trial? 

usilika

Thanks.  Based on your description and your sketch, I still can't quite tell how you intend to operate this gizmo.  I can't tell from the sketch where the 12V, or maybe 9V, connects. 

Can you illuminate?

Where are you in the process of implementing this?  Conceptual design, bought parts, hooked it up for a trial? 
The power will go into the female barrel jack on the arduino (maybe it's called 2.1mm power input? DC input? I'm not sure what the correct technical term for it is)

I pretty much have all the parts I need I think.. A power supply, Arduino Uno, a printed circuit board, and LEDs. Right now I have the program running with 6 LEDs, I will be soldering on the rest of the LEDs on site when we install the project next week. I let the whole thing run for about two days now, seems to be doing fine although the chip gets a little warm. This will be installed in an exhibit so I'm just worried about the long term.

CrossRoads

Those LEDs have a resistor in series with the LED.
DO NOT CONNECT THEM TO AN ARDUINO OUTPUT.
When the output is off, the voltage at the LED lead rises to 12V - and the Arduino clamp protection diode attempts to  hold level at ~5.5V.  Eventually the diode will blow.
Use a "high current" driver, basically just an open collector NPN transistor, to sink curren thru the LED to Gnd.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

tmd3

The power will go into the female barrel jack on the arduino
OK.  It looks like you haven't yet done anything that might damage your Arduino.  But, I see some reasons for concern.

1) The voltage across the LEDs when they are on will only be 5V.  It looks like you intend to connect the anodes of the LEDs to timer output pins on the Arduino, and to connect the cathodes to ground.  The timer output pins are only at 5V relative to ground when they are turned on.  You'll probably see the LEDs operate, and dim - and it looks like you have seen that.  But, you won't get full brightness from the LEDs.  If you run the assembly at 9V, it'll be dimmer still.  But, if you're happy with what you see, that may be just fine.

If I'm wrong - if you intend to connect the LEDs to the 12V source - stop and reconsider.  Arduino inputs can't stand up to voltages more than a little bit above VCC.  They'll work as long as they're turned on, but when you turn them off, unpleasant things will happen to the input pins on the Arduino.

2) The specs on your LED assemblies are 20 mA at 12V.  With an LED forward voltage drop of something between 2.0 and 3.3V, depending on color, among other things, the resistor calculates to about 430 to 500 ohms.  With 5V rather than 12V, the LED current will be around 3.4 to 7 mA.  I can't tell how many LEDs you have on a single pin, but, with a total of 16 LEDs on 6 pins, some pins must have at least three.  There's some possibility that you will exceed the 20 mA limit for current through an Arduino output pin, again, depending on the color.  I think that red LEDs are likely to draw more current, but the actual conditions will depend on how the manufacturer implemented his assemblies, and he doesn't seem to say.  That 20 mA limit is a little bit soft, in that the absolute maximum, stress-rating for the pins is 40 mA.  But, to run 24/7, long term, I'd very much recommend staying below 20 mA.  You can find the ratings for pin currents in the datasheet under "Electrical Characteristics."  It seems unlikely that you'll exceed the limits described in the notes to the table, "DC Characteristics," but it's worth a look.

3) Hooked up like this, all of the output power used by the device - the power that runs the Arduino, and the power that illuminates the LEDs - goes through the Arduino's 5V regulator.  We can't tell exactly how much power that is, because of uncertainty about how the LED assemblies are made.  You could relieve some of the stress on that regulator, and operate your LED assemblies at their nominal voltage, by connecting the LEDs like this:  Anode to 12V; cathode to the open collector output of a ULN2803, or something like it; ground pin of the ULN2803 to ground; and the base of the ULN's darlington pairs to the Arduino output pins.  The output pins will have to deliver only a little bit of current to the ULN, and the power for the LEDs will come directly from the 12V supply, bypassing the Arduino's regulator.  Note that you may or may not need resistors between the Arduino pins and the ULN, depending on which one you use - some have resistors inside the IC, and some don't, and you need to have resistors.

If a ULN-style interface IC isn't readily available, you can use several transistors instead, with resistors, of course, between the transistor bases and the Arduino pins.

Quote
I will be soldering on the rest of the LEDs on site when we install the project next week. I let the whole thing run for about two days now, seems to be doing fine although the chip gets a little warm.
It'll get warmer, maybe downright hot, when you add the rest of the LEDs.  I think you'll be happier, and your project will operate more reliably, if you use a ULN-style buffer or discrete transistors to switch your LEDs.  The Arduino draws something like 30 to 40 mA;  multiplied by the 7 volts the regulator has to drop, that would amount to about a quarter watt - not bad.  [Edit: add this]  With 16 LEDs at 7 mA - my calculation for the worst case with the LEDs between an Arduino pin and ground - that goes to about a watt.  It'll get hotter.

If you decide to go with an interface IC or with transistor switches, and have trouble with wiring or calculations, post.  We'll walk you through it.  If you decide to stay on your present course, there's a fair chance that it will work just fine if you don't connect more than three LEDs to any pin, and you don't mind low brightness.  You'll have to weight the consequences of device failure against the extra effort of doing something different.




Go Up