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

Picture of 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

Picture of 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

Picture of Wire the Relays to the Arduino

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

Pins:
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

Picture of Program the Arduino

Download the script and transfer it to your Arduino

Step 4: Setup Processing

Picture of Setup Processing

Run processing, download and open the script.

Edit the COM port if necessary.

Step 5: Setup TouchOSC

Picture of 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

Picture of 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

Picture of 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.

Comments

AllenInventions (author)2016-04-10

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

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.

Taa73 (author)iAmJacket2017-07-09

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.

you try the script?

Did you find anything?

ok thanks so much I've tried everything

any ideas?

metejnik (author)2016-02-23

Give it us android apk.

iAmJacket (author)metejnik2016-02-23

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

JOHNGANESAN (author)2015-01-03

Nice thing to construct & download

seamster (author)2014-11-12

Nicely done. Thanks for sharing this!

iAmJacket (author)seamster2014-11-13

Thank you :)

About This Instructable

14,329views

58favorites

License:

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