Introduction: Connecting AC Power to Arduino for Beginners!

Picture of Connecting AC Power to Arduino for Beginners!

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...

Picture of 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)

Comments

ThomasK19 (author)2016-05-19

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 :-)

Geethaka (author)ThomasK192016-05-20

Thanks sir. I'll try that.!:)

Geethaka (author)Geethaka2016-05-20

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

ThomasK19 (author)Geethaka2016-05-20

This looks just fine :-)

Geethaka (author)ThomasK192016-05-20

Thanks for the help sir.

tomatoskins (author)2016-05-19

Great idea! I love finding little tricks like this!

Geethaka (author)tomatoskins2016-05-20

Thank you sir! This is my first instructable.

I'm a beginner.:)

About This Instructable

633views

23favorites

License:

Bio: 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 ... More »
More by Geethaka:Connecting AC power to arduino for beginners!
Add instructable to: