Projects with a limit switch
22 Mokxi projects use a limit switch (1 beginner, 11 intermediate and 10 advanced). They run on Arduino Uno, Pro Micro and Arduino Nano boards. Here are all of them, from “Pico W micro switch on GP14” to “Motor starter”. 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.
How to pick your first one
- Start with “Pico W micro switch on GP14”, a beginner project that needs a limit switch, a resistor and a capacitor.
- Arduino Uno runs 17 of them, Pro Micro 2 and Arduino Nano 1. Start on the board you have, or on an Arduino Uno if you are buying one.
- The parts used most here are the push button (11 projects), the I2C LCD (9) and the servo motor (7). With those on hand, most of this list is open to you.
- Before you build one on a real bench, open the limit switch part page for its pins and what each one does.
22 projects ready to run

Pico W micro switch on GP14
MicroPython on a Pico W: a lever micro switch with its common on GP14 reads 1 while pressed and 0 at rest, and prints each change.
- Board
- Raspberry Pi Pico W
- Parts
- Limit switch, resistor, capacitor
- Level
- Beginner

Bumper car
A 2WD robot car on a DRV8833 with two lever microswitches for bumpers. It drives until a bumper is hit, then backs off and turns away from that side.
- Board
- Arduino Uno R3
- Parts
- DRV8833 motor driver, 2WD robot car chassis, limit switch
- Level
- Intermediate

Stepper homing
An A4988 and a NEMA 17 home against a microswitch endstop the way a 3D printer does, fast and then a slow second touch.
- Board
- Arduino Uno R3
- Parts
- A4988 stepper driver, NEMA 17 stepper motor, limit switch
- Level
- Intermediate

Guitar controller on a Pro Micro
Five fret buttons, a two-switch strum bar, a whammy knob and a tilt switch for star power, sent as a gamepad report through Joystick.h.
- Board
- SparkFun Pro Micro
- Parts
- Limit switch, push button, arcade button, potentiometer, tilt switch
- Level
- Intermediate

Automatic curtain opener with a stepper motor
A NEMA 17 on an A4988 homes to an end switch, opens the curtain at dawn and closes it at dusk, with a button to open, close or stop and a speed knob.
- Board
- Arduino Uno R3
- Parts
- A4988 stepper driver, NEMA 17 stepper motor, DC jack and adapter, capacitor, limit switch, +4 more
- Level
- Intermediate

Motor starter circuit
The classic 3-wire motor control circuit on a 12 V DC stand-in: a relay as the contactor, a normally closed STOP.
- Board
- No board
- Parts
- Limit switch, push button, slide switch, DPDT relay, DC motor
- Level
- Intermediate

XY pen plotter
Two steppers and a pen-lift servo home to their end switches, then draw a square and a star from a list of points, counting every step on an LCD.
- Board
- Arduino Uno R3
- Parts
- A4988 stepper driver, NEMA 17 stepper motor, servo motor, push button, limit switch, +1 more
- Level
- Intermediate

Washing machine
Pick a cycle on the knob and press START: it fills, washes with a reversing drum, drains and spins, and it only spins with the lid shut and locked.
- Board
- Arduino Uno R3
- Parts
- Servo motor, two-channel relay board, solenoid, mini water pump, L9110S motor driver, +6 more
- Level
- Intermediate

Robot vacuum behaviors
A cleaning robot with two bumpers and a cliff sensor.
- Board
- Arduino Uno R3
- Parts
- DRV8833 motor driver, 2WD robot car chassis, limit switch, TCRT5000 line sensor
- Level
- Intermediate

Bottling line
A belt brings each bottle to the filler, a pump fills it until the float switch trips, and the LCD counts them.
- Board
- Arduino Uno R3
- Parts
- Two-channel relay board, DC motor, mini water pump, FC-51 IR obstacle sensor, float switch, +4 more
- Level
- Intermediate

Gumball machine
Drop a coin and a servo gate lets out one gumball, with a sensor that spots jams, a coin counter and a sold-out sign on an LCD.
- Board
- Arduino Uno R3
- Parts
- Servo motor, FC-51 IR obstacle sensor, limit switch, push button, piezo speaker, +1 more
- Level
- Intermediate

Coin pusher
Drop coins in front of a sweeping servo pusher, count the ones that fall off the front, win a jackpot light show, and watch it back out of a jam.
- Board
- Arduino Uno R3
- Parts
- Arcade button, piezo speaker, FC-51 IR obstacle sensor, TM1637 four-digit display, WS2812 NeoPixel LEDs, +2 more
- Level
- Intermediate

Mini G-code plotter
A two-axis plotter that reads G28, G0, G1, G90, G91 and M114 from the Serial Monitor.
- Board
- Arduino Uno R3
- Parts
- A4988 stepper driver, NEMA 17 stepper motor, limit switch
- Level
- Advanced

Camera slider with eased moves
A NEMA 17 on an A4988 homes to an end switch, then makes a video move that speeds up and slows down evenly, or a timelapse that moves.
- Board
- Arduino Nano
- Parts
- LED, resistor, potentiometer, push button, slide switch, +3 more
- Level
- Advanced

H-pattern shifter and handbrake
Two pots read an H-pattern gate with hysteresis and push-down reverse, two microswitches make sequential paddles and a hall sensor is the handbrake.
- Board
- SparkFun Pro Micro
- Parts
- TM1637 four-digit display, limit switch, slide potentiometer, arcade button, 49E linear hall sensor
- Level
- Advanced

Hexapod robot
Twelve servos on a PCA9685 walk a six-legged robot with the tripod gait: three feet lift and swing forward while the other three hold it up.
- Board
- Arduino Uno R3
- Parts
- Servo driver, limit switch, servo motor
- Level
- Advanced

Arcade claw machine
A complete claw machine you can watch: a stepper gantry with home switches, winch, servo claw and prizes in the cabinet, a coin switch.
- Board
- Arduino Uno R3
- Parts
- A4988 stepper driver, joystick, claw machine cabinet, arcade button, DRV8833 motor driver, +5 more
- Level
- Advanced

Vending machine
Four spiral slots on continuous servos, a keypad, coins and exact change, an LCD price list, a drop sensor that refunds a failed vend.
- Board
- Arduino Uno R3
- Parts
- 4x4 keypad, I2C LCD, limit switch, vending machine cabinet, piezo speaker
- Level
- Advanced

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

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

ASRS picker
A stepper carriage homes on a limit switch, then counts its steps to the shelf you type on a keypad.
- Board
- Arduino Uno R3
- Parts
- 4x3 telephone keypad, servo motor, 28BYJ-48 stepper and ULN2003, limit switch, buzzer, +1 more
- Level
- Advanced

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
Wiring, libraries and more ideas
Library pages
More project ideas
- Arduino Uno project ideas
- Pro Micro and Leonardo project ideas
- Arduino Nano project ideas
- Electronics projects with no code
- Projects with a push button
- Projects with an I2C LCD
- Servo motor projects
- Projects with an A4988 stepper driver
- Projects with a DC motor
- Projects with a piezo speaker
- Projects with a NEMA 17 stepper motor