Raspberry Pi Motor Controller

Motor

Interfacing with the GPIO pins to control inductive loads is a little more complicated but not impossible for a hobbyist. If you are building robots for the television program "Robot Wars", then you will be interested in circuits to control inductive loads.

A motor, being an inductive load, produces back EMF and RF noise, which transfers into the power planes. If the load shares the voltage rail with the Raspberry Pi then all sorts of problems could arise. Large inductive loads not only create voltage spikes, but also power dips, which can affect the operation of the Pi.

Controlling Relays and Motors

Raspberry Pi Motor Controller

Here is a favourite arrangement to control large inductive loads. The signal from the GPIO pin 10 feeds the ULN2803A Darlington array, which controls a relay coil, which in turn controls a motor.

An advantage of a circuit like this is that the inductive loads have their own power supply rails, therefore any kind of dips and spikes will not have any impact on the Raspberry Pi.

In this type of arrangement, the ground is common for all the stages of the circuit however; the positive supply rails are separate.


Relay

Relay

A simple relay usually has two terminals for energising the coil, and three terminals for the switch contacts. Relays are available from many electronics stores online and can vary in price considerably.

The relay provides a mechanical switch that can switch higher voltages and currents to control motors. The switch contacts of a relay are ideally suited to control inductive loads such as motors.

This Article Continues...

Raspberry Pi Board B GPIO Header
Raspberry Pi GPIO Header Pinout
GPIO Header Pin Mapping
Raspberry Pi GPIO Header Pin Protection
Raspberry Pi GPIO Pinout
Raspberry Pi GPIO Interfacing and LED Blinking
Raspberry Pi GPIO Interface Circuit
Raspberry Pi Motor Controller

Related Articles

Easy Raspberry Pi GPIO Projects
GPIO Cable Raspberry Pi
Raspberry Pi Pinout