ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino




UPDATES 

  • October 30, 2013 – 7PM (GMT+2) The new official name for this app is ArduDroid and it can be installed from Google Play. I changed the name to avoid a naming conflict with another app.  
  • September 15, 2013: I Have won a Nexus 7 tablet for this project part of a competition held by Instructables.com Thanks to everyone who voted.
  • August 18, 2013: I have uploaded the Anrduino 0.11 alpha version with fixes to key bugs reported by users.
  • July 10, 2013: Featured on MAKEZINE http://makezine.com
  • July 8, 2013: Featured on Hackaday http://goo.gl/Lim0W
  • July 7, 2013: I have completed a comprehensive round of testing and will be uploading the beta, with minor UI updates.
  • July 4, 2013: Featured on Dangerous Prototypes  http://goo.gl/HZatN

ArduDroid A Simple 2-Way Bluetooth-based Android Controller for Arduino




INTRODUCTION
ARDUDROID (formerly Andruino) is a simple Android app to help you control the pins of your Arduino Uno (or clone) from your Android phone wirelessly. It’s both an Android app and an Arduino program. ArduDroid employs a simple Android user interface to 1) control Arduino Uno’s digital and PWM pins 2)  send text commands to Arduino 3) and receive data from Arduino over Bluetooth serial using the ever popular and really cheap (less than $10 from ebay) HC-05 Bluetooth over serial module.
This app has been tested and designed for the HC-05 Serial Bluetooth module. Other Bluetooth modules may or may not work.Also, while I used Arduino Uno in this prototype, feel free to experiment with other models of Arduino.
I have published a guide before on building and programming a circuit with the HC-05 Bluetooth module and Arduino but I will briefly describe again in this guide how to wire the circuit using a breadboard and jumper wires.
Special thanks to engineer Jafar Quttaineh for testing the app and for his invaluable input.

READ  Core2duino Updated with Arduino

How to use ArduDroid

You can use ArduDroid to send commands to Arduino to control a relay to turn electric gadgets on/off, control a robot servo, increase/decrease speed of a motor and reverse direction, dim a light, speed up a fan, and so on.  Furthermore, you can read Arduino pins and sensors then transmit the data back to your android phone.

ArduDroid Components

Hardware

  • Android device running version 2.3.3 or higher with Bluetooth.
  • Arduino Uno or compatible,
  • CD4050 level shifter IC  or 2K Ohms & 1K Ohms resistors as voltage dividers.
  • HC-05 Bluetooth module. Other Bluetooth over serial modules may or may not work.
  • Breadboard & jumper wires.
  • Power source.

Arduino IDE Software
Arduino IDE 1.05 or later
You can install the latest version of ArduDroid from Google Play.
Certificate fingerprints for 0.11 Alpha (before Google Play):
MD5 : BA:80:C2:6A:68:31:8F:21:D6:FC:08:8E:09:D8:F5:CF
SHA1: 04:EA:2E:47:80:71:BE:D9:D2:ED:86:5F:15:1F:1E:9E:77:62:DB:85
Bug fixes:
– Annoying disconnect message removed .
– Bluetooth connection no longer disconnects when device orientation changes.

2) The ardudroid.ino is the accompanying sketch/firmware for the Arduino Uno

Wiring the Circuit

Please note that while my actual prototype uses the CD4050 IC to level shift from 5V to 3.3V, in the diagram below I am using a voltage divider because I believe it will be simpler for most people to acquire the resistors than the IC.  You only need to drop the Arduino’s TX voltage to 3.3V to match the RX of the HC-05. The Arduino’s RX pin can handle the HC-05 incoming TX signal which is 3.3V.
I used 2K and 1K ohms resistors in my circuit diagram to drop 5V to 3.3V but you can use different resistor values. Google “voltage divider calculator” and use the myriad calculators to determine what other resistor values work best for you.ArduDroid A Simple 2-Way Bluetooth-based Android Controller for Arduino SchematicHow to modify the Arduino companion program

On the Arduino side I have included a skeletal program that intercepts and processes the ArduDroid Commands issued from your Android device.  You can update the Arduino code according to your project needs.
ArduDroid is both an Android app that sends/receives data from Arduino with the help of an Arduino sketch named ardudroid.ino In this sketch, there are four code blocks supporting the four key functions of ArduDroid. You can modify these code blocks to suit your requirements.
They are labeled according to their function in a comment line at the start of each code block. I inserted a comment “// add your code here” to help you find and place your code, but you can decide how you wish to modify the functional code blocks.This is the code block that receives the PWM value from 0 to 255 that you send from Android to control the PWM designated Arduino Uno pins 11,9,10,5,4,3. You can add code to control a motor for a robot or fan, for example, to speed it up or slow it down. Or you can send a command to dim a light.
// 3) GET analogWrite DATA FROM ARDUDROID
if (ard_command == CMD_ANALOGWRITE) {
analogWrite(  pin_num, pin_value );
// add your code here
return;  // Done. return to loop();
}

READ  DIY Speedometer using Arduino and Processing Android App

For more detail: ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino




Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Ultra-low noise linear regulators for powering
Product How-to: Ultra-low noise linear regulators for powering PLL/VCO and clocking ICs

Wideband communication systems usually require an ultra-low noise regulator to power the VCOs and PLLs. The regulator must also be...

Close
Scroll to top