Arduino Internet Web Switch
This wonder kit allows you to control any electric appliance from the internet.
What does that mean ?
That means you can turn ON/OFF any appliance at your home from your iphone, Android, ipad, PC or laptop from Anywhere in the world..As long as you have access to a web browser.
Woooo..aint that an amazing power to lay your hands on.
What would I do with a Web Switch ?
I would do these:
Boil water for my coffee right from my bed with my Iphone
Turn on my Home heatpump when I leave to home from Work,
My home is warm and cozy by the time I arrive :)
Water my garden when I am on vacation
Rest I leave to your creative imagination to fill in............
What does the kit consist of ?
- This is the CPU where the code and the webserver runs
- This shield allows the Arduino to talk to any other device connected via Internet.
- The shield has an ethernet port which will be later used to connect the ethernet cable.
- This shield provides modular plugins to connect loads of things you want to control
- For this example we will interface a Relay module to control power appliances
- This module allows the Arduino to turn ON/OFF power appliances
- Read more about relays here
Building the Arduino Web Switch
Stacking the shields
Place the Arduino at the bottom as below
Plug the Ethernet Shield on top of the Arduino ( this is also called stacking , as we keep building a stack of shields above the Arduino )
Once thats done it would look like this.
Next step is to stack the height extender pins into the Ethernet shield ( This is necessary to ensure we dont short circuit the sensor shield pins on to the Ethernet shield )
Once the height extender pins are plugged into the Ethernet shield it will look like the pic below:
Stack the Sensor Shield on top of the Ethernet shield, as shown in pic below.
Wiring the Relay Module
Use the cable provided and connect it to the relay module as shown below
Connect the other end to the Sensor shield pin number 8, VCC and GND
TEST: Power up the arduino and you should see the GREEN led on relay module glowing. If you dont see that revisit your wiring and make sure everything is correct.
Arduino IDE ver 1.0.6 setup
Install the IDE version 1.0.6 ( this is the supported version for the examples below ) from the link here:
We are about to test if the wiring is good and the relay turns ON and OFF.
Load this program into the arduino from this link.
What does this program do?
This program turn ON the RELAY module for a 3 secs and turns it OFF for another 2 secs and keeps doing that.
How do you know if the relay is turning on?
You hear a click every time the relay operates and you see the RED led glowing every time it is turned ON.
This test should test if the wiring it good and the arduino is able to control the relay.
Getting your Internet Web Switch to go.......
Now that all the modules are tested, we are almost there..
The last bit which needs doing is to load the Web Switch code and turn your kettle on!
Follow the steps below in order
Download Ethernet shield library into libraries folder present in Arduino IDE installation
This step adds the library for getting the Ethernet Shield to work
Connect a Ethernet cable from the Arduino Ethernet shield to your PC/Laptop
Load this code (link provided on purchase) onto the Arduino.
Open up your favorite browser and copy this address onto it:
You will see the webpage shown below on the browser. This page is hosted on your Arduino,
yes that tiny little piece of hardware can host a webpage :)
Now you can click the button on the page and hear your relay turn ON/OFF,
You are now able to control the Arduino via the Browser.
Turning the kettle ON!
Now we have a working Arduino Web Switch which can be controlled from a browser,
To control the Kettle you will need to connect the Relay as a switch for the Kettle.
Disclaimer: any modification work that involves high voltages should be done by a certified electrician. This Web Switch kit is provided by Hobbyist Ltd "as is" with no warranty of any kind whatsoever. It is your responsibility to ensure your safety and proper functioning of your devices and applicances. Should you have any concern about health and safety please consult a professional for advice.
The wiring is as below:
VIDEO of the completed kit in action