How to Use 12V Relais on Arduino




About: Started electronics as a hobby in the seventies, studied it in late seventies, begin 80's, bought my first arduino last november. Love Instructables!

I really want to publish an Instructable...

So I made this very simple one: how to switch a higher voltage device with a lower voltage output.

Here I use a 5V output from arduino to steer a 12V relay.

Just some extra components: 3 legged voltage regulator like a 7805, one transistor (NPN), a diode (like a 1N4001) and two resistors. And of course the relay.

I'm very new at Fritzing(c) too, so please don't shoot me...

Step 1:

The schematic is very simple:

From an output of Arduino (or another logical item), which gives a 5V output, you go via a resistor of 4.7k to the base of an NPN transistor (the type depends on the amount of current you want to switch).

When the output is "ON", the transistor conducts, and the current flows through the second resistor (that limits the current), through the collector to the relay, and so to the ground.

In this case, the transistor lets 12V go through the relay.

The diode is used to "short" the voltage that might occur over the coil of the relay when it is switched very fast.

The switching of the relay follows the output of the arduino.

This can also be used on the same voltage, to switch loads that require higher currents than the output can deliver.

Electronics 101... For me my first Instructable, and first drawing in Fritzing (c).



    • Trash to Treasure

      Trash to Treasure
    • Arduino Contest 2019

      Arduino Contest 2019
    • Tape Contest

      Tape Contest

    4 Discussions