Connecting AC Power to Arduino for Beginners!

About: I'm a student at St'Mary's College. I've finished my o/l exam last year. Now I've stated to study through maths stream for A/L exams. I'm a beginner in electronics. So I like to present the tips I am gettin...

Hi there!! I'm here here to help as I can.

We can give only 5V to the arduino board from the power pack or from any source.

But we can't work with items which need more power as we only give 5v to the arduino board.

Giving more power can cause damages to the board. So you must be in a problem with that.

And also when using arduino board, you can't work with items which are running from AC current.

Connecting some parts such as motors directly to the board is also harmful.

So we can make the arduino circuit and the connecting appliance as separate circuits.

Step 1: Connect Through Transisitor and a Relay...

We can use a transistor to link between the two circuits without harming the arduino board.

Give the arduino pin to the base pin of the transistor.(connect a resistor to lower the base current.)

I used the transistor "D400". and a 1kilo ohm resistor.

Then you can connect any DC circuit to this transistor's emitter and collector.

Then you can control the circuit by the arduino board by adjusting the base current.

If you want to connect an AC circuit, you can use a relay.

I've used a 6V relay\ 220V AC.

Connect circuit as in the above image.

Add a diode to avoid the damage that can happen to the arduino by the spark stored in the relay after shutting the power supply.

then you can connect the needed appliance or the circuit to the place I've labeled in the above image.

(be careful when dealing with AC current. Please do this with an elder)



    • Paper Contest

      Paper Contest
    • Epilog X Contest

      Epilog X Contest
    • Trash to Treasure

      Trash to Treasure

    7 Discussions


    2 years ago

    When using a relay like this you should connect a flyback diode. When you turn off the transistor, the magnetic flux that has established in the relay's coil still exists and now tempts to give its power back to the feed. When the transistor is shut and there is no way for the current, the voltage will raise and - voila - you have a spark (the ignition in gasoline motors work this way). Or you have toast. With good luck it's just the transistor. With bad luck it's your Arduino. But if there is a diode, the current will flow back through it. No spark. No toast :-)

    4 replies

    Reply 2 years ago

    Sir, I've added the diode above. Have I correctly added that?


    Reply 2 years ago

    Thank you sir! This is my first instructable.

    I'm a beginner.:)