Capacitor to prevent reboot on motor start? What size and where?

I'm using an Arduino Mega in a robotic sailboat. It uses three voltage regulators to step up the lithium battery output to 5, 7.5 and 12 volts. The 7.5 and 12 volt lines each supply a motor controller that drives a reversible DC motor.

With the 7.5V line connected to the arduino's normal power connector, everything worked fine as long as the arduino was still USB connected to my PC. Removing the USB connection resulted in the arduino rebooting nearly every time that the 7.5V motor turned on.

I figured that the current draw was dropping the 7.5V line low enough to reset the Arduino. To test this, I powered the motor controller from a separate power supply, leaving the arduino on the 7.5 alone, and that works reliably. I'm thinking that what I need is a capacitor across the Arduino's power input, to shield it from the voltage drop when the motor kicks in.

Is this correct? What size and type of capacitor (ceramic or other?) would you recommend, and can I wire it between the 7.5 and ground lines going into the jack that plugs into the regular power port?

I thought about doing capacitors at the motors, but with them being reversible brushed motors it seems that safeguaring on the arduino power side makes more sense. Any advice welcome.

Evidently the 7.5 V regulator cannot handle the motor startup (stall) current. It is never a good idea to power a motor and an Arduino from the same line, as voltage spikes from the motor could damage the Arduino and/or its on board regulator. The best approach is to have a separate battery for the Arduino. If that is not possible, then assuming that the battery is capable of handling the maximum current draw of all components, I suggest a separate 5V regulator to power the Arduino directly (bypassing the barrel jack).

Or hack a USB cable and bring 5V in thru the USB connector.

The application is for a robotic sailboat on an autonomous trans-atlantic attempt, so external power from a USB won’t be an option.

It has a fairly elaborate parallel system of batteries, solar panels and chargers for redundancy, so I’d like to avoid a separate battery.

I do have three voltage regulators, and one of them is 5.0V for the satellite modem, which has a huge capacitor to avoid sudden current draws when it transmits. I had planned to eventually go to 5V for the arduino directly, sound like I should just do that now.

Sounds like an interesting project!

CrossRoads meant to cut a USB cable, and use it to power the Arduino through the USB port by whatever 5V source you have. This method has the advantage of a resettable fuse in series with the power supply. http://forum.arduino.cc/index.php/topic,196149.0.html

Could a super capicitor do the job?

Otherwise I would swap out the regulator for something thats up for the job.

Supercapacitors are intended for low current draw only, but I agree that the regulators chosen are not up the task in either case. Capacitors are a poor solution to a regulator dropout problem.

Get another 7.5 volt regulator and run it off the same battery you already have.

The current the motor takes on starting, would be enough to pull the voltage down on the regulator you have, but it is unlikely to be pulling the battery voltage down very far ( unless it is a diesel starter motor, or something ). A separate 7.5 voltage regulator powering the arduino should then be fine.

You would put the capacitors (large value electrolytic type) across the arduino +5v and arduino ground. If you are using the 7805 type regulator chips, then you should consider replacing these with UBEC regulators (check ebay) for higher current and more efficient operation.

The problem persists, but is now intermittent. Let me outline the power system:

3 Lithium battery packs, 6600 mAh each. Each plugged into it's own volt/amp monitor chip and solar panel charge controller. Each solar charge controller has its own solar panel, and the load output runs through a separate diode for each charge controller. (3 parallel, entirely indpendent power sources, so it can run as long as one battery/panel pair survives.)

After the 3 diodes, the raw power line (2.5 - 6V depending on charge and sunlight) goes to three regulators: a buck/boost for 5.0V, and boosters for 7.5 and 12. The 5V powers a cellular modem (and later it will be a satellite modem), the 7.5 and 12 are routed to two motor controller chips to drive reversible brushed DC motors.

With the arduino pulling power from the 7.5V line, it rebooted nearly every time the 7.5V motor was used.

With the arduino now pulling power from the 5.0V line via a USB plug, the 7.5V motor seems to work fine, but the 12V motor causes a reboot about half the time. So it's not just a regulator being too small, the 12V motor is doing something that reboots the Arduino via the 5V regulator.

I really want to avoid doing a separate battery for the arduino, the parallel fault tolerance is crucial for a four to six month autonomous voyage. Any recommnedations on what to try next? My thoughts:

  1. A huge capacitor across the 5V and ground wires going into the Arduino's USB connector, to stabilize its input voltage while the motors start.
  2. A huge capacitor attached to each of the two motor controllers, connecting to VMOT (7.5 or 12V input line) and ground. (Can't do this at the motors because they're reversible.)
  3. Failing that, a small capacitor across each motor's terminal to reduce whatever noise/interference it might be causing...althoug the motor and arduino are separated by a motor controller.
  4. Long shot - maybe some software modulation of the signal to the motor controllers, rather than jumping to 100% PWM immediately? Seems like the start-up spike would still be a problem.

If these make sense, and recommendations on the size or type of capacitors to use?

Your posting leaves lots of questions about the setup.

What do you mean by a "battery pack"? Are these single cell LiPos and if so, what is the maximum current draw? Also, how do you get 2.5-6V as "raw power"?

If multicell packs, why do you need 7.5 and 12 V boost regulators? These voltages would be close to the output of two and three cell packs respectively.

What are the stall currents of the motors?

It is always a good idea to have reasonably large capacitors (100-200 uF) across motor driver power leads, as close to the driver board as possible. This is especially the case if you have long power leads (i.e. longer than a few cm) as the inductance of the leads themselves can lead to large voltages spikes during switching. See this informational posting from Pololu Pololu - 1. Introduction

You should look at all signal, power and ground lines with an oscilloscope. The reboot could be caused by the battery voltage dropping to below the minimum regulator input voltage, by spikes on any of a number of signal lines, or spikes on ground lines due to ground loops. Properly decoupling power supplies can be a difficult task.

I could be mistaken but I think if you power Arduino with 5V the regulator will not like that, because don't you have to have several volts above your output voltage (so like 7V minimum) for the regulator output to be a steady 5V?

Or is that only if you use the barrel jack?

There is no need for a separate battery if the motor's supply is decoupled correctly:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Do you also have a diode across that motor?

I don’t understand the need for 3 independent power sources, when the lack of redundancy
here is with the motors (I presume the 7V and 12V motors perform separate tasks and are
both essential.

Anyway I’ve first check you’ve got thick enough wiring and that there isn’t a dodgy
connection - if all the regulators are powered from the main power rail which is
derived from high capacity lithium batteries I can’t see the main power rail dipping
(have you measured this).

If the 12V motor genuinely is causing the rail to dip too low then you’ll need to be
more intelligent about controlling the current to that motor.

Have you looked int this being an EMI issue yet? There are filters that can be added to the motor controller to help if this is the case.. Where is the motor and motor controller in relation to the arduino? What kind of controller? Same ground plane or isolated?

I had a similar issue trying to control 3 garage doors with the arduino.. I was using optoisolated relays and randomly one of the garage doors would reset or lock up the ardunio/ethernet shield.. If I used a separate power supply for the arduino and the relays the problem mostly went away.. What fixed it was using snubbers or filters across the relay contacts.. I used the ones listed below.. I'm not the seller, nor am I suggesting you buy from this seller, merely use the link to see what I am talking about so you can research this a little bit yourself..

http://www.ebay.com/itm/4-pcs-Noise-Suppressor-Capacitor-0-1-mfd-300VAC-WPX-104K-/150694540699?pt=LH_DefaultDomain_0&hash=item231618359b

a buck/boost for 5.0V, and boosters for 7.5 and 12. The 5V powers a cellular modem (and later it will be a satellite modem), the 7.5 and 12 are routed to two motor controller chips to drive reversible brushed DC motors.

I don't think a boost regulator will actually power a motor of any size. How low does the voltage drop when the motor starts.