Power Problem of Arduino Board

Hi,

When arduino board experiences some jerk in electricity or when the power goes off for just a moment and energized again the arduino board, Ethernet shield stops working and i get nothing on the web page until i plugged off the usb (power) cable of arduino and then plugged on again.

Please help me to resolve this problem.

Thanks.

Power supplies must be stable to ensure a stable process executing your sketch.

Which means you have to make sure that your Arduino is powered continuously without having spikes or short interrupts of the power rail. Depending on the kind of "noise" your Arduino has to deal with there are some technical solutions:

  1. Simplest one:
  • use an electrolytic capacitor (let's say 1000 .. 2200 uF) between +5V and GND to bridge the power outages
  • with a parallel ceramic capacitor of 100pF .. 470pF to catch the spikes

Depending on the kind of spikes the value mightbe higher or lower, but normally not smaller than 47pF and not bigger than 10nF.

  1. A little bit more complex
  • use a rechargeable battery powering the arduino being charged as long as the power plant is still delivering power (needs a bit of electronic around not just parallel wiring!)

Here you can find a simple solution

rpt007:
Power supplies must be stable to ensure a stable process executing your sketch.

Which means you have to make sure that your Arduino is powered continuously without having spikes or short interrupts of the power rail. Depending on the kind of "noise" your Arduino has to deal with there are some technical solutions:

  1. Simplest one:
  • use an electrolytic capacitor (let's say 1000 .. 2200 uF) between +5V and GND to bridge the power outages
  • with a parallel ceramic capacitor of 100pF .. 470pF to catch the spikes

Depending on the kind of spikes the value mightbe higher or lower, but normally not smaller than 47pF and not bigger than 10nF.

  1. A little bit more complex
  • use a rechargeable battery powering the arduino being charged as long as the power plant is still delivering power (needs a bit of electronic around not just parallel wiring!)

Here you can find a simple solution

Thanks.. It means that i have to provide continuous power to arduino board ? (It is difficult, sometimes power goes off and on again). Because when the power goes off and on again, Ethernet shield stops working until i to go to a room and insert the usb cable (power) again into the arduino board and then it shows the data on web page.

Can this problem be resolved?

Thanks in advance

How long is the power off period? Seconds/minutes/hours?

  • If less than a second - the simple solution should do
  • if the outage is longer than a few seconds, you will have to calculate the value of a suitable capacitor, which can deliver long enough power, so that the voltage drop doesn't go lower than something like 4V, maybe down to 3.8V to keep the processor still alive
  • here are some useful links:
  1. Minimum Voltage for Arduino processors
  2. How to calculate time and voltage drop of a discharging capacitor

The capacitor (don't forget the little ones for the spikes) is to be connected to Arduino's +5V and GND pins and not to Vin, as Vin is "before" the voltage regulator.

  • If the power outage lasts longer than, let's say, some minutes and could not be bridged by a very big capacitor, you should go with the rechargeable battery as recommended in my previous post.

The rechargeable battery will be always connected to your mains power supply, and is a backup, which could bridge hours of mains power outages, depending you have designed it big enough, so the battery's capacity can deliver the current needed by your project.

So, if your configuration is running at 5V and draws 100mA continuously, a 5000mAh battery can survive about 5000mAh/100mA = 50h theoretically (I would calculate with 20% less to be on the safe side - which still survives a mains power outage of 40h).

One more question:
you say you have to unplug and plug again the USB cable to wake up your ethernet shield after a power outage? So my question is:

  • Is your Arduino powered through a USB cable from a PC or laptop?
  • If so, I would suggest to connect the (pre-calculated) capacitors (big one plus small one in parallel) to the +5V and GND of your Arduino whether you are powering the project just via USB cable or wall outlet.
  • ii might also help to buy a distortion filter which are normally used in cars to keep spikes away from electronics

One more useful link:
USB-Power and Reset Issue

Thanks. It helps..

I am glad to read that,
but:

it helps

To help other users:
WHAT helps?
There were some recommendations and we are interested to get to know what solved your problem actually?

@rpt007 My arduino remains off for some seconds like 60 sec. Secondly i am powering my arduino through USB cable to my laptop.

I am following your capacitor solution and in a process to calculate the value of capacitor. Using your mentioned link i used the equation Q=CV.

My Load might be of 10mA (smoke + temp. sensor) so,

I.t = CV

10mA x 1 sec = C x 5V

C = 2000uF. Is this correct? should i connect this value to +5V and GND to arduino?
Thanks

  1. Arduino itself draws some current so you have to add this as well; I have no idea how much that is, but I guess it will also be in the magnitude of 10-20mA (never measured that) plus your ethernet shield, if I am not mistaken.

  2. I strongly suggest NOT to continue powering your project through USB from laptop.
    Reasons:

  • do you know the quality of your USB cable (there are huge differences, i.e EM shielding etc.)
  • laptop itself could be a source of failure due to windows doing some background activities, running into timing issues to serve the USB connection etc.

Thus I suggest to go with a good quality DC wall wart adapter of 9V plus 2200uf or 4700uF capacitor from +5V to GND on the Arduino. Pls pay attention to the polarity of the capacitor to avoid explosive reactions.

Hi,
I think we need to see the big picture.
Why does your USB supply "jerk"?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

A picture of your project would also help.

Please show everything you have connected to your arduino and how you are supplying power?

Thanks.. Tom... :slight_smile:

rpt007:

  1. Arduino itself draws some current so you have to add this as well; I have no idea how much that is, but I guess it will also be in the magnitude of 10-20mA (never measured that) plus your ethernet shield, if I am not mistaken.

  2. I strongly suggest NOT to continue powering your project through USB from laptop.
    Reasons:

  • do you know the quality of your USB cable (there are huge differences, i.e EM shielding etc.)
  • laptop itself could be a source of failure due to windows doing some background activities, running into timing issues to serve the USB connection etc.

Thus I suggest to go with a good quality DC wall wart adapter of 9V plus 2200uf or 4700uF capacitor from +5V to GND on the Arduino. Pls pay attention to the polarity of the capacitor to avoid explosive reactions.

OK now i will try with the capacitor.
I would like to repeat that in the beginning of my project, i was powering my arduino with USB adapter and when the power goes off and on again, ethernet shield stops working until i unplug and plug again the USB cable into adapter.

when the power goes off and on again, ethernet shield stops working until i unplug and plug again the USB cable into adapter.

I suppose it's the main power which goes on and off?
So I am still doubtful about your laptop not being able to have a working battery which normally should survive mains outages a bit of time - if the battery is not working anymore then that is what could produce or let through some spikes on your USB cable.

That somehow kills the communication between Arduino and ethernet and shoots your program into an undefined state which only recovers when you plug/unplug the USB (=power supply) cable => reboot.

But, as @TomGeorge said, it would be useful if you could give us the full picture with EVERYTHING which is connected to each other in your project including all devices which are wired including the power cord connected to your mains.

Hi,

I would like to repeat that in the beginning of my project, i was powering my arduino with USB adapter and when the power goes off and on again, ethernet shield stops working until i unplug and plug again the USB cable into adapter.

Power= what do you mean?
Is it your main AC power, if so then doesn't your whole ethernet system go down as well?

Tom... :slight_smile:
A picture please...

Yes it the main power and when the main power goes off and on again, my whole Ethernet system goes down until i unplug and plug the power cable (black cable in picture) to arduino. ( In this case Arduino is not connected to laptop, powered by wall adapter)

@TomGeorge , @rpt007 Here are the pictures.

What is connected with TX-Pin (white cable)?

and:

you did not yet answer my previous question about the time of the outages.
Is in the magnitude of seconds, minutes or hours?

Maybe you have to go with a mains powered battery which is charged while mains is ok and bridges the outage when mains are gone.

rpt007:
and:

you did not yet answer my previous question about the time of the outages.
Is in the magnitude of seconds, minutes or hours?

Maybe you have to go with a mains powered battery which is charged while mains is ok and bridges the outage when mains are gone.

White cable is connected to digital pin 2 for temperature sensor. And outage time is about 15 to 20 seconds.

White cable is connected to digital pin 2 for temperature sensor and power outage is about 15 to 20 seconds.

I faced another problem during process, my Tx light of arduino board suddenly stops working however Rx light working fine. Please guide.

  1. Generally it is no good idea to use RX or TX pins in an Arduino project if it is not necessary. TX/RX are used for serial communication and while loading a sketch up to the MCU; if you have other pins available, stay away from the RX/TX pins (you may modify your sketch accordingly)

  2. Outages of 15 to 20 seconds are way too much being bridged by a capacitor of a reasonable size.
    Depending on the overall power consumption of your project, which imho will be around 50mA and up, you can calculate the time that a capacitor of 4700uF can bridge to go from 5V to 4.32V (this is the absolute minimum to operate an Arduino by a reduced speed (MHz)).
    This calculation will be in the magnitude of ms(!) and not at all close to only one second!

  3. Hence the only advice I have for you: go with a chargeable battery to bridge the outages. In reply #2 I included a simple circuit for using the wall adapter to charge the battery while the mains is available and the battery taking over for the period of time when mains is gone. Think of a small capacitor (1nF .. 100nF) to avoid spikes being produced by your mains when it goes on or off - the value of the capacitor - this is something you should experiment with, as I have no clue what kind of spikes your mains is causing for you project.

In your picture it is not clear to see what other connections you use to other devices.
Could you pls tell us, how the wires on the right side of the Ethernet shiled are used.

I would prefer your answer in the following form:

Ethernet shield wire color Destination
A0 red ??
9V orange ??
GND brown ??
?? blue ??

My table is only a guess, pls correct.

rpt007:
In your picture it is not clear to see what other connections you use to other devices.
Could you pls tell us, how the wires on the right side of the Ethernet shiled are used.

I would prefer your answer in the following form:

Ethernet shield wire color Destination
A0 red ??
9V orange ??
GND brown ??
?? blue ??

My table is only a guess, pls correct.

Ethernet shield wire color Destination
A0 red Smoke sensor
9V orange Supply to sensors
GND brown + blue GND to sensors