Hardware (ULN2803)

If you are using a ULN2803, then all five of the stepper motor leads are used.

The motor has a 5-way socket on the end. Push jumper wires into the sockets to allow the motor to be connected to the breadboard.

This tutorial works with all versions of Raspberry Pi (rev 1, 2, A, B, B+ and Zero) except the compute module which has no headers. 

This setup cannot be used with anything but 5-pin (unipolar) stepper motors!
Although the code below mentions pin 18 of the GPIO connector being used as an Enable pin, this is only required when using the L293D.

40-Pin (A, B, B+ and Zero) Cobbler Plus Schematic

20-Pin (Rev 1 and Rev2) Cobbler Schematic

This guide was first published on Jan 23, 2013. It was last updated on Jan 23, 2013.
This page (Hardware (ULN2803)) was last updated on Aug 08, 2020.