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.

<p>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</p>
Hello, so when you press the button on your remote the relay's led turns on but the relay remains open?<br>If that happens i hould check if vcc have 5V maybe the voltage is to low to trigger the relay.<br>You could also test the pins that activate the relays connecting a led to the pin and gnd.<br>You can also check if the relay works with a test script.
<p>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.</p>
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.
<p>you try the script?</p>
<p>Did you find anything?</p>
<p>ok thanks so much I've tried everything</p>
<p>any ideas?</p>
<p>Give it us android apk.</p>
Hello, i can't do that.<br>You have to buy it from the store or search it by yourself.
<p>Nice thing to construct &amp; download</p>
<p>Nicely done. Thanks for sharing this!</p>
<p>Thank you :)</p>

About This Instructable




More by iAmJacket:Remote control 4 relay with Arduino via WIFI (touchOSC+Processing) 
Add instructable to: