Part 14 of 15

Relay 5V

Relay 5V

A switch your Arduino can flip

In your kit: 1×

🔎 What is it?

A relay is a switch that your Arduino can turn on and off. You hear it "click". With a relay, your Arduino can turn another device on and off, for example a small fan or a lamp on a battery.

🔌 This is how you connect it

  • S to a pin, for example D7
  • + to 5V
  • − to GND
  • Connect the device you want to switch to COM and NO. NO means: normally off, on when the relay clicks.

Wiring diagram

From To
Arduino UNO · GND Relay 5V · -
Arduino UNO · 5V Relay 5V · +
Arduino UNO · D7 Relay 5V · S

✨ What can you do with it?

  • A fan that turns on when it is warm
  • A lamp on a timer
  • A small pump for the plants

💡 Tip

Safety first: only use the relay with batteries or low voltage (up to 12V). Never with a wall socket (230V)!

Projects with this part

⬇️ Download this page as a PDF 📚 Download the complete tutorial (PDF)

Codey Online is a product of OTRONIC

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free