This week the PiDojo group started to experiment with building our own robots.

To build a basic robot all you need is motors, a driver chip, some batteries and of course a Raspberry Pi.

IMPORTANT: Do not connect a motor, no matter how small directly to the Raspberry Pi, it will damage your Raspberry Pi. 

We use a L293B motor driver chip which is like is a little current amplifier that takes a low-current control signal and then turns it into a higher-current signal that can drive a motor.

I would also recommend using separate batteries to power the Raspberry Pi and the Motors as the motors can sometimes draw a lot of power from the batteries for example when starting up and this could cause the Raspberry Pi to restart. We used a “Power Bank” from Penneys to power the the Raspberry Pi and four AA batteries to power the motors. Here is a drawing of our circuit.


We wired up our circuit and placed it into a container that had the motors attached to it.


Once we had our robot assembled we loaded up this code and tested it out then we tried to program our robots to follow a preset path but the lack of a third wheel made this very difficult, something we will have to improve for next week.

This week was also our first time using Gpio Zero which is a new Python library for controlling the GPIO pins on the Raspberry Pi. It makes physical programming much more straight forward and really helped to speed up our work this session.


4 thoughts on “PiDojo-Robots

  1. Pingback: PiDojo-Robots | TecEX

  2. Pingback: PiDojo-Robots | TecEX

  3. Pingback: Bodgers – Robot Duels At CoderDojo Athenry | CoderDojo Athenry

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s