iSwitch

iSwitch constits of an iPhone application and a piece of embedded Arduino hardware controlling a three channel remote to control three 240V switches.

The idea of this project was to create a soft-/hardware solution to control 3 devices remotely using an iPhone application. Since Apple provides access to control the Bluetooth stack to "Made for iPod/iPhone" certified developers only, the only way to connect to remote devices is WLAN.

The application uses simple HTTP requests in order to switch the state of a given device attached. Switch URLs can be configured in the configuration section for the app. Default values to change the status of Switch1:

Switch ON: /sw1on
Switch ON: /sw1off

The resulting http request will be http:///sw1on to switch the device on, and http:///sw1off to switch it off. As result of the changed switch state, the embedded server will respond with a small XML snippet including the state of all three switches:

<switchserverresponse>
  <switch1>false</switch1>
  <switch2>false</switch2>
  <switch3>false</switch3>
</switchserverresponse>


The status of the embedded switch server can be retrieved by calling the status url of the server. Here the URL is http:///status, but can be configured in the
iPhone application as well.

The iPhone Application:

Main Window:
IMG_0497

Settings Window:
IMG_0495 IMG_0496

The hardware part is a real "hack". I wired up the remote control directly to a relay shield I created from scratch.
Originally the remote was operated by a 3V battery, but I connected 3.3V from the Arduino to the remote directly.


The hardware setup to control 3 switches through an
WLAN enabled Arduino:

iSwitch-Components

A macro photograph of the remote hack:

IMG_3304


A macro photograph of the relay shield:

IMG_3303

The relay/optocoupler hack was necessary, since I reverse engineered 5 pins which I need to pass to the arduino.

1.) The switch on potential/voltage
2.) The switch off potential/voltage
3.) The pin to change the state of channel 1
4.) The pin to change the state of channel 2
5.) The pin to change the state of channel 3


Planned Improvements:
- Store the Switch Label Strings in the Arduino EEPROM
- Read the Switch Labels from the iPhone app, so the user does not need to add the configuration of the
switch app manually if using multiple devices.


Project Developers: Dr. Michael Kroll