Building a Sangaboard-compatible motor controller
The official project uses the Sangaboard motor controller, but this is currently difficult to get hold of. This guide tells you how to create your own motor controller that is compatible with the Sangaboard firmware. This will allow you to drive the 28BYJ-48 stepper motors used for the microscope.
For this section you will need:
Tools
Consumables
- A little solder
- A little electrical tape - Heat shrink would be better
Electronic Components
Step 1: Wire up the boards
Each of your motors should have come with a driver board. You should wire these up to and Arduino Nano using jumper cables as shown in the diagram below:
The motor order is x-motor, y-motor, z-motor from top to bottom of this diagram.
Step 2: Wire up the power
We use a soldering iron to create the power cables.
To power the boards you need a 5V voltage source. We create this from a USB power supply.
- Tun on the soldering iron to the correct temperature for your solder
- Cut the end off the cable with wire cutters
- Strip back a portion of the outer cable
- Locate the Vcc (usually the red wire) and GND wires (usually the black wire)
- Cut one end off 7 jumper cables. (Preferably 4 black and 3 red)
- Solder 4 of these cables to the GND cable of the power supply
- Solder the other 3 to the Vcc cable of the power supply
- Protect the joints with electrical tape or heat shrink.
- Connect up the power (with the supply off) as shown in the diagram above.
Step 3: Load the firmware
Using the Arduno IDE load the Sangaboard arduino sketch onto the Arduino nano
Troubleshooting
- Arduino IDE: Some users have found issues with old (or very new) versions of the Arduino IDE not working properly. See the issue thread on motor boards not working for more details.
- Arduino Clones: Many people use Nano boards not made by Arduino. These often come with cheaper USB to serial ICs (which require drivers - see the Arduino section at the end of this page) and old bootloaders (which require different options in the Arduino IDE). This is also discussed in the issue thread on motor boards not working.