An Arduino-compatible motor driver board and Pi hat for three unipolar stepper motors. Version 0.4

Buy Parts

Adjust quantity:
... 32 more lines
View All


The Sangaboard is a motor controller for unipolar stepper motors such as the cheap 28BYJ-48 motors. The custom board (v0.3) can be programmed as an Arduino Leonardo in the Arduino IDE. Versions 0.1 and 0.2 were based on an Arduino Nano and a couple of Darlington pair ICs. It owes quite a bit to Fergus Riche's motor board, the hardware developed by OpenScope and the Arduino-based motor controller used by a number of summer students working with Richard Bowman in Cambridge, particularly James Sharkey. It is currently the motor board used by the OpenFlexure Microscope. It was formerly known as the OpenFlexure Nano Motor Controller, with a repository on github.

The first step is to make and populate the PCB. You can get in touch with STICLab to order a v0.3 one if they have stock, eventually this should be possible through Seeed Studio. Alternatively have version 0.2 or version 0.3 made via Kitspace.

Installing the Sangaboard bootloader

You only need to isntall a bootloader if you solder your own v0.3 or v0.4 Sangaboard! Otherwise you can skip this step.

Installing the Sangaboard firmware

The Sangaboard firmware is an Arduino sketch, we use the same sketch for all versions of the Sangaboard.

The stage can be controlled by serial commands, which can be listed by sending the query help? to the board over the serial port.

Or by the pySangaboard python library.

  • Firmware (and bootloader modifications) by Richard Bowman and Julian Stirling, University of Bath
  • PCB design by Sanga Valerian, STICLab.
  • Fergus Riche (University of Cambridge, UK) hacked the stepper library to make it work with the stepper motors we are using, and is a major contributor to the v3 PCB design
  • Boyko Vodenicharski and Filip Ayazi (University of Cambridge, UK) contributed to the firmware for v0.3.

Development of this board and software was funded by the EPSRC (EP/P029426/1), the Royal Commission for the Exhibition of 1851, and the University of Bath.

(c) The authors, 2017,2018,2019. Released under CERN Open Hardware License (hardware designs) and GNU GPL v3.0 (firmware). The bootloader is only very slightly modified from the Arduino Leonardo bootloader, licences are listed in the source.