Lesson plan

Model railroad electronics lesson plan

Throw turnouts, run a level crossing, follow a train with block signals and drive a DC loco with momentum, all from an Uno.

2 chapters, 4 lessons, about 4 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Move turnouts from a panel and run a crossing that follows a train.
  • Signal by block occupancy and drive a DC locomotive smoothly.

Materials for the whole unit

  • Arduino Uno R3
  • DC motor
  • Full-size breadboard
  • Hobby servo x 2
  • LED x 4
  • Motor driver, TB6612FNG
  • Photo interrupter, slot x 3
  • Piezo speaker
  • Potentiometer
  • Pushbutton x 2
  • Resistor x 4
  • Slide switch
  • Two-color LED, KY-011 x 2

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 2 h

Trackside animation

Move turnouts from a panel and run a crossing that follows a train.

LessonTimeWhat students do
Servo turnouts and a panelThrow two turnouts from a panel with slow-motion servos, route lamps that blink while the points travel, and positions that survive a power cut.60 min
  1. A servo under every turnout
  2. Power up where it was
  3. Throw turnout 1
  4. Throw it from a computer
A level crossingTwo beam detectors, alternating red lamps, a bell and a gate that waits before it falls: a crossing that follows a train from one side to the other.60 min
  1. The sequence
  2. A train from the west
  3. The gate comes down
  4. The train clears

Materials

  • Arduino Uno R3
  • Full-size breadboard
  • Hobby servo x 2
  • LED x 4
  • Photo interrupter, slot x 2
  • Piezo speaker
  • Pushbutton x 2
  • Resistor x 4

Check for understanding

Each student finishes "A level crossing" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The train clears".

Chapter 2. About 2 h

Running trains

Signal by block occupancy and drive a DC locomotive smoothly.

LessonTimeWhat students do
Block signalsTwo searchlight signals that show red, yellow or green from the blocks ahead, and how spot detectors stand in for track current detection.60 min
  1. Blocks and aspects
  2. All clear
  3. A train enters block A
  4. The train moves on
A DC throttle with momentumPWM speed control of a DC locomotive through a TB6612, momentum that makes it feel heavy, a brake, and a direction change only at a standstill.60 min
  1. DC, and where DCC differs
  2. Open the throttle
  3. Brake
  4. Reverse at a standstill

Materials

  • Arduino Uno R3
  • DC motor
  • Full-size breadboard
  • Motor driver, TB6612FNG
  • Photo interrupter, slot x 3
  • Potentiometer
  • Pushbutton
  • Resistor x 2
  • Slide switch
  • Two-color LED, KY-011 x 2

Check for understanding

Each student finishes "A DC throttle with momentum" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Reverse at a standstill".

Your class

Teach this unit as a class

Start a class from this course and its 4 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.