Serial-controlled outlet

My first hardware project: an Arduino and a relay built into a standard outlet box, so a computer can switch the power on and off.

Where it started

This is the project that got me hooked on hardware, back in 2016. The idea was simple: let a computer switch a regular wall outlet on and off.

What I built

An Arduino Uno listens for commands over its USB serial port and drives a relay module. The relay switches the outlet, which sits in a standard electrical box with a cover plate and a cord, so anything plugged into it can be turned on or off from a script.

  • Controller: Arduino Uno, receiving commands over USB serial.
  • Switching: a relay module rated for mains current, wired between the cord and the outlet.
  • Enclosure: an off-the-shelf electrical box and outlet, so it looks and plugs in like any other outlet.

What it led to

Every relay project since, from the water heater controller to the backyard lights, follows the same pattern: a small microcontroller, a relay, and software that decides when.

Your idea next

Have a gadget in mind?

Custom electronics on ESP32 and other microcontrollers, firmware, and 3D-printed enclosures. One-offs to small batches.

Get in touch