A few beginner's questions regarding a Raspberry Pi Robot

I am new to electronics and looking to build a robot. For context, the robot will involve a series of flashing lights (7 LEDs in total), some small degree of movement (2x DC motors), a series of sensors (ultrasonic + temperature/humidity) and speech recognition + generation. I include a list of parts I am planning to purchase from Core Electronics below. I have a few queries I have not been able to find answers to online and was hoping to receive some support about:

  1. I am planning to power the robot entirely via a Raspberry Pi’s 5V output connected to a breadboard. Will this be feasible? I have mocked up a circuit simulation via Tinkercad, which seems to suggest that this will work, but would like to know if this is a bad idea and I should look at another power source (which I would prefer to avoid for simplicity’s sake)

  2. One of the DC motors will be running continuously in one direction at approximately 30rpm. In my simulation, I have this motor powered by the Pi (via a breadboard) and controlled by a transistor. Is this feasible, or should I run this motor through the motor driver I will be using for the other motor (this latter motor will be run sporadically and will need to move backwards and forwards, hence why I am proposing to use a motor driver)

  3. I am planning to 3D print an enclosure for the robot. Inside this enclosure I am simply planning to place the breadboard vertically with the final circuits set out on it. Do you foresee any problems with this? I am eager to avoid soldering any components to permit me to re-use components at a later date.

  4. If I have an LED powered by the Raspberry Pi’s 5V output via a breadboard (i.e. the 5V output is connected to the power and ground rails on the breadboard and the LED is connected (via a resistor) to these on the breadboard, so no transistors), will the LED activate when the Raspberry Pi is turned on?

  5. Is it possible to connect an LED to two jumper wires to avoid soldering (i.e. placing the LED’s anode and cathode into the female ends of two male-to-female jumper wires)?

Thank you in advance for your assistance

List of parts:

  • Raspberry Pi 3A+
  • Slim Case for Raspberry Pi 3A+
  • Raspberry Pi 3+ Official Power Supply
  • HC-SR04 Ultrasonic Sensor
  • DHT11 Temperature and Relative Humidity Sensor
  • Mini USB Microphone
  • Copper Heatsink for Raspberry Pi
  • 5mm LEDs 100pcs pack
  • NPN Transistor (x10)
  • 600 pack of 1/4 Watt 1% resistors
  • M/F Jumper Wires 6" 20 pack (x2)
  • Jumper Wire Kit for Solderless Breadboard 140pcs
  • Solderless Breadboard 200 tie points (ZY-60)
  • DRV883 Dual Motor Driver Carrier
  • Hobby Motor – Gear (x2)
1 Like

Hi Shaun,

Amazing write-up! I’ve got some cursory answers:

  1. The 5V output on the Pi is unregulated, it’s just a “pass-through” from the 5V power supply that’s powering it. This means that as long as your power supply has enough current capacity to deliver power for the Pi and whatever else is being powered.
  2. Since you are looking for simplicity, it seems to me like the easiest option would be to use a 2-channel motor driver, since they are small, organised, and support current limiting and reverse current protection if that’s something you’d like.
  3. Personally, I’ve found breadboard connections to be pretty solid provided that the sockets are in good condition, but as soon as I’m done with a breadboard layout, it’s trivial to port it over to a perma-proto.
  4. Generally the best way to do this is to wire an LED to the serial Tx pin, so that if the pi is shut down the LED will be off. If you just want to show when there’s 5V power, your solution will work just fine.
  5. I don’t see why not provided that the legs of the LED are thick enough to hold onto the jumper wires, I haven’t done this personally though, so can’t completely confirm it.

Looking forward to hearing more about your project!


Thanks very much for your answers James! They’re really helpful!


Hi James,
I have a follow-up question. I’ve decided to go with a motor driver (specifically an L293D, https://core-electronics.com.au/dual-h-bridge-motor-driver-for-dc-or-steppers-600ma-l293d.html). I’ve read in a lot of places that you should never power a DC motor using the Pi’s output, but this doesn’t seem to align with what you were saying your post. I just wanted to confirm: is it wise to power a series of LEDs and two DC motors (the latter via an H-Bridge Motor Driver) using the Pi’s 5V output, or should I seek a direct power supply for the motors?

IMHO you should not power through the Pi, use a separate connection.

You need to work out the stall current of the motors. This can be very high, much higher than you might expect. If you are powering the Pi via the USB on board socket and taking power from the 40 pin header, +5V pin for the motors. The circuit tracks on the Pi will carry this current, over time they could become damaged due to excess current (higher than they were designed for). This could lead to a non working Pi.

If you are going to use a bread board in the robot and a LED plugged into a jumper lead; due to vibration over time some of the connections may become intermittent. Bread boards in my opinion are excellent for testing but a final design needs more robust connections.

Also suggest using a motor driver board rather than digital pin driving a transistor.

All the best

Hi James,

Nice catch, While the pi’s traces could be used for the smallest of motors, I agree, the big stuff would be best to power externally.


1 Like

Thanks for your pointers Jim and James. I’ll look at powering the LEDs via the Pi and the motors through an external source.


1 Like