DE Unit 10: State Machines

Connecting digital circuits to physical machines


A state machine is a device that has both a physical machine as well as a digital circuit controlling it. Most state machines have these parameters:

  • Inputs that tell the circuit what state the machine is in
  • Outputs (lights, motors, servos, sirens) that turn on/off based on the state of the inputs
  • A digital circuit that controls the outputs based on the inputs

In this unit you’ll get to build three different state machines.  For each you’ll need to combine some sort of physical machine and inputs with some sort of outputs.  You’ll get to work with lights, motors, and switches to make each state machine function as intended. In this unit you’ll combine these ideas to complete three state machine challenges:

  1. The Photo Copier Jam Detector
  2. The Phone Number State Machine
  3. The Tollbooth


(40 pts)  About 3 days

This first state machine mimics the job of copy machine error detectors.  You’ll build a VEX model with three switches and a motor.  The state of those switches determines the outputs from your PLD circuit.  Follow the directions in the assignment to make a completely functional state machine!


(40 pts)  About 3 days

This machine will not require any physical prototype – instead we’ll use simple clock-controlled states to display the digits of your phone number.  This will be a good way to look at the math, logic, and organization behind state machines.

PART 3: Toll Booth

(40 pts)  About 4 days

The final state machine will ask you to build a small working toll booth.  This tollbooth will move based on the inputs and outputs controlled by your circuit and PLD.  As the circuit runs, the machine will function like a regular tollbooth you would find at the airport.

TollBooth Paperwork


PART 1: Copier Jam Detector

Your first state machine!
Copier Jam Detection
The first state machine you’ll design and make is called the “Copier Jam Detector”.  It will start with some notes on state machines and an overview of the build process.  You’ll then follow some pretty detailed directions in the construction of a state machine using VEX parts.  The machine you build will have three switches (to trigger the states of the machine) and a few outputs.  You’ll then follow the directions to wire things together and create a PLD design to control the circuit.  Work with a partner – if you’d like – and take some good notes.  The state machines will each be very different, so you’ll want to understand everything about this one before you move on to the next!


 Use your Engineering Notebook to take some notes on state machines, inputs, outputs, and the design of the Copier Jam Detector

 Build your state machine using VEX parts.  You can work with a partner to build if you’d like.

 Design your PLD circuit to control the inputs and outputs of the state machine

 Finalize your machine and get it working as intended.  You’ll need to double-check the criteria and constraints of the problem to make sure you’ve done everything you need to.

Have Mr. Benshoof confirm your working copier jam detector

What’s Due In State Machines Part 1: Copier Jam Detection

  • Notes: State Machines
  • Build VEX Machine
  • Design PLD Circuit
  • Get it Working!
  • Benshoof’s Check-Off
Here’s what’s due in Part 1: Copier Jam Detection

  1.  Notes on state machines, inputs, outputs, and the copier jam detector
  2.  Build the Copier Jam Detector with VEX parts
  3.  Design your circuit and program your PLD to control the machine
  4.  Troubleshoot the final machine and get it working!
  5.  Have Benshoof check-off your working state machine

PART 2: Phone Number State Machine

Displaying digits with a state machine
State Machine Design
Soldering – how to!  Give some thoughts and notes that summarize the big ideas

What’s Due In Bug Bot Part 2: Design & Draw

  • Brainstorm
  • Research
  • Pick Design & Draw
  • Benshoof’s Check-Off
Here’s what’s due in Part 1: Wiring

  1.  Brainstorm at least 10 ideas for what your Bug Bot might look like or be made of
  2.  Look up “Bug Bot Designs” on Google and see what other designs are out there.  Add 5 more ideas to your brainstorm list.
  3.  Pick what your final design will look like, and make a careful drawing in your engineering notebook
  4.  Have Benshoof check-off your careful drawing

PART 3: Build It!

Put your plan into action and build your Bug Bot in our workshop
Soldering – how to!  Give some thoughts and notes that summarize the big ideas
Check out this video on how to solder
Check out this video on how to wire your bugbot
Check out this extra video on troubleshooting

What’s Due In Bug Bot Part 3: Build It!

  • Build It
  • (Extra Credit) Decorate it
  • Benshoof’s Check-Off
Here’s what’s due in Part 3: Build It!

  1.  Get into the makerspace and build your Bug Bot!  Make sure it functions properly!
  2.  If you have extra time, give your Bug Bot that special touch by painting, lasering, or making stickers to customize it!
  3.  Have Benshoof check-off your finished, working Bug Bot

Double Check: Unit Expectations

Check what you need to have completed by the unit deadline
The purpose of this unit is to use the Engineering Design Process to wire, design, and build a working Bug Bot.  You should have had the chance to do some soldering, design your own Bug Bot, and use the tools in our makerspace to build your Bug Bot.  If you were really on-task and working hard, you should have also had time to decorate your Bug Bot to make it look super cool.  By the unit deadline, you should have completed and be able to submit the following items:

Engineering Notebook:

 (Part 1) Definition of problem, criteria, constraints, and Bug Bot Overview notes

 (Part 1) Wiring diagram, soldering notes, and wiring reflection

 (Part 2) Bug Bot Design brainstorm, notes, and careful drawing

 (Part 3) Final drawing/picture, half-page written reflection on Bug Bots

Building & Making:

 (Part 1) Wiring should work, soldering should be clean and complete

 (Part 2) Bug Bot design should be carefully drawn out including labels and diagrams

 (Part 3) The Bug Bot should be assembled and should function properly

Benshoof Checkpoints

 (Part 1) Benshoof should have seen your working wiring before you moved on

 (Part 2) Benshoof should have seen your careful drawing before you moved on

 (Part 3) Benshoof should have seen your working Bug Bot