Project ideas by part

Projects with a relay module

21 Mokxi projects use a relay module (5 beginner, 8 intermediate and 8 advanced). They run on Arduino Uno and ESP32 boards. Here are all of them, from “On and off desk lamp: button on 7, relay on 2” to “Delta-T monitor”. 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 “Mini pump plant waterer”, a beginner project that needs a soil moisture sensor, a relay module and a water pump.
  • Arduino Uno runs 19 of them and ESP32 2. Start on the board you have, or on an Arduino Uno if you are buying one.
  • The parts used most here are the LED (11 projects), the push button (11) and the slide switch (7). With those on hand, most of this list is open to you.
  • Before you build one on a real bench, read the relay module wiring guide for your board below. It gives every pin and the voltage notes.
Projects

21 projects ready to run

  • On and off desk lamp: button on 7, relay on 2, drawn in the Mokxi editor

    On and off desk lamp: button on 7, relay on 2

    Press the button on pin 7 (internal pull-up) once and the relay module on pin 2 clicks on and lights the lamp LED through its contact.

    Board
    Arduino Uno R3
    Parts
    Push button, resistor, LED, relay module
    Level
    Beginner
    Open in the simulator
  • Mini pump plant waterer, drawn in the Mokxi editor

    Mini pump plant waterer

    A capacitive soil probe watches the pot; when it reads dry, a relay runs the mini pump for three seconds, then waits for the water to soak in.

    Board
    Arduino Uno R3
    Parts
    Capacitive soil moisture sensor, relay module, mini water pump
    Level
    Beginner
    Open in the simulator
  • PIR motion light with a relay, drawn in the Mokxi editor

    PIR motion light with a relay

    After dark, an HC-SR501 PIR switches a 12 V lamp on through a relay, and it goes off 20 s after the last movement; a light sensor keeps it off by day.

    Board
    Arduino Uno R3
    Parts
    PIR motion sensor, photoresistor module, relay module, DC jack and adapter, filament lamp
    Level
    Beginner
    Open in the simulator
  • Relay module on pin 8, drawn in the Mokxi editor

    Relay module on pin 8

    A relay module on pin 8 clicks on and off every two seconds; its contact switches an LED.

    Board
    Arduino Uno R3
    Parts
    Resistor, LED, relay module
    Level
    Beginner
    Open in the simulator
  • Fog machine trigger, drawn in the Mokxi editor

    Fog machine trigger

    A PIR fires a relay across a fog machine’s remote button for a short burst, then a cooldown with a red lamp lets the fog drift and the heater recover.

    Board
    Arduino Uno R3
    Parts
    Resistor, LED, PIR motion sensor, relay module
    Level
    Beginner
    Open in the simulator
  • ESP32 async web server: BME280, slider and relay, drawn in the Mokxi editor

    ESP32 async web server: BME280, slider and relay

    ESPAsyncWebServer serves a page with BME280 temperature, humidity and pressure, a slider that dims an LED and a button that switches a relay.

    Board
    ESP32 DevKit V1
    Parts
    BME280 weather sensor, resistor, LED, relay module, DC jack and adapter, +1 more
    Level
    Intermediate
    Open in the simulator
  • Garage door opener, drawn in the Mokxi editor

    Garage door opener

    A relay that presses the opener’s wall button for half a second and two reed switches that say closed, opening, open, closing or stopped.

    Board
    ESP32-C3-DevKitM-1
    Parts
    Reed switch, push button, relay module
    Level
    Intermediate
    Open in the simulator
  • Water level controller with float switches, drawn in the Mokxi editor

    Water level controller with float switches

    Two float switches keep a tank between its low and high marks with a pump on a relay; a stuck float or a pump running dry stops it and blinks red.

    Board
    Arduino Uno R3
    Parts
    Float switch, push button, resistor, LED, relay module, +2 more
    Level
    Intermediate
    Open in the simulator
  • Ultrasonic water tank level monitor, drawn in the Mokxi editor

    Ultrasonic water tank level monitor

    An HC-SR04 in the lid reads the water level onto an I2C LCD, a relay pump refills from 20 to 90 percent, and a buzzer warns of an overflow.

    Board
    Arduino Uno R3
    Parts
    HC-SR04 ultrasonic sensor, relay module, mini water pump, buzzer, I2C LCD
    Level
    Intermediate
    Open in the simulator
  • Automatic plant waterer, drawn in the Mokxi editor

    Automatic plant waterer

    A soil moisture stake, a relay and a small pump water a plant when it gets dry, in short bursts with time to soak.

    Board
    Arduino Uno R3
    Parts
    Capacitive soil moisture sensor, water level sensor, push button, relay module, DC motor, +2 more
    Level
    Intermediate
    Open in the simulator
  • Bidirectional visitor counter, drawn in the Mokxi editor

    Bidirectional visitor counter

    Two IR sensors at a doorway tell people coming in from going out, an I2C LCD shows IN, OUT and inside, and a relay lights the room while anyone is in.

    Board
    Arduino Uno R3
    Parts
    FC-51 IR obstacle sensor, relay module, DC jack and adapter, filament lamp, I2C LCD
    Level
    Intermediate
    Open in the simulator
  • Sump pump controller, drawn in the Mokxi editor

    Sump pump controller

    A teaching model of a sump controller: two floats run a relay pump, an ACS712 checks that current really flows, and alarms catch a dead pump.

    Board
    Arduino Uno R3
    Parts
    Float switch, ACS712 current sensor, relay module, mini water pump, slide switch, +4 more
    Level
    Intermediate
    Open in the simulator
  • GFCI concept demo (not a real GFCI), drawn in the Mokxi editor

    GFCI concept demo (not a real GFCI)

    Two ACS712 sensors compare the hot and neutral current of a 12 V lamp and a relay latches open on a 60 mA imbalance: a teaching model.

    Board
    Arduino Uno R3
    Parts
    DC jack and adapter, ACS712 current sensor, relay module, filament lamp, resistor, +2 more
    Level
    Intermediate
    Open in the simulator
  • Fire fighting robot, drawn in the Mokxi editor

    Fire fighting robot

    Three flame sensors steer a 2WD car on an L298N to the fire, then a relay runs a water pump while a servo sweeps the nozzle until the flame is out.

    Board
    Arduino Uno R3
    Parts
    L298N motor driver, 2WD robot car chassis, flame sensor, servo motor, relay module, +1 more
    Level
    Advanced
    Open in the simulator
  • Keypad lock, drawn in the Mokxi editor

    Keypad lock

    A 4x4 keypad, a relay and an RGB LED on an Uno: type 1234 then # and the relay clicks the door lamp on.

    Board
    Arduino Uno R3
    Parts
    4x4 keypad, RGB LED, resistor, relay module, LED
    Level
    Advanced
    Open in the simulator
  • Motor starter, drawn in the Mokxi editor

    Motor starter

    START and a fail-safe STOP, a relay and a small DC motor, and an ACS712 that feeds an inverse-time overload trip with a manual RESET.

    Board
    Arduino Uno R3
    Parts
    Push button, resistor, LED, limit switch, ACS712 current sensor, +4 more
    Level
    Advanced
    Open in the simulator
  • Bench supply monitor, drawn in the Mokxi editor

    Bench supply monitor

    An INA219 reads a 12 V supply’s volts, amps, watts and watt-hours on an LCD; an over-current knob trips a shutoff relay that latches, with a buzzer.

    Board
    Arduino Uno R3
    Parts
    INA219 current monitor, DC voltage source, relay module, resistor, slide switch, +5 more
    Level
    Advanced
    Open in the simulator
  • Pressure tank monitor, drawn in the Mokxi editor

    Pressure tank monitor

    A pressure transducer and a pump relay run a 40/60 or 30/50 psi cut-in and cut-out, count pump cycles and run time, and flag short cycling.

    Board
    Arduino Uno R3
    Parts
    0.5 to 4.5 V pressure sender, relay module, filament lamp, slide switch, push button, +2 more
    Level
    Advanced
    Open in the simulator
  • Pick and place, drawn in the Mokxi editor

    Pick and place

    Two steppers home to their switches, then each START moves a part from the pick point to the place point: nozzle down, vacuum on, up, across, down.

    Board
    Arduino Uno R3
    Parts
    Relay module, DC motor, servo motor, 28BYJ-48 stepper and ULN2003, limit switch, +2 more
    Level
    Advanced
    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
  • Delta-T monitor, drawn in the Mokxi editor

    Delta-T monitor

    Two DS18B20s on one wire read supply and return air: the drop across the coil is judged only while the cooling call runs and has settled.

    Board
    Arduino Uno R3
    Parts
    DS18B20 temperature sensor, float switch, relay module, slide switch, resistor, +1 more
    Level
    Advanced
    Open in the simulator