Book Image

Raspberry Pi Blueprints

Book Image

Raspberry Pi Blueprints

Overview of this book

Table of Contents (17 chapters)
Raspberry Pi Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Drive electronics


The first step is to wire up and configure the drive electronics and motors that will move the various parts of the robot arm; this will consist of four micro servos that will move the arm, and two geared motors that will provide drive to the chassis.

The servos are powered by a 5 V power supply and can be driven using a pulsed digital signal (through Pulse Width Modulation (PWM)) from the Pi GPIO ports, which define the position that the arm of the servo is to be kept in.

The motors will be driven using a relay board, which allows the Pi GPIO port to switch the higher currents needed to power the motor. This is just one of the many ways this can be done. Another possibility is to use a MOSFET H-bridge, which will also allow control of the speed of the motors. However, the relay solution is simpler in both code and electronic construction, so it will be used here.

The wiring for the drive electronics is shown in the following diagram:

The wiring of the Pi GPIO header is shown...