Pinterest Stumbleupon Whatsapp
Ads by Google

For home automation, remote control or monitoring of your Arduino, Arduino Manager does it all. Here’s how to use it to control your Arduino from a mobile or tablet.

Requirements

Today, I’m testing with iOS, but the Android app functions are identical with the exception the absence of the code generator.

Introduction

Android Manager is a nice interface to control your Arduino remotely over WiFi or Ethernet. As well as the obvious features of being able to turn on or off relays and servos, you can gather sensor data and create thresholds or alarms that react to that data. The app consists of a grid, each section of which can have a different control module or widget. When you’re happy with the result, these can be shared too.

arduino manager-2

Not so fast though: you will need some Arduino coding skills to make the magic happen. An example is provided and full documentation is available, but do bear in mind that any project you produce is a combination of the UI created by Arduino Manager plus some custom coding for your Arduino. If this puts you off, know that the iOS version of the app has a single in-app purchase which will generate suitable code for you. Learning to change this code is out the scope of todays tutorial, but you can expect me to cover it again for future home automation projects.

Ads by Google

Getting Started

Ensure the ArduinoManager library is installed on your system first, then open up the example code and find the following lines:

/*
*
* IP info
*
* Using DHCP these parameters are not needed
*/
IPAddress ip(192,168,1, 233);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);

Edit those for your own home network. You should also be able to use this away from home if you have port forwarding What Is Port Forwarding & How Can It Help Me? [MakeUseOf Explains] What Is Port Forwarding & How Can It Help Me? [MakeUseOf Explains] Do you cry a little inside when someone tells you there’s a port forwarding problem and that’s why your shiny new app won’t work? Your Xbox won’t let you play games, your torrent downloads refuse... Read More set up, but we won’t be covering that.

Note that if you’re running on an Arduino Uno, you will need to disable the SD card data logging support in order for the program to fit in memory. Open IOSController.h or AndroidController.h and comment out this line (place // in front)

#define SD_SUPPORT

Arduino Mega users won’t have this problem since it has more memory.

Wire in a test circuit according to the following diagram (if it’s too small, you can view a larger version of page 18 of the documentation, or read the instructions below; that temperature sensor is supposed to be going to A0).

circuit

  • Connect an LED to pin 8 with suitable resistor on the negative side (short leg). This will be controllable from within the iOS app.
  • Connect another LED to pin 7, again in series with a resistor. This will turn on whenever the app is connected.
  • Put a potentiometer on A2. The middle leg is the output pin, just connect the legs at either side to +5v and ground – it doesn’t matter which.
  • Put a light sensor on A1. One pin of the light sensor should go to +5v, the other should be connected to both A1 and to ground via a 10k Ohm resistor.
  • Put a TMP36 temperature sensor to A0. The middle leg is the output pin; with flat side facing you the leftmost pin is +5v, the rightmost pin is ground.
  • Finally, put a servo on pin 9. Yours may differ, but generally speaking, the white cable is the control line, then the red and black are +5v and ground respectively.

Here’s one I made earlier.

arduino manager-1

Unzip, and email the resulting Widgets.lst to yourself, and you should be able to open my ready-made control board. You’ll also need to click the configuration button in the bottom right to set up the correct IP address first, then tap that icon to connect.

If you’d prefer to make your own interface, toggle over into edit mode on a clean board and double tap on any empty square to open up the module list.

arduino-manager-screenshot

After adding a module, tap the grey bar to label it. In the demo circuit and code, the following labels can be set:

  • T for the temperature sensor.
  • L for the light sensor.
  • L1 for one of the LEDs. The other LED turns on automatically to indicate a successful connection to your mobile device. L1 can set as both a switch and LED indicator.
  • Pot for the potentiometer.
  • Knob controls the servo (but I found a slider to be better – the actual knob module is a little fiddly. Add a slider and called it “Knob”, it will work fine)

If you want to control different things then you’ll need to adjust the Arduino code to suit your project.

Alternatives

I checked out a number of alternatives while investigating this topic and the most viable competing application is called ArduinoCommander, but sadly, all the nice features are locked behind a paywall such that it would cost you $50 or more to unlock everything; the site that supports the app is also offline. It worked for basic features when I tested it, but I’m not going to endorse that app that can’t even keep it’s support site online and chooses micropayments for everything. Arduino Manager is just better, and only has one in-app purchase for an advanced feature.

So, now we’re all set to start an Arduino Home Automation project! Do you think you can make use of Arduino Manager?

  1. Ben
    November 16, 2015 at 12:23 am

    Can it connector multiple Arduino's?

    • James
      November 16, 2015 at 10:39 am

      No. To be honest, this guide is outdated. If you'd like to use Arduino specifically for home automation, I strongly suggest looking into OpenHAB: http://www.makeuseof.com/tag/getting-started-openhab-home-automation-raspberry-pi/ - combined with an array of Arduino-like sensors built on ESP8266, which is a sub-$10 Arduino-comaptible board with built-in Wifi. We'll have a tutorial out for it very soon, but you'll want to get started on setting up OpenHAB on Raspberry Pi soon as possible.

  2. Eduardo
    April 12, 2015 at 2:26 pm

    hi,
    Would you help me?
    I'm not finding the code to your watch use
    the one Arduino, you would have the code ready for me to have an idea?
    Thank you.

  3. haslam
    March 3, 2015 at 3:12 pm

    what software did you used to make the android apps ??

  4. Jamie Brooks
    May 23, 2014 at 5:23 pm

    Can the software be used to connect the Adruino to my iOS using a USB cable or does it have to be connected using wifi/ethernet. Will the blu-tooth shield work the same as the wifi?

    • James Bruce
      May 23, 2014 at 5:31 pm

      iOS is limited to the network, bluetooth (with correct shield), or RF options. USB connection is Android only.

  5. bk
    April 30, 2014 at 10:51 am

    I definitely will try this out! This is fantastic and useful. The thought occurred however, could the app source code be purchased (licensed) to permit specific user custom modifications? I can do iOS development.

    • James B
      April 30, 2014 at 11:02 am

      Perhaps - you would need to ask the developer, of course.

  6. Hank
    April 1, 2014 at 1:02 pm

    Thanks for the article. I've built a few Arduino projects and may try this out.

Leave a Reply

Your email address will not be published. Required fields are marked *