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.
Appreciable (y)
Pingback: PiDojo-Robots | TecEX
Pingback: PiDojo-Robots | TecEX
Pingback: Bodgers – Robot Duels At CoderDojo Athenry | CoderDojo Athenry