I'm trying to make a Tamiya Blackfoot RC car run on a Raspberry Pi.

I've written a small C program for controlling the servo and the ESC/motor with a wireless gamepad. Everything is working fine when RasPi is getting its power from a separate power source (mains), but with the RC battery some problems occur.

When RasPi is connected to the RC battery (via 3A/5V UBEC) the servo control works but I have to be very careful when controlling the motor. If I accelerate too fast, at least one of the following will happen:

  • WiFi dongle can't get enough power
  • Joystick receiver can't get enough power
  • Raspberry Pi reboots

I tried adding a 2200 μF electrolytic capacitor to prevent the brownouts, but it didn't seem to do the trick. I'm not (yet) very good with electronics so can you please tell me if there's anything to do to make the Raspberry car run without a second battery?

Here's a picture of the current setup. Please note that the voltage regulator is actually a 3A/5V UBEC, the resistors are 1 kΩ each, the cap is 2200 μF, and the motor controller is the closest to ESC (TEU-104BK) I could find.

Breadboard view


Thank you for your attention. I feel so stupid.. I forgot the 7.2V connection from the battery to the ESC from the image. Updated the image.


  • Input voltage: 6.6-7.2V
  • Max. continuous current (FET spec): Forward 60A

Motor (RS-540SH-7520)

  • Operating range: 4.8~7.2 V
  • Nominal voltage: 7.2 V
  • Current no load: 2.4 A
  • Current at maximum efficiency: 13.0 A
  • Output at maximum efficiency: 63.2 W
  • Current stall: 70.0 A

Servo (Tower Pro MG995)

  • Operating voltage: 4.8~7.2 V
  • Current Drain (4.8 V): 8.8 mA/idle and 350 mA no load operating
  • Current Drain (6.0 V): 9.1 mA/idle and 450 mA no load operating

Battery (HPI Racing Plazma)

  • Voltage: 7.2 V
  • Capacity: 3300 mAh
  • Cells: 6
  • Brand new (I've got two of these)

Raspberry Pi GPIO

  • Output voltage: 3.3 V
  • Max current for pins 18 & 23: 16 mA each
  • \$\begingroup\$ To get a good answer of this you might need to include a few links to the datasheets on the items actually used and a photo of how it's actually constructed. If the motor draws a few amps it's at the stage when voltage drops come into play depending on cabling and assembly etc. One simple thing that might well solve it is to use a 2nd regulator for the Pi. \$\endgroup\$
    – PeterJ
    Nov 24, 2013 at 9:26
  • 1
    \$\begingroup\$ What's the current specification for the battery? They often have a "C rating" printed somewhere. Also how old is the battery? \$\endgroup\$
    – AndrejaKo
    Nov 24, 2013 at 11:36
  • 2
    \$\begingroup\$ Raspi's in general are a bit funny about their power. Even on the bench they can get tetchy even with PSU's that are supposedly correctly rated for them. That combined with the loads elsewhere being right at the edge of the maximum recommended 100mA USB port output (many USB Wifi devices top out while broadcasting at over 150mA.) You may want to look at breaking out the USB power (pin 1) lines to provide your own power supply direct to the USB devices in place of the Raspi. \$\endgroup\$ Nov 24, 2013 at 15:41

2 Answers 2


Your decision to use a capacitor was the correct idea, but that one is much too small.

It's unclear what model you have, but your RPi probably consumes between 700-1000mA. However, if you calculate that 2200uF capacitor's discharge curve for 5V @ 700mA, it's only going to delay a brownout for maybe a millisecond before it drops below the RPi's minimum 4.75V. And that's assuming your battery is brand-new and fully charged.

That RS-540 motor can draw a massive amount of current for a few seconds when starting or stalled, and that capacitor will be discharged long before it's over. Some motor controllers I've seen designed for the RS-540 are rated to handle 30A for 5 seconds.

Another option is to use a battery with a larger mAh (in addition to a larger capacitor) that can handle higher current draws.

You may still want to consider a second battery so the RPi can remain functional even after the motor battery has been completely exhausted.

  • \$\begingroup\$ Thanks for your good answer. I ended up using a separate battery for the Pi and everything works now. The only downside is the weight added by the 2nd battery. \$\endgroup\$
    – miq
    Dec 23, 2014 at 7:16

It is uncertain what the exact cause is for malfunctioning, either high frequency noise caused by the motors or a plain power sag due to high current. Here are some pointers:

  • Does the motor actually have to be run from 5V? Why not run it directly from the battery?
  • Consider a separate regulator for the RPi.
  • Connect a small capacitor (220nF) very close to the motor, to decouple spikes.
  • Connect a 100nF capacitor in parallel to the 2200uF electrolytic capacitor to suppress high frequency noise.
  • \$\begingroup\$ One arrangement of capacitors I've seen on motors is two capacitors from power contacts to motor body plus one directly soldered to the power contacts of the motor. \$\endgroup\$
    – AndrejaKo
    Nov 24, 2013 at 11:33
  • \$\begingroup\$ @AndrejaKo like an H-bridge but built from capacitors? And a fifth directly across the motor terminals? \$\endgroup\$
    – jippie
    Nov 24, 2013 at 11:35
  • \$\begingroup\$ Actually this setup had 3 capacitors per motor and was used in RC aircraft. I have it in a question somewhere, I'll see if I can dig it up. Edit: Here it is. I think that the H-Bridge setup would be worth investigating as well, since money probably isn't an issue here. \$\endgroup\$
    – AndrejaKo
    Nov 24, 2013 at 11:37

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.