[please don't downvote, just let me know what infos are missing]

I built my second robot and I always end up with the same issue ...

The CPU board always resets when a high rush of current is demanded by the motors from time to time.

I use one battery to feed:

  • a Raspberry PI 4 (had the issue with an Odroid board)
  • 9/12 V motors
  • RPI USB devices (webcams, audio , lidar...)
  • Arduino micro + pololu mc33926 H bridge

How can I avoid this CPU reset?

  • Adding a capacitor on the CPU board side or something?
  • Adding a secondary battery? Which means more weight (my Li-ion is 200g, I now use a power bank, it's 400 g)
  • Splitting USB connected devices power to avoid the PI providing 5 V to peripherals?
  • Something else I haven't thought about?

The powerbank has multiple outputs, not clear if they can be used simultaneously?

Thanks for your inputs


I use 3 x 2577 buck dc-dc to power

  • RPI with 5.1V 3A
  • 5V for gen purpose power
  • 9V for 2xlego PF XL motors

power supply:

  • Romoss Sense 6PS Pro 20000 mAh Power Bank, PD 30 W
  • Aideepen Type-C USB-C PD2.0 PD3.0 duper to get 5 V/5 A (in theory)




enter image description here

  • 2
    \$\begingroup\$ Use separate supplies to the motors - they have high current draws that can draw down the supply voltage causing problems to other sensitive devices. The power supply to those small devices can be relatively small as it only supplies a low power load. Do a test using separate supplies to see if it stops the reset issue, if it does then find a combination of 2 batteries that meets your mass limit. \$\endgroup\$
    – Solar Mike
    Nov 9, 2023 at 9:16
  • 1
    \$\begingroup\$ My gut feel, the battery is too small. Need schematics and scope plots, both voltage and current. Since you probably don't have a current probe, you will need to add shunt resistors on the low side. \$\endgroup\$
    – Mattman944
    Nov 9, 2023 at 9:16
  • 2
    \$\begingroup\$ You need to post a simplified schematic. It could either be a supply issue or an EMC issue. Start by probing the 5V supply with your scope, to see if it drops when the motors are activated. That being said, it never hurts to hook up a big aluminum electrolyte on the supply input, for as much inrush current as you dare. 500uF to 1mF somewhere. \$\endgroup\$
    – Lundin
    Nov 9, 2023 at 10:52
  • 1
    \$\begingroup\$ What diagnostic tools do you have available? A multimeter I hope, but what about an oscilloscope? \$\endgroup\$
    – Chris H
    Nov 9, 2023 at 12:10
  • \$\begingroup\$ Probably layout and/or decoupling capacitor related. Please post both schematic and PCB layout. \$\endgroup\$
    – winny
    Nov 9, 2023 at 12:33

3 Answers 3


Analyse the actual cause of the problem with a scope. Until you do that everything is speculation and guesswork.

Look at the supply going to the uC first and get a capture of the supply rail dip when the motors switch on. Then look at the input side of the DC-DC converter. How low does the supply go and for how long? What about when the motor is running- is the supply OK then?

Some possible causes and their possible solutions:

  • inadequate supply decoupling. Fix: add large reservoir caps near the DC-DC converter input, along with low forward voltage (schottky) diodes to prevent current going back from the caps to the battery when it dips.
  • voltage drops on the wiring - when the motor kicks in, maybe it isn't that the battery drops out, but that the resistive drop across the wiring is enough to make the DC-DC drop out. Fix: improve the wiring, especially you need star wiring from battery to motors and controller board.
  • battery really is not strong enough to keep the supply up when motor starts. If it is ONLY at start - you MIGHT still be able to workaround with heavy reservoir caps. But a different battery (either greater Ah OR maybe lower internal resistance) is most likely fix. Separate batteries is also very worth considering, and maybe the most robust solution, but obviously there are other system level considerations.
  • DC-DC converter is not low dropout. Fix: change it for a better one.

Some combination of these approaches might be needed to get reliable operation under all conditions.

  • \$\begingroup\$ thanks but how would a DC-DC boost would have "low drop out" ? I can set the output voltage anyway \$\endgroup\$
    – phil
    Nov 9, 2023 at 22:37
  • \$\begingroup\$ also how would I use large caps before the boost ? just rail to rail ? what values ? \$\endgroup\$
    – phil
    Nov 9, 2023 at 22:50

Add there a diode before dc-dc converters. High current to motors is sucking out the energy from the dc-dc input capacitors. And if it's not enouh add there more input capacitance to dc-dc converters.

  • \$\begingroup\$ Did you know that diodes have this parameter Vf that means there's a voltage drop? \$\endgroup\$
    – MiNiMe
    Nov 9, 2023 at 13:37
  • \$\begingroup\$ how about shotkeys ? \$\endgroup\$
    – phil
    Nov 9, 2023 at 22:33

Answering one point regarding battery packs:

I've had several battery packs with dual outputs. All have allowed both to be used at once. This may or may not help in your case, depending on how much of the output circuitry is common. They can be:

  • wired in parallel, sharing everything.
  • independent, sharing nothing but the connection to the actual battery (which is hopefully thick enough not to drop much under load).
  • something in between, such as common input capacitors

In the first case, using 2 outputs won't help at all. In the 3rd, it probably won't help. In the 2nd it's worth a try. Without opening it up, you can't know what's going on inside, but you can test it. A good sign is if you have a high current and a low current output. I have one with a 1A port and a 2.4A port, and I'd expect a good chance of success running my RPi3 off the 1A port, and the higher load off the other port (which you're probably overloading anyway).

A few further debugging/wiring tips:

  • You need to check what's cutting out and resetting the RPi:
    • Is it that the input voltage to it's voltage converter drops below the spec? This could mean it cuts out completely, or that the output voltage drops in an uncontrolled way.
    • Is the battery pack cutting its output when it detects excessive current draw? If you have an oscilloscope, you can use that to check the transient voltage at various points. Even a pocket scope is good for this sort of thing. If not, it might be worth wiring an LED and resistor to run off 5V, and connecting that as an indicator. Look for blinking off or dimming at each power connection.
  • I suspect you're using an off-the-shelf voltage converter module. The specs on these can be a bit vague especially if they're of the amazon special variety (or even outright lies). OTOH they can serve well in hobby projects after testing
  • You're wasting power in your voltage converters, when they're just doing 5V-5V. The output of your battery pack should be just as good as their output. You may be better off without using them for everything.
  • Are you starting motors simultaneously? Motors have a startup current far greater than they draw when running steadily. This will lead to a voltage drop in any shared wiring. That voltage drop will be greater if you start more motors simultaneously. Even 1/4 second offset between starting motors would help.
  • You're wiring together a bunch of modules. You're probably using quite thin wires. Go bigger for anything in the power path to the motors, and especially in the shared power path.

And one trickier suggestion, largely software-based:

  • See whether your motor driver will do a soft start (at the expense of initial torque). It can do PWM, so you may be able to ramp the PWM to do a software-based soft start, reducing the startup current and spreading it over a longer period. You'll probably want some decent size capacitors on the input to the motor driver board, quite possibly an LC filter taking into account your PWM frequency.
  • \$\begingroup\$ I was just going to say a bit about battery packs, but then I started thinking... \$\endgroup\$
    – Chris H
    Nov 9, 2023 at 12:11
  • \$\begingroup\$ yeah I doubled my wires, I was also thinking about gradualy doing PWM for th emotors instead of a on off switch \$\endgroup\$
    – phil
    Nov 9, 2023 at 22:32
  • \$\begingroup\$ I had the feeling that the battery could only output 3A max, having a RPI consuming like 0.700 A on average doing nothing, and motors stalled going up to 2.5A the, it's a tad short \$\endgroup\$
    – phil
    Nov 9, 2023 at 22:44
  • \$\begingroup\$ also the reset happens when one motor turns cw and the other one ccw, having the robot rotate left or right, needing quiet a lot of force, I believe using separate outputs or capacitors could help against the current peak \$\endgroup\$
    – phil
    Nov 9, 2023 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.