• Automotive grade stepper motor.
• Four quad alphanumeric displays — white 0.54” with
There is a significant amount of additional
components — cables, connectors, screws, etc. — included
in the Parts List, but the above five bolded items form the
core of the gauge’s clock works.
The glue that brings everything together is Node.js
mentioned previously. As stated on their website
event-driven, non-blocking I/O model that makes it
lightweight and efficient. Node.js’ package ecosystem —
npm ( https://www.npmjs.com) — is the largest ecosystem
of open source libraries in the world.
I know this is a circuit focused magazine and
sometimes a discussion of code can sound like a bit of a
snoozer, but if you hang with me you may find it to be the
most rewarding part of the project! I know I did. I’m 100%
self-taught and there are going to be more efficient ways
of accomplishing what I did. So, be sure to check out all
the fantastic information online on how to program in
Node.js. The main thing I want to illustrate here is how I
used Node’s asynchronous event driven model to write
device drivers (node.js classes) for each of the major
hardware components. More on that later. Let’s get to the
This project is based on the Raspberry Pi running
Raspbian Jessie Lite (Lynx without a graphical user
interface; GUI). There have been several articles in this
magazine and others on how to interface with the
Raspberry Pi’s 40-pin header, so I’m not going to spend
much time here on it. It’s straightforward if you have
worked with a microcontroller before.
The general I/O pins run at CMOS 3.3V levels, with
other pins providing I2C, SPI, UART, and PWM interfaces.
This project uses the I2C interface to talk with the
alphanumeric displays, and general I/O pins to bit bang
commands to the LED strip and motor control ICs.
Figure 7 is the schematic for the RaspPi RG-2MtrDrvr
daughterboard. It directly connects to the Pi’s 40-pin
header pictured in the center of Figure 7. As you can see,
there are not a lot of components; only two ICs MTR-A
and MTR-B — both Toshiba TB6612FNG H-bridge motor
drives. Only one is used in this project. However, the RG-
2MtrDrvr board does break out the various interfaces into
December 2017 19
■ FIGURE 7. Weather gauge RG-2MtrDrvr daughterboard schematic.