Arduino Forum

Using Arduino => General Electronics => Topic started by: fruitcup on Feb 28, 2016, 12:53 am

Title: Not enough current from power supply?
Post by: fruitcup on Feb 28, 2016, 12:53 am
Hi. I am using Mean Well IRM-10-12 (https://www.meanwell-web.com/en/product-info/ac-dc-power-supply/pcb/irm-10/product/IRM-10-12) power supply to convert 120vac to 12vdc in order to power my project from a wall outlet.

I am using a custom-built ATmega328 board. I used a 7805 linear regulator to convert the 12v to 5v.

I am also using an ESP8266 wifi module. I use another linear regulator to convert from 5v to 3.3v.

The only other components connected are 8 NeoPixel LEDs (https://www.adafruit.com/products/1655).

The Mean Well power supply is rated for 0.85 amps. If I assume that the ESP uses 300mA, the LEDs use 150mA total, and the Arduino uses 200mA, the power supply should still be far in excess of what is necessary.


The problem is that when I plug in the ESP wifi module, the ATmega sporadically resets as if it is drawing too much power.

If I plug the board directly into a 12v power source (and bypass the Mean Well AC->DC converter) then the board works perfectly. This leads me to believe I am using my power supply incorrectly.

Here is a schematic showing how my power supply and 5v regulators are hooked up.
(http://i.imgur.com/5s4022M.png)

Any ideas would be appreciated. Thanks!
Title: Re: Not enough current from power supply?
Post by: Grumpy_Mike on Feb 28, 2016, 12:57 am
Quote
the ATmega sporadically resets as if it is drawing too much power.
That is not the only cause of random resets.

You have to test what the power supply is giving you using a meter but better would be an oscilloscope because that would show the dips and if you had too much ripple.
Title: Re: Not enough current from power supply?
Post by: fruitcup on Feb 28, 2016, 01:00 am
That is not the only cause of random resets.

You have to test what the power supply is giving you using a meter but better would be an oscilloscope because that would show the dips and if you had too much ripple.
Using a meter, everything appears to be constant (I can't see any dips in any of the 3 voltages). I unfortunately don't have an oscilloscope to examine that further.
Title: Re: Not enough current from power supply?
Post by: larryd on Feb 28, 2016, 01:05 am
Try changing C3 to 1000uf.
Also add  .1uf close to the regulator input to ground.
.
Title: Re: Not enough current from power supply?
Post by: MarkT on Feb 28, 2016, 01:19 am
0.65A from a supply with a maximum output of 0.85 does not really count as the supply being "far in excess
of what is necessary".  Allowing for inrush current it seems adequate though.

You would do much better to derive the WiFi supply from the 12V with a DC-DC converter, not a chain
of linear regulators, as that is much more efficient.

How hot is the 7805 getting?  Perhaps its shutting down from overtemperature?
Title: Re: Not enough current from power supply?
Post by: Boardburner2 on Feb 28, 2016, 01:23 am
The problem is that when I plug in the ESP wifi module, the ATmega sporadically resets as if it is drawing too much power.

you have a multimeter, have you measured what the power consumption is of the various parts ?
Title: Re: Not enough current from power supply?
Post by: fruitcup on Feb 28, 2016, 01:37 am
Try changing C3 to 1000uf.
Also add  .1uf close to the regulator input to ground.
.
I will try to pick up the 1000uF cap tomorrow and try it. I don't have any on hand.

0.65A from a supply with a maximum output of 0.85 does not really count as the supply being "far in excess
of what is necessary".  Allowing for inrush current it seems adequate though.

You would do much better to derive the WiFi supply from the 12V with a DC-DC converter, not a chain
of linear regulators, as that is much more efficient.

How hot is the 7805 getting?  Perhaps its shutting down from overtemperature?
Yeah it probably isn't great to chain them like that. Maybe that is my problem. I made it like that because of space constraints on the circuit board.


The 7805 is cool to the touch. Nevermind, I can't touch it after it runs for a while. However, initially it was cool and it was still randomly resetting.
you have a multimeter, have you measured what the power consumption is of the various parts ?
Sadly, the fuse in my meter seems to be bad. I've never actually measured current with it so I had no idea until now. I'll definitely be ordering a replacement now.
Title: Re: Not enough current from power supply?
Post by: larryd on Feb 28, 2016, 01:40 am
Buy a box of fuses for your meter ;)
.
Title: Re: Not enough current from power supply?
Post by: sterretje on Feb 28, 2016, 05:54 am
Spontaneous resets can also be a coding issue. Just to make it more complicated ;)

Anyways, what happens if you don't use the NeoPixel? So if Arduino plus Neopixel does not reset and Arduino plus esp8266, you can very well have a power issue.

Replace the functions in code by Serial.print / Serial.println when you leave the Neopixel out.
Title: Re: Not enough current from power supply?
Post by: Paul__B on Feb 28, 2016, 08:05 am
Well it is as simple as this.

You are using the completely wrong power supply.

If you want to power NeoPixels and Arduino devices, you want a 5 V regulated supply such as the Mean Well IRM-10-5 (https://www.meanwell-web.com/en/product-info/ac-dc-power-supply/pcb/irm-10/product/IRM-10-5) to feed them directly - via the 5V line on your Mega328 board.  That would be quite adequate.

Yes, the ESP8266 draws a few hundred milliamps on impulse.  You need a sub-regulator (series is fine, no point using switchmode) capable of providing that and/ or a decent capacitor (470 µF) directly across the ESP8266.

Just get the proper power supply and do the job properly!  Then no need to complain here. :smiley-roll:
Title: Re: Not enough current from power supply?
Post by: Grumpy_Mike on Feb 28, 2016, 08:29 am
Try it simply leaving out the LEDs there is no need to change the code at all just don't connect them.

If that does cure it then you can always rewrite your code so they are only say half as bright.