Hardware
A newmember of the PICAXE family, the 18-pin 18M2
controller, is an extremely capable
chip that is well-suited to the demands of this project.
The 15-pin L298N H-bridge device is responsible for controlling
the direction of travel and the speed of the train. It is called an
“H-bridge” because such devices are frequently drawn on a sche-
matic with four transistors in an “H” pattern [5].
I like to think of an H-bridge as a solid state double-pole double-
throw switch. As you may know, a DPDT switch can be wired so
that it delivers power to a train with one polarity in one position
and with the opposite polarity in its other position. Reversing
polarity reverses the motor’s rotation.
4
4. The 18-pin PICAXE 18M2, the brains behind the
controller.
PICAXE circuit - 4
MRH-Jun 2014