brightness levels are controllable. The alphanumeric driver
controls the brightness as well as the blink rate, just in
case you want to blink them on and off to get attention.
Stepper Motor Circuit and Code Detail
The stepper is a small 5V bipolar automotive
dashboard stepper connected to a needle in front of the
custom gauge face. Refer to the schematic in Figure 15.
Four I/O pins from the Pi are used to drive the
TB6612FNG H-bridge motor driver. The TB6612FNG can
drive up to a 15V stepper with an average current of 1.2A.
However, in this configuration, we are driving it at 5V.
The same power source used to power the Pi is used
to drive the stepper. If you wanted to drive a higher
voltage stepper, you can cut the trace that connects the
two power headers (labeled 5VIn and MotorIn; see the
left side of Figure 16) and drive the two H-bridges with a
separate power supply.
If you have worked with the TB6612FNG motor driver
before, you may have noticed I don’t use the PWM inputs
and just pull them high with a 10K resistor. I did this to
reduce the pin count, and I can easily get the resolution I
need by using half stepping. Other than that, the
TB6612FNGs are wired up close to the reference circuit in
The RG-2MtrDrvr daughterboard supports two
TB6612FNC motor drivers but only one is populated on
the PCB for this project. Refer again to the Figure 15
schematic of how the motor driver connects to the
RaspPi. Notice it uses four general I/O pins that are
directly connected to the Pi’s physical pins 23, 26, 29, and
The TB6612FNC is a generic motor driver that can
drive two DC motors or a single stepper. Refer to Figure
17. That is why its input pins AIN1-AIN2 are paired up
with the output pins AOUT1-AOUT2, and the same for
the BIN-BOUT. The automotive “dashboard stepper” I’m
using has a 600-step resolution over 315 degrees of
rotation. It has built-in stops that keep it from spinning a
full 360 degrees. The gauge face also has a stop (needle
strike) at the zero point for the stepper’s needle to bump
against and find the home position.
A stepper driver is posted at https://github.com
/RuckerGauge/RG-Stepper and at the article link for this
stepper circuit. This driver is a Node.js class so you can
initialize it and pass it the location of a custom
configuration file (calibration.json) that lets you tailor the
driver to your gauge face. This allows you to use the same
There’s a ShopBot for
every size shop and project.
ShopBot Desktop MAX ShopBot Buddy® PRSalpha 5-Axis ShopBot Desktop
From the beginning, our mission has been to make CNC tools and technology widely accessible and user-friendly.
Over the course of 20+ years we’ve grown our array of CNC solutions to serve the production requirements of any size shop.
ShopBot Tools.com 888-680-4466 •
oducts: Pr . shopbottools.com/pr www
raining: T . shopbottools.com/mSupport/training.htm www
Documentation: . shopbotdocs.com/ www
FREE T L E
ech Support 888-680-4466
December 2017 23