This is the first of two instructables that make up a complete customizable Home Automation for Beginners example.
See DIY Home Automation for Beginners for the second part. It is aimed at the absolute beginner. If you can handle a sharp knife without cutting your fingers off you can make and customize this home automation controller.
The first instructable shows you how to use the free pfodDesigner available on GooglePlay to design Android menus to switch Ardunio outputs on and off from your Android mobile, without you having to write any program code at all. The Fish Tank picture above shows the example designed in this instructable.
The example project shown here is suitable for complete beginners. This instructable does not require any soldering and No coding experience is required.
Once you have finished this instructable you will be able to design whatever menus you need to switch Arduino outputs on and off. When you have completed the second instructable you will be able to switch real things on and off from your Android mobile, via relays connected to Arduino’s digital outputs.
This instructable is also available as a tutorial at Android/Arduino menus for Beginners
The menus are completely customizable. You can change the text, color and font size as well as selecting the Arduino output to be controlled. All using the pfodDesigner running on your Android mobile. The pfodDesigner gives you an exact preview of how your menu will display when you connect using pfodApp . No Android Programming is required.
When you have finished designing your menu, the pfodDesigner generates a complete, well commented, Arduino sketch that will implement your menu and allow you to turn the outputs on and off via your mobile using the pfodApp (via bluetooth or wifi). No Arduino Programming is required.
As part of the design you specify which digital output each On/Off Toggle button is connected to. Arduino digital pins can be configured as either inputs or outputs. The code generated by the pfodDesigner configures the selected pins as outputs. When configured as an output, an Arduino digital pin can be either High or Low.
On an Uno, when it is High, the pin supplies +5V (Vcc) and less than 40mA. On Arduino boards Vcc is either +5V or +3.3V depending on board. When the output pin is set to Low, it grounds anything you connect to the pin and can drain away less than 40mA. These outputs have enough power to drive a led or a reed relay, but not enough to directly drive the 5V relay coil of a power relay, so a second Instructable will look at connecting a relay board to the outputs to switch real things on and off.
What you need to be able to do before you start this Instructable.
This project is suitable for complete beginners but you need complete a few tasks before you start.
You need to first set up the Arduino IDE, install pfodDesigner and make sure you can transfer the final sketch (code file), that pfodDesigner produces, from your mobile to your computer.
- Install the Arduino IDE for your computer’s operating system from Getting Started with Arduino and work through the example of compiling and running the Blink example.
- Install the free pfodDesigner app on your Android mobile.
- Check that you are able to transfer files from your mobile to your computer either via a USB cable or a file transfer app such as WiFi File Transfer. See pfodAppForAndroidGettingStarted.pdf for more details.
What you need to buy for this Instructable
The pfodDesigner is free so you can do most of this tutorial with just that pfodDesigner on your Android mobile. But if you want to actually switch something on or off you will need some hardware and the pfodApp.
Here is a complete parts list for Part 1
- You need an Arduino board. The tutorial uses an Arduino Uno.
- You need a wifi or bluetooth shield, connected via a serial connection, so your Android mobile can connect to the Uno. This tutorial uses iteadstudio BT Shield (Slave) which connects via Serial at 9600 baud.
- Finally to test your design, you need to download pfodApp from GooglePlay to connect your Android mobile to the Uno via the bluetooth (or wifi) shield and display the menu you have designed for you to control the Arduino outputs. See pfodAppForAndroidGettingStarted.pdf for how to set up a bluetooth connection in pfodApp.
In a later Instructable you will be adding relays to actually switch things on and off.
Now lets build and test an example menu. At the end of this you will be able to build any menu you like to switch Arduino outputs on and off.
Step 1: An Example Fish Tank Control Menu
This Instructable will design a custom menu on an Android phone to control the low voltage light and pump of a fish tank. Here is what the final menu will look like, but you can choose your own text and colors and font sizes using the pfodDesigner.
Step 2: Starting a New Menu
On opening pfodDesigner you will be presented the Start new Menu button or if you have already started a menu you will also see an option to Edit existing Menu. Each screen also has a Help button.
Clicking the Start new Menu button displays a list of operations available for the new menu. A new menu is created with no buttons and a default menu name, Menu_1
Click Preview Menu to see what the current design looks like. No buttons yet, just some default prompt text at the bottom.
Use the mobile’s back button to go back to the Editing screen to edit the default prompt to something more useful.
For more detail: Code generator for custom Android or Arduino menus
This Post / Project can also be found using search terms:
- android menu arduino