Wi-Fi controlled smart plug
Pair the relay with an ESP32 or ESP8266 to switch a lamp or appliance on and off from your phone, wiring the mains load safely through COM and NO.
A single-channel 5V relay module (SONGLE SRD-05VDC-SL-C) that lets a microcontroller switch a high-power AC or DC load through isolated SPDT contacts rated 10A at 250VAC / 30VDC.

The 5V relay module is an electromechanical switch that lets a low-power microcontroller control a high-power circuit. At its heart is a SONGLE SRD-05VDC-SL-C relay: a 5V coil that, when energized, moves an internal armature to physically open and close a set of contacts. Because those contacts are mechanically and electrically isolated from the coil, the Arduino side stays safely separated from whatever you are switching.
The relay is SPDT (single pole, double throw, also called 1 Form C), so it exposes three switched terminals: COM (common), NO (normally open), and NC (normally closed). With the coil off, COM connects to NC; energize the coil and COM switches over to NO. The bare coil draws roughly 70mA at 5V, far more than a GPIO pin can source, so the module adds a driver transistor, an indicator LED, and a flyback diode across the coil. You connect only VCC, GND, and the logic-level IN pin to your controller.
The contacts are rated for 10A at 250VAC or 10A at 30VDC, which covers most lamps, pumps, fans, and small appliances. Being a mechanical device, the relay clicks audibly, takes a few milliseconds to switch, and has a finite contact life, so it suits on/off control rather than fast or high-frequency switching.
| Pin | Function | Type |
|---|---|---|
VCC VCC (5V) | Power | Power in |
GND GND | Power | Power in |
IN Signal IN | Digital | Digital input |
COM COM | Free | Free |
NO NO (Normally Open) | Free | Free |
NC NC (Normally Closed) | Free | Free |
Verified from the Tinkered component library.
The 5V Relay connects to any of the microcontrollers supported in Tinkered. Mind the 5 V logic level on 3.3 V boards.
The relay coil needs about 70mA at 5V, which exceeds the 20-40mA a microcontroller pin can safely source. That is exactly why the module has a driver transistor. Connect only the IN pin to the controller and let the board switch the coil.
Many single-channel modules are active-LOW: a LOW on IN turns the relay ON and a HIGH turns it OFF. If you assume the opposite, the relay can click on during boot or reset and your logic runs inverted. Confirm the polarity for your specific board.
If the relay module and the controller do not share GND, the IN input has no voltage reference. The relay may chatter, latch, or ignore the signal entirely. Always tie the module ground to the controller ground.
Motors, solenoids, and transformers generate voltage spikes that arc across the opening contacts, pitting them and shortening relay life. Add an RC snubber across AC contacts or a flyback diode across a DC load, and stay within the 10A rating.
VCC/GND/IN power and control the coil; COM/NO/NC are a separate, isolated switch. Do not run your load current back through the 5V supply or expect the contacts to be referenced to the module ground. Treat the contacts as an independent, floating switch.
Pair the relay with an ESP32 or ESP8266 to switch a lamp or appliance on and off from your phone, wiring the mains load safely through COM and NO.
Read a DHT22 or thermistor and energize the relay when the temperature crosses a threshold, letting a 5V board control a much larger AC fan or heater.
Use a soil-moisture sensor to trigger the relay and run a 12V water pump only when the soil is dry, keeping the pump supply isolated from the Arduino.
Combine a DS3231 real-time clock with the relay to turn lights or a coffee maker on and off at set times, a simple mains-safe automation build.
Drop the 5V Relay into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.