Lesson plan

PLCs and ladder logic lesson plan

How factory machines think: the scan cycle, contacts and coils, seal-in circuits, timers, counters and sequencers, ending on a crossing controller you design rung by rung.

5 chapters, 8 lessons, about 7 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

  • Read, solve, write: the loop every PLC runs, and the instructions on its rungs.
  • The seal-in rung, fail-safe stops and latched faults, in a program and in relays.
  • On-delay timers on a crosswalk and a counter that fills boxes.
  • A car wash that runs a table of timed steps, with an E-stop and a reset.
  • A signal-controlled crossing with every idea in the course.

Materials for the whole unit

  • 74HC04 hex inverter
  • Arduino Uno R3
  • Buzzer
  • Character LCD with I2C backpack
  • DC motor x 2
  • DPDT relay
  • Fan module, L9110
  • Filament lamp x 2
  • Full-size breadboard
  • Half breadboard
  • Hobby servo
  • IR proximity switch, E18-D80NK
  • LED x 5
  • Limit switch, lever microswitch
  • Mini water pump
  • MX1508 dual motor driver
  • Obstacle sensor, FC-51
  • Piezo speaker
  • Pushbutton x 2
  • Relay board, two channels
  • Relay module
  • Resistor x 5
  • Slide switch x 2
  • Solenoid
  • Traffic light module

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 1 h 40 min

The scan

Read, solve, write: the loop every PLC runs, and the instructions on its rungs.

LessonTimeWhat students do
Read, solve, write: the scanA motor starter run the way a PLC runs it: every scan copies the inputs into a table, solves the rungs from that table, then writes every output at once.50 min
  1. Meet the machine
  2. One scan, three steps
  3. How fast is a scan?
  4. The image table on the LCD
  5. Press START
  6. Quiz: predict the E-stop
Contacts and coilsThe three instructions most ladder is made of: the normally open contact, the normally closed contact and the coil, plus set and reset coils and internal bits.50 min
  1. The normally open contact
  2. The normally closed contact
  3. Bits are not buttons
  4. Set and reset coils
  5. Internal bits
  6. Quiz: clear the fault

Materials

  • Arduino Uno R3
  • Character LCD with I2C backpack
  • DC motor
  • Half breadboard
  • Limit switch, lever microswitch
  • Pushbutton x 2
  • Relay module
  • Slide switch x 2
  • Traffic light module

Check for understanding

Each student finishes "Contacts and coils" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Quiz: clear the fault".

Chapter 2. About 1 h 40 min

Latches and stops

The seal-in rung, fail-safe stops and latched faults, in a program and in relays.

LessonTimeWhat students do
Seal-in, stops and faultsThe rung every electrician knows: START latches the motor through its own contact, a fail-safe STOP and an E-stop break it, and a latched fault waits for a deliberate reset.50 min
  1. Latch it
  2. Read the rung like a sentence
  3. STOP breaks the rung
  4. Why stops are normally closed
  5. A latched fault
  6. Quiz: back to work
The same rung in relaysThe three-wire motor control circuit with no board at all: a relay as the contactor, its own contact as the seal-in, and two pilot lamps you wire to it.50 min
  1. Ladder came from relays
  2. The seal-in contact
  3. Read it as a ladder
  4. Wire a RUN lamp
  5. Light it
  6. Quiz: the STOPPED lamp

Materials

  • Arduino Uno R3
  • Character LCD with I2C backpack
  • DC motor
  • DPDT relay
  • Filament lamp x 2
  • Full-size breadboard
  • Half breadboard
  • Limit switch, lever microswitch
  • Pushbutton x 2
  • Relay module
  • Slide switch x 2
  • Traffic light module

Check for understanding

Each student finishes "The same rung in relays" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Quiz: the STOPPED lamp".

Chapter 3. About 1 h 40 min

Timers and counters

On-delay timers on a crosswalk and a counter that fills boxes.

LessonTimeWhat students do
TimersOn-delay timers on a crosswalk: a green that times out on its own, a fixed yellow, and a button that cuts the green short by loading a shorter preset.50 min
  1. A light on a clock
  2. The on-delay timer
  3. Yellow is a timer too
  4. Cut it short
  5. Quiz: predict the yellow
  6. TON, TOF and RTO
CountersA packaging line that counts items into a box: a count-up counter, a preset you can change, a done bit that stops the feed, and an interlock that ignores strays.50 min
  1. Counting is how a line knows it is done
  2. Count up
  3. The done bit
  4. Change the preset
  5. Quiz: predict the full box
  6. An interlock against strays

Materials

  • Arduino Uno R3
  • Buzzer
  • Character LCD with I2C backpack
  • DC motor
  • Half breadboard
  • Hobby servo
  • IR proximity switch, E18-D80NK
  • Piezo speaker
  • Pushbutton
  • Relay board, two channels
  • Solenoid
  • Traffic light module

Check for understanding

Each student finishes "Counters" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "An interlock against strays".

Chapter 4. About 1 h

Sequencers

A car wash that runs a table of timed steps, with an E-stop and a reset.

LessonTimeWhat students do
SequencersA drive-through car wash run as a step sequencer: a permissive to start, five timed stages from a table, an E-stop that drops everything, and a deliberate reset.60 min
  1. Machines run in steps
  2. A permissive
  3. Step 1
  4. Quiz: which step at 9 seconds?
  5. The E-stop drops every step
  6. Reset is deliberate
  7. A whole wash

Materials

  • Arduino Uno R3
  • Character LCD with I2C backpack
  • DC motor x 2
  • Fan module, L9110
  • Half breadboard
  • Mini water pump
  • MX1508 dual motor driver
  • Obstacle sensor, FC-51
  • Piezo speaker
  • Pushbutton
  • Relay board, two channels
  • Slide switch
  • Solenoid
  • Traffic light module

Check for understanding

Each student finishes "Sequencers" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A whole wash".

Chapter 5. About 1 h

Boss project

A signal-controlled crossing with every idea in the course.

LessonTimeWhat students do
Boss: a signal-controlled crossingA pelican crossing that uses everything: a latched request, minimum and maximum green timers, a fixed sequence, a flasher, and one lamp wired with no code at all.60 min
  1. The job
  2. A latched request and a minimum green
  3. Quiz: nobody presses
  4. The walk phase
  5. The flasher
  6. A lamp with no code
  7. Make it yours: write the ladder

Materials

  • 74HC04 hex inverter
  • Arduino Uno R3
  • Full-size breadboard
  • LED x 5
  • Pushbutton
  • Resistor x 5

Check for understanding

Each student finishes "Boss: a signal-controlled crossing" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours: write the ladder".

Your class

Teach this unit as a class

Start a class from this course and its 8 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.