controlling ac devices with arduino.

Thread Starter

gerases

Joined Oct 29, 2012
186
I would like to control AC devices with a microcontroller. I found this nice tutorial on how to build a relay based controller. It would work great, but I was wondering, can I replace the relay with something non-mechanical such as a transistor or maybe a solid state relay?

Can a transistor be used in such an application and if so, what is the model number of one that could handle 120V and the current of, say, a 60W incandescent bulb, a hair dryer, etc?
 

mcgyvr

Joined Oct 15, 2009
5,394
use a mechanical relay or solid state.
There are numerous "relay shields" for the arduino that a simple digital pin drives an optocoupler which drives the relay.
mdfly 4 channel relay shield is one I've used before. It works perfect.

That sparkfun single relay board is just fine too. It uses a transistor to drive the relay.
 

Thread Starter

gerases

Joined Oct 29, 2012
186
Use Google and look up "Color Light Organ" to see a lot of possibilities.
I know about color organs, but I want to do something simple with wall AC. Switch a lamp on/off, a hair dryer, etc.
 

BillB3857

Joined Feb 28, 2009
2,570
In the datasheet for this one, pin 1 is Load A and pin 2 is Load B. How does it all work exactly? I switch it on through pin 3 and 4 with the microcontroller, but how do I connect the GFCI in the tutorial using pins 1 and 2?

So I would connect a

Pins 1 and 2 would act like the two contacts on a normally open switch. With no signal on 3 and 4, it would be an open. Put the proper signal on 3 and 4 and 1 and 2 would conduct AC current. What tutorial???
 

Thread Starter

gerases

Joined Oct 29, 2012
186
Pins 1 and 2 would act like the two contacts on a normally open switch. With no signal on 3 and 4, it would be an open. Put the proper signal on 3 and 4 and 1 and 2 would conduct AC current. What tutorial???
Here's the tutorial (it's in my original post): http://www.sparkfun.com/tutorials/119

As you can see in it, the black wire is switched. But how do you switch both AC wires? I know it's basic. Just have fun with it :)
 

BillB3857

Joined Feb 28, 2009
2,570
Since you don't post where in the world you live, I can't really give any further advice. If you live in the US, only the HOT wire would be switched and the neutral would stay connected to the input of the GFI. You will be switching the HOT section of the GFI ON/Off instead of switching a light ON/OFF.

Don't get hung up on the Solid State Relay vs a regualr coil/contact relay. Even though the insides are different, to the outside world, they are the same.
 
Top