Relayduino (Arduino Compatible I/O Board)


(Note: This is from an old article on our support site that has been archived. Moving to community forum in case it helps anyone!)

This example project is more advanced than the simple getting started examples in the Exosite Arduino Library or the Basic Arduino Temperature Monitor. This example will show both writing to and reading from the Exosite platform.

In this project we’re going to be playing with a really cool device that we stumbled upon called the Relayduino from a company called Ocean Controls. It is basically a board with eight relay outputs and three analog and four digital optically isolated inputs all controlled by an embedded Arduino. Luckily for us, it includes the traditional Arduino header locations so we can throw an Ethernet shield on it and control it from the cloud with Exosite.

The Hardware

  • Relayduino - 12 Volt or 24 Volt (We got ours from Sparkfun )
  • Arduino Ethernet Shield
  • A 2x3 Male Header
  • Set of Arduino Headers
  • 12 or 24 Volt Power Supply

Once you’ve gathered all the parts needed, you’ll need to open up the Relayduino and solder in the 2x3 male header and the set of Arduino headers. The easiest way to do this is to stick all the headers onto the Ethernet shield slot it all into the relayduino, flip it over and solder each pin. This will keep all of your headers perfectly aligned and in place while you solder.

Next plug in an Ethernet cable, a USB cable to your computer, and the power cable. (The Relayduino can not be powered by the USB cable.)

The Software

If you’ve never used an Arduino before, you’ll need to grab the IDE from the Arduino website. This project has been tested on version 1.0.5, but any version in the 1.0.* family should work.

Next you’ll need to install the Exosite library. Download that repo and put in in the Arduino libraries folder. The readme has more specific information about installing it.

The source code for this project is included in the Exosite library, to open it go to File->Examples->Exosite->Relayduino. You’ll need to make two changes to the source in the USER SETTINGS setion to get it up and running. First, modify the macData variable to match the MAC address of your Ethernet shield, it should be printed on a white sticker on the underside of the shield. Second, you’ll need to modify cikData variable with the CIK of your device, but to get that we’ll need to add a Relayduino to your account so you have a CIK to add.

To the Cloud!

Login to your account. If you do not have one, you can create a free community account.
To add the Relayduino to your account:

  1. Go to your devices page and click on “+ Add Device”.
  2. Select “I want to add an unlisted device.”
  3. Enter the following information:
  • Vendor: exosite
  • Client Model: oc-kta-223
  • Serial Number: Your Ethernet Shield’s MAC Address in the form 00:00:00:00:00:00
  • Name: Whatever you’d like your device to be called.
  1. Copy the CIK that is shown into the cikData variable in the Arduino IDE.
    Click on the Upload Button in the Arduino IDE, holding the reset button on the Arduino (or the Ethernet Shield). The IDE should say “Compiling sketch…” in the status area, as soon as it says “Uploading…” release the reset button. Once the firmware upload finishes, it will automatically start running and you should see your data begin to stream into the Exosite platform.

Congrats your Relayduino is now part of the Internet of Things! Setting the values of the Output datasources to either a one or a zero should open or close the contacts of each of the output relays. You can access the pre-built dashboard (shown above) by selecting the proper dashboard from the dashboard link in the left-hand menu.