Raspberry Pi 4 restarts for under voltage

Hi everyone! I’m new on DonkeyCar community!

I’ve just bought an starter kit with a Raspberry Pi 4, which I’ve already built and calibrated it smoothly. The problem comes when driving the car. I’ve just tried the user mode and the card responds fine from the web interface but after a few seconds, the Raspberry restarts and the connection is lost. The battery is the NiMH one that comes with the starter kit, a 7.2 V 6-cell 1100 mAh, which has to power both the ESC and the RPi 4, the latter one via the step-down DC-DC 5V/2A converter. This means that the battery (whose C-rate I don’t know) has to power everything. I know this converter thing is quite a new feature in Donkey but I guess it has been tested and should work…

The syslog of the Raspberry warns a couple of time with the following messages until it finally turns off:
Under-voltage detected! (0x00050005) / Voltage normalised (0x00000000)

Using a voltmeter and a clamp amperemeter I managed to monitor the voltage and currents that the Raspberry and ESC receives. The shutdown happens when the ESC is drawing a bit more than 2.2 A from the battery, which happens sometimes when accelerating (not an agressive driving). At this point, the input voltage at the DC-DC converter fails from the battery’s ~7.5-8.5 V to below 7 volts, which translates into an output voltage slightly below 4.8 V and the RPi dies (converter needs input >6.5 V).

I don’t know if it is because the battery has a too low maximum discharge current (C-rate, but it is not know for this battery) that causes this… the ESC seems well calibrated and I tried with different PWM ranges so the motor is not consuming that much power… but it did not work…

I’d be very grateful if someone can tell me what could be happening… and/or how I could solve this…

I have two options in mind, one is placing a 8.4 V battery and see if the voltage drop is not enough to kill the RPi this time… or another would be soldering a quite big capacitor across the 5V-GND output from the DC-DC converter and see if it helps… Anyway, I don’t think this should be happening… :S

Thank you very much,


You are not going to get very far with only a 1100 mAh NMHi battery.
Is that the biggest NMHi battery that will fit in your Donkey Car?
Also, the DC-DC converter is probably shutting down when the battery voltage sags as the motor starts up or comes under a heavy load like speeding up.
I power my Rpi separately with a phone charger 5vdc Li-Ion battery like the one here.
Also, you might like to visit us at Donkey Car here.

1 Like

Hi, the thing is I needed to use the same battery for powering both the ESC and the Raspberry Pi 4, and this battery had to be a NiMH one, as I’m pretending to use a wireless charging station I’ve built and it has been designed to work safe with Nickel batteries…
I finally pretty much solved the issue (RPI does not turn off but sometimes red PWR led does turn off) by replacing the battery (and charger) with a NiMH 7-cell 8.4 V 1600 mAh pack that fits pretty well into the car… when the voltage drops occur, now the input voltage from the DC-DC converter never goes below 8 V and the RPi is kept alive

you are going to want to separate the rPi battery supply from the car battery supply. The rPi4 take lots more power than the rPi 3 and then you have seen what loading the battery with the ESC/Car does to the battery voltage.

otherwise you’ll need a large Lithium battery, a bunch of new connectors, a lithium battery charger, a fire proof bag and a fire box to charge, store and transport the lithium battery(s) in. Not to mention a 5V 3A converter is probably a better choice than 5V2A.