Arduino Remote Power Switch part 3

This is the third and final part of a series where I create an Arduino controlled power switch. Part 1 and Part 2 of the series are available following their links.  In the final part I integrate the Beefcake relay from Sparkfun with my the Arduino and Ethernet shield.

Assembling the Beefcake Relay

The relay kit is through-hole soldering. It wasn’t difficult for an absolute beginner like myself. I had to look up the LED symbol to figure out cathode (short leg) and anode(long leg) side of the LED. The squashed side of the circle is the cathode. The diode has a small stripe the matches the stripe on the PCB.

Controlling the Relay

You can verify the relay is working without applying the AC power. The Beefcake lights up a red LED when the relay is closed. I connected the relay to the Arduino’s ground and 5v pins. I used digital pin 2 as the control signal. Using the code from the previous entry, check the serial monitor for the provided IP. In my case it’s 192.168.3.33. Using curl and the IP was can control the relay:


dspisak@sawfish-db:~$ curl http://192.168.3.33/?2
Turning on pin 2
<br>

The LED lights up. I verify the load pins are closed with DMM.


dspisak@sawfish-db:~$ curl http://192.168.3.33/?2
Turning off pin 2

The LED is off and I verify the load pins are open.

AC Power Cable

AC power is dangerous. Powerful enough to kill or seriously injure yourself. Understand the risks. Take precautions. Always unplug the power before handling.

I used a 3-prong extension cord. The hot wire is spliced in to the relay control board. I verified operation again by checking the hot wire of the extension cord was open and then closed on either side of the relay.

Check out the PowerSwith Tail II if you want something safely isolated.

3 Comments

 Add your comment
  1. I have almost the same setup (DC instead of AC) and I wonder why it is working since arduino max current per I/O is 40mA (with a total of 200mA for ATmega328P ) and the relay list a nominal current of 1W (200mA for 5V) for the coil. Any ideea?

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.