Projects with a DPDT relay
9 Mokxi projects use a DPDT relay (8 intermediate and 1 advanced). They run on Arduino Uno, Raspberry Pi Pico and ESP32 boards. Here are all of them, from “Relay switched by an L293D (pins 5, 3 and 4)” to “Generator transfer switch”. 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 “Relay switched by an L293D (pins 5, 3 and 4)”, an intermediate project that needs an L293D motor driver, a DPDT relay and a DC motor.
- Arduino Uno runs 5 of them, Raspberry Pi Pico 2 and ESP32 1. Start on the board you have, or on an Arduino Uno if you are buying one.
- The parts used most here are the DC motor (7 projects), the transistor (7) and the diode (6). With those on hand, most of this list is open to you.
- Before you build one on a real bench, open the DPDT relay part page for its pins and what each one does.
9 projects ready to run

Relay switched by an L293D (pins 5, 3 and 4)
An L293D drives the coil of a 5 V relay from pins 5, 3 and 4, and the relay’s contacts switch a DC motor on and off every two seconds.
- Board
- Arduino Uno R3
- Parts
- L293D motor driver, DPDT relay, DC motor
- Level
- Intermediate

MicroPython relay switches a motor: button on 15
MicroPython on an ESP32: each press of the button on GPIO 15 flips a relay driven through an S8050 from GPIO 13, and the relay runs a DC motor.
- Board
- ESP32-DevKitC V4
- Parts
- Resistor, push button, transistor, DPDT relay, diode, +2 more
- Level
- Intermediate

Relays reverse a motor
Two motors turned both ways by relays: one on a two-channel board wired as an H bridge, one on a bare DPDT relay switched by a transistor.
- Board
- Arduino Uno R3
- Parts
- Resistor, transistor, diode, DPDT relay, DC motor, +1 more
- Level
- Intermediate

Pico W relay through an S8050 switches an LED
MicroPython on a Pico W: GP15 drives an S8050 that pulls in a 5 V relay with a flyback diode, and the relay contact lights an LED, two seconds on.
- Board
- Raspberry Pi Pico W
- Parts
- DPDT relay, diode, transistor, resistor, LED
- Level
- Intermediate

Relay switches a motor
Pin 7 drives a transistor that pulls in a 5 V relay, with a diode across its coil, and the relay’s contacts run a DC motor.
- Board
- Arduino Uno R3
- Parts
- Resistor, transistor, diode, DPDT relay, DC motor, +1 more
- Level
- Intermediate

MicroPython relay and motor on a Pico: a button toggles it
MicroPython on a Raspberry Pi Pico: each press of the button on GP15 flips a relay through a transistor on GP14, and the relay runs a DC motor.
- Board
- Raspberry Pi Pico
- Parts
- Resistor, transistor, push button, battery: AA, DPDT relay, +3 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

Relay switches a motor: button on 12, relay on 9
Each press of the button on pin 12 flips a relay, driven from pin 9 through an NPN transistor with a diode across its coil.
- Board
- Arduino Uno R3
- Parts
- Push button, resistor, transistor, DPDT relay, diode, +3 more
- Level
- Intermediate

Generator transfer switch
The control logic of an automatic transfer switch with low-voltage stand-ins: two interlocked contactors that never both close.
- Board
- Arduino Uno R3
- Parts
- Push button, resistor, LED, transistor, slide switch, +2 more
- Level
- Advanced
Wiring, libraries and more ideas
More project ideas
- Arduino Uno project ideas
- Raspberry Pi Pico project ideas
- ESP32 project ideas
- Electronics projects with no code
- Projects with a DC motor
- Projects with a transistor
- Projects with a diode
- LED projects for Arduino, ESP32 and Pico
- Projects with a push button
- Projects with a slide switch
- Projects with an L293D motor driver