Connect Device to Relay

By Emir

Why is relay so important?

You want to control the device with different voltage values (110 AC or 220V) connected to their own power source. The best way to control it is by using relay.

In this tutorial we use 3.3V power supply for LED from Arduino board, but it could be a source from any battery or any other device.

Step 1

Prepare everything

Prepare Arduino board and relay module. You have an example on how to do this in this tutorial.

Step 2

Prepare gadget to control

In this case we use simple LED to demonstrate what a relay can do. It can be any device connected the same way, light switch, coffee machine, sound alarm etc.

Connect 3.3V on Arduino with middle hole on relay channel. Middle hole is always input on relay.

Connect ground pin from Arduino to ground on LED (shorter pin).

Now we just need to connect the other LED pin with the relay.

Step 3

Choose relay hole

There are two more free pins on relay channel. Which one to connect? Depends on what do you want!

If you want the LED to be connected with power source (middle pin on relay) only when channel is turned on (LOW) then connect it with the 3rd hole (from right).

If you want the LED to be connected even when the relay is off, then connect it with the 1st hole (from top).

Lines near holes on relay board show what the initial state is when relay is off. Two holes are always connected, middle and right or middle and left, only depends if it is LOW or HIGH.

Step 4

Check out the difference

Change pin position on relay hole, choose 1st instead of 3rd.

Now LED is turned on, but relay channel is off!

Tutorial Forum

There are no posts here yet. Add the first post