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

Requirements

I’m testing with iOS today, but the features of the Android app are identical except for the lack of a code generator.

  • ArduinoManager , for iOS or Android
  • Arduino
  • Official Ethernet or WiFi Shield
  • IOSController library installed in your libraries folder (or Android controller)
  • Sample code for Ethernet or WiFi versions
  • Servo, some analog sensors and a potentiometer, a breadboard and some LEDs for playing. All of these components should be common to any Arduino starter kit. .

Introduction

Android Manager is a handy interface for remote control of your Arduino via WiFi or Ethernet. In addition to the obvious features of being able to turn relays and servos on or off, you can collect sensor data and create thresholds or alarms that respond to that data. The application consists of a grid, each part of which can have a separate control module or widget. When you are happy with the result, you can share it too.

Arduino Manager-2

But not so fast: you’ll need some Arduino programming skills to make the magic happen. An example is provided and full documentation is available, but be aware that any project you create is a combination of a user interface created by the Arduino Manager and some custom code for your Arduino. If that puts you off, know that the iOS version has one in-app purchase that will generate a code that’s right for you. Learning this code is beyond the scope of today’s tutorial, but you can expect me to cover it again for future home automation projects.

Beginning

Make sure you have the ArduinoManager library installed on your system first, then open the sample code and look for 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 them for your home network. You should also be able to use this away from home if you have port forwarding but we won’t cover it.

Note that if you are running an Arduino Uno, you will need to disable 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 (put // ahead)

 #define SD_SUPPORT 

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

Connect the test circuit according to the following diagram (if it is too small, you can view a larger version page 18 documentation or read the instructions below; the temperature sensor is supposed to go to A0).

scheme

  • Connect an LED to pin 8 with a suitable resistor on the negative side (short leg). This will be controlled from the iOS app.
  • Connect another LED to pin 7, again in series with the resistor. This will turn on whenever the app is connected.
  • Put the potentiometer on A2. The middle pin is the output pin, just connect the pins on both sides to +5V and ground — it doesn’t matter which.
  • Put the light sensor on A1. One pin of the light sensor should be connected to +5V, the other should be connected to A1 and ground through a 10kΩ resistor.
  • Set the temperature probe TMP36 to A0. The middle leg is the output pin; with the flat side facing you, the leftmost pin is +5V, the rightmost pin is ground.
  • Finally, set the servo to 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 is the one I made earlier.

Arduino Manager-1

Unzip and email the resulting Widgets.lst to yourself and you will be able to open my finished control panel. You will also need to click on the configuration button on the bottom right corner to set the correct IP address first and then click on that icon to connect.

If you prefer to create your own interface, switch to the blank board edit mode and double-tap on any empty square to open the list of modules.

arduino-manager-screenshot

After adding a module, click on the gray bar to mark it. The following labels can be set in the demo schema and code:

  • T for temperature sensor.
  • L for the light sensor.
  • L1 for one of the LEDs. Another LED turns on automatically, indicating a successful connection to your mobile device. L1 can be installed as a switch or an LED indicator.
  • Pot for the potentiometer.
  • A pen controls the servo (but I found the slider to be better — the handle module itself is a little fiddly. Add a slider and name it «Pen», it will work fine)

If you want to control different things, you need to customize the Arduino code to suit your project.

alternatives

I explored several alternatives while researching this topic, and the most viable competing app is called ArduinoCommander, but unfortunately all the nice features are locked behind a paid screen, so you’ll need $50 or more to unlock everything; the site that supports the app is also offline. When I tested it, it worked for basic features, but I’m not going to endorse this app that can’t even keep its support site online and opts for micropayments for everything. The Arduino Manager is simply better and only has one in-app purchase for the advanced feature.

So now we are ready to start the Arduino Home Automation project! Do you think you can use the Arduino Manager?

Похожие записи