
Interactive circuit guide
Run the simulation, follow the build steps one by one and try it in our real app.
Stopped
Step-by-step build
What it does
A relay module lets a low-current control signal from the Arduino switch a larger load. The module input goes to a digital output, its logic supply to the 5 V rail and its ground to the common ground. The load circuit is powered by a completely separate 12 V supply: the positive lead goes to the common contact, the normally open contact goes to the load positive, and the load negative returns to the supply negative. In this way the control side and the load side stay galvanically separated and load current never flows through an Arduino pin. A green LED with a 220 ohm series resistor shows when the relay is triggered. Build the control side first, then the separate load side, and check that the contact is normally open before connecting power.
Parts you need
Use the following parts to build this circuit:
- Arduino Uno × 1 — Produces the relay trigger signal.
- Relay module × 1 — Switches while keeping control and load circuits apart.
- DC motor (load) × 1 — The load being switched.
- 12 V load supply × 1 — A completely separate power source for the load.
- 5 V supply line × 1 — Powers the logic side of the relay.
- 220 Ω resistor × 1 — Limits the LED current.
- Green LED × 1 — Shows the trigger state of the relay.
- Ground connection × 1 — Common reference on the control side.
Build it step by step
- Place the board, the relay module and the load; connect GND to the shared ground.Connect the relay ground to the same row.
- Wire the relay input to a digital pin and its logic supply to the 5 V line.The relay does not trigger while the input is LOW.
- Connect the positive lead of the 12 V supply to the common contact.Do not power the load from the Arduino.
- Run a wire from the normally open contact to the load positive and the load negative to the supply negative.If the contacts are mixed up the load will not run.
- Add a 220 Ω resistor and a green LED in series on the trigger branch.Connect the LED cathode to ground.
- Upload the sketch and watch the load run and the LED light when the relay triggers.If there is no contact click, check the logic supply.
How it works
A relay contains an electromagnetic coil and a mechanical contact. The digital output of the Arduino energises the coil; the coil pulls the contact so the normally open terminal connects to the common terminal and the load circuit closes. The control side uses 5 V while the load side uses a separate 12 V supply, and the only link between them is the mechanical contact. Load current therefore never passes through the Arduino pins and the board is protected. Sharing ground between the relay logic and the Arduino GND is needed so the trigger signal is read correctly. The LED and its series resistor indicate that the trigger command has arrived.
What you learn
- Explain load switching with a relay.
- Separate the control circuit from the load circuit.
- Apply normally open contact logic.
- Reinforce common ground and LED series resistor practice.
Tips
- Keep load wiring separate from control wiring.
- If the relay does not trigger, check the logic supply.
- Contacts have a limited life, so avoid unnecessary switching.
- Always connect the LED with a series resistor.
Try it yourself
- Trigger the relay to start and stop the motorised load.
- Confirm that the green LED lights when the relay triggers.
Expected result: When the Arduino triggers the relay the separately powered load runs; when the command is removed it stops, and the green LED lights during triggering.
Get the parts
If you want to build this project for real, you can get the parts from hobidevre.com.
Frequently asked questions
What is this circuit for?
A relay module lets a low-current control signal from the Arduino switch a larger load. The module input goes to a digital output, its logic supply to the 5 V rail and its ground to the common ground. The load circuit is powered by a completely separate 12 V supply: the positive lead goes to the common contact, the normally open contact goes to the load positive, and the load negative returns to the supply negative. In this way the control side and the load side stay galvanically separated and load current never flows through an Arduino pin. A green LED with a 220 ohm series resistor shows when the relay is triggered. Build the control side first, then the separate load side, and check that the contact is normally open before connecting power.
How does it work?
A relay contains an electromagnetic coil and a mechanical contact. The digital output of the Arduino energises the coil; the coil pulls the contact so the normally open terminal connects to the common terminal and the load circuit closes. The control side uses 5 V while the load side uses a separate 12 V supply, and the only link between them is the mechanical contact. Load current therefore never passes through the Arduino pins and the board is protected. Sharing ground between the relay logic and the Arduino GND is needed so the trigger signal is read correctly. The LED and its series resistor indicate that the trigger command has arrived.
What should I see at the end?
When the Arduino triggers the relay the separately powered load runs; when the command is removed it stops, and the green LED lights during triggering.