Project ideas by part

Projects with a traffic light module

18 Mokxi projects use a traffic light module (5 beginner, 11 intermediate and 2 advanced). They run on Arduino Uno and Raspberry Pi boards. Here are all of them, from “Crosswalk” to “Merge jam”. Each card says what the project does, the board and parts it needs and its level, and Open in the simulator runs it in your browser in one click, with no account.

First project

How to pick your first one

  • Start with “Traffic lights with gpiozero”, a beginner project that needs a traffic light module and a push button.
  • Arduino Uno runs 17 of them and Raspberry Pi 1. Start on the board you have, or on an Arduino Uno if you are buying one.
  • The parts used most here are the I2C LCD (9 projects), the piezo speaker (7) and the push button (7). With those on hand, most of this list is open to you.
  • Before you build one on a real bench, open the traffic light module part page for its pins and what each one does.
Projects

18 projects ready to run

  • Crosswalk, drawn in the Mokxi editor

    Crosswalk

    A traffic light module runs green, yellow and red on its own, and a button asks for the walk signal sooner; a piezo beeps while it is safe to cross.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, push button, piezo speaker
    Level
    Beginner
    Open in the simulator
  • Traffic lights with gpiozero, drawn in the Mokxi editor

    Traffic lights with gpiozero

    gpiozero TrafficLights and a Button on a Raspberry Pi 4: press the button and the lights go amber, red for crossing, red and amber, then green again.

    Board
    Raspberry Pi 4 Model B
    Parts
    Traffic light module, push button
    Level
    Beginner
    Open in the simulator
  • Battery level indicator, drawn in the Mokxi editor

    Battery level indicator

    An 18650 cell straight into A0: its voltage and charge in percent on a 16x2 I2C LCD, and a green, yellow or blinking red light as it runs down.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, battery: AA, I2C LCD
    Level
    Beginner
    Open in the simulator
  • Gas leak detector with an MQ-2, drawn in the Mokxi editor

    Gas leak detector with an MQ-2

    An MQ-2 on A0 waits out its warm-up, then shows the gas level on a 16x2 I2C LCD and a traffic light, and a buzzer beeps when LPG passes the limit.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, buzzer, MQ-2 gas sensor, I2C LCD
    Level
    Beginner
    Open in the simulator
  • Smart dustbin, drawn in the Mokxi editor

    Smart dustbin

    Smart dustbin on an Arduino: an ultrasonic sensor sees a hand and a servo opens the lid.

    Board
    Arduino Uno R3
    Parts
    HC-SR04 ultrasonic sensor, piezo speaker, traffic light module, servo motor
    Level
    Beginner
    Open in the simulator
  • Fingerprint door lock, drawn in the Mokxi editor

    Fingerprint door lock

    An optical fingerprint sensor checks the finger on its glass: an enrolled one swings a servo latch open for three seconds.

    Board
    Arduino Uno R3
    Parts
    Fingerprint sensor, traffic light module, servo motor
    Level
    Intermediate
    Open in the simulator
  • Breathalyzer with an MQ-3, drawn in the Mokxi editor

    Breathalyzer with an MQ-3

    An MQ-3 alcohol sensor calibrated in clean air with MQUnifiedsensor.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, alcohol sensor, I2C LCD
    Level
    Intermediate
    Open in the simulator
  • Car wash, drawn in the Mokxi editor

    Car wash

    Drive a car up to the sensor and press START: it rinses, soaps, brushes, rinses and dries on a timeline.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, two-channel relay board, solenoid, mini water pump, MX1508 dual motor driver, +7 more
    Level
    Intermediate
    Open in the simulator
  • Zombie tripwire, drawn in the Mokxi editor

    Zombie tripwire

    An ultrasonic tripwire across a corridor: every walker is counted on a display, a traffic light rises from green to red.

    Board
    Arduino Uno R3
    Parts
    HC-SR04 ultrasonic sensor, piezo speaker, traffic light module, TM1637 four-digit display
    Level
    Intermediate
    Open in the simulator
  • Light curtain, drawn in the Mokxi editor

    Light curtain

    Two E18-D80NK beams guard a servo press: start works only with the beams clear.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, servo motor, buzzer, slide switch, arcade button, +2 more
    Level
    Intermediate
    Open in the simulator
  • Find the emergency broadcast, drawn in the Mokxi editor

    Find the emergency broadcast

    Turn a knob across the FM band to find a hidden station: the static fades and a traffic light warms from red to green as you close in.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, TM1637 four-digit display, piezo speaker, potentiometer
    Level
    Intermediate
    Open in the simulator
  • Tire pressure check station, drawn in the Mokxi editor

    Tire pressure check station

    An MPX5700 gauge pressure sensor on a shop air chuck, auto-zeroed at power up: the tire in psi, kPa and bar on a 20x4 LCD.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, pressure sensor, push button, buzzer, 20x4 I2C LCD
    Level
    Intermediate
    Open in the simulator
  • Bunker battery gauge, drawn in the Mokxi editor

    Bunker battery gauge

    An INA219 measures a battery under load.

    Board
    Arduino Uno R3
    Parts
    Battery: AA, INA219 current monitor, resistor, piezo speaker, traffic light module
    Level
    Intermediate
    Open in the simulator
  • Reject station, drawn in the Mokxi editor

    Reject station

    A quality check that tracks each part: an HC-SR04 measures the part's height at the gate.

    Board
    Arduino Uno R3
    Parts
    Servo motor, traffic light module, two-channel relay board, DC motor, alarm siren, +3 more
    Level
    Intermediate
    Open in the simulator
  • Battery and alternator monitor, drawn in the Mokxi editor

    Battery and alternator monitor

    A car’s 12 V system through a protected divider on A0: rested charge, the lowest voltage of each start, and whether the alternator is charging.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, buzzer, bench power supply, I2C LCD, resistor, +1 more
    Level
    Intermediate
    Open in the simulator
  • Bunker airlock interlock, drawn in the Mokxi editor

    Bunker airlock interlock

    Two servo doors that are never open together: press OUTSIDE or INSIDE and the airlock opens one door, purges with a beeper, then opens the other.

    Board
    Arduino Uno R3
    Parts
    Servo motor, traffic light module, piezo speaker, push button
    Level
    Intermediate
    Open in the simulator
  • PLC ladder, drawn in the Mokxi editor

    PLC ladder

    A motor starter solved like a PLC: every scan reads all inputs into a table, solves the ladder rungs from it and writes the outputs at once.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, relay module, DC motor, push button, limit switch, +2 more
    Level
    Advanced
    Open in the simulator
  • Merge jam, drawn in the Mokxi editor

    Merge jam

    Two feeder conveyors take turns putting items onto one shared belt, counted by three E18-D80NK sensors.

    Board
    Arduino Uno R3
    Parts
    Traffic light module, E18-D80NK IR proximity switch, two-channel relay board, DC motor, push button, +1 more
    Level
    Advanced
    Open in the simulator