Remote Control 4 Relay With Arduino Via WIFI (touchOSC+Processing)




Introduction: Remote Control 4 Relay With Arduino Via WIFI (touchOSC+Processing)

Hello, i'm not english speaking so please understand my mistakes.

Mine was just an idea, i was curious, i googled some hours but there were a problem: i didn't found a pre-made script :)

I started from a script found on a website, but it was made for one relay, so i remade it.

This instructable is made for 4 relays but you can add how many you want.

Step 1: Materials Needed

Things you need:

• Arduino (I used UNO)
• 4 Relay Module
• Processing, you can download it from HERE if you need the library too here it is

The library should stay in C:\Users\Your Name\Documents\Processing\libraries

• TouchOSC on Itunes

• TouchOSC Editor from Here

• Jumper wires

Step 2: Wire the Relays to the Arduino

Now you have to wire the Arduino and the relay module.

Arduion VCC <-----> Relay module VCC
Arduino GND <-----> Relay module GND
Arduino pin 11 <-----> Relay IN1 Pin
Arduino pin 10 <-----> Relay IN2 Pin

Arduino pin 9 <-----> Relay IN3 Pin

Arduino pin 8 <-----> Relay IN4 Pin

Step 3: Program the Arduino

Download the script and transfer it to your Arduino

Step 4: Setup Processing

Run processing, download and open the script.

Edit the COM port if necessary.

Step 5: Setup TouchOSC

Now we need to setup touchOSC, you can find your host by typing ipconfig on cmd if you are under Windows

Step 6: Upload the TouchOSC Interface

Now with touchOSCeditor open the 4relaycontol.touchosc file and press the Sync button, once pressed on the phone app go to Layout and press Add

Step 7: Test

Run the script on Processing by pressing the "Play" button and connect with your phone.

Press the buttons, if everythig is working the relays will change their status.



    • Water Contest

      Water Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Metalworking Contest

      Metalworking Contest

    14 Discussions

    Hello, I have made your project and everything seems to work great, but I can't get the lights to actually turn on or off by remote. The circles turn red correspondingly in processing and the red lights on the relay board are on so I believe I wired it correctly. I think it may have something to do with the com being used simultaneously? Any solutions or advice? thanks

    8 replies

    Hello, so when you press the button on your remote the relay's led turns on but the relay remains open?
    If that happens i hould check if vcc have 5V maybe the voltage is to low to trigger the relay.
    You could also test the pins that activate the relays connecting a led to the pin and gnd.
    You can also check if the relay works with a test script.

    No, I cannot even turn the red relay lights on or off. They switch themselves on or off depending on if I just started the processing script or the arduino one. It seems as if they refuse to share the same port. I can change the four black circles to red via my iphone though.

    I made this script 2 years ago and i don't remember to much , today i will try it again maybe i can find your problem.

    I just tried and can't get the buttons to trigger the relays. I tested the relays in arduino window and they work. Something is not communicating between the phone oscillator and the processing program. Please check code to see if there is a missing connection.

    Hello, i can't do that.
    You have to buy it from the store or search it by yourself.