I had ordered HC-05 Bluetooth adapter for Arduino. After some frustration with some failed attempts to do the communication with it, I left it waiting for new motivation. Then last week I happened to see Triggering Remote Fireworks with an Arduino and an Android article that pointed to ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino web page. ArduDroid is is a simple Android app designed to control Arduino Uno pins wirelessly. ArduDroid consists of both an Android app and an Arduino program. ArduDroid allows to control Arduino Uno’s digital and PWM pins, send commands and receive data. The communication works over Bluetooth serial using popular HC-05 Bluetooth over serial module.
This was all incentive I needed to start experimenting with Bluetooth module again. First I downloaded the Android app to smart phone. Then I made HC-05 Bluetooth module connection to Arduino according to ArduDroid app instructions:
The connection is pretty direct connection except for the Arduino TXD pin. The HC-5 Bluetooth module runs on 3.3V while Arduino UNO runs at 5V, which complicates interfacing. The base board for HC-05 does the power supply regulation from 5V to 3.3V, but the TX and RX data lines needs to be adapted. On the data direction from Bluetooth module TX pin to Arduino RXD pin direct conversion works well because 3.3V signal is strong enough to drive 5V input. On the other direction 5V TXD signal from Arduino is too high level for normal 3.3V input, and because there is no data to guarantee that this input would be 5V compliant, the safest bet is to do signal level translation. In this application the 1kohm and 2kohm resistors for a voltage divider that converts 5V signal to 3.3V level. I used in my circuit 1kohm and 2.2 kohm resistors. Some web pages show that direct connection without resistors might work also work if there the base board for HC-05 has level translator in it. In my case I think my module does not have that level translator, so I thought that it is better to be safe than sorry.
Things worked well without too much problems. To get the Bluetooth connection work, I had to pair my smart phone with the HC-05 (pairing code needed was 1234). Then I started ArduDroid app, and wondered some time to make it to connect, but finally found out that pressing the button for app settings gave me the option to select the Bluetooth connection I wish to use. After that I could easily control the digital outputs and PWM outputs with ArduDroid app (comparable functionality to what I got with IOIO + Bluetooth).
Here is more complicated test circuit in use. There I have wired in one LED (car 12V LED with internal resistor) and one RGB led module. I can easily use this set-up to control LED brightness and RGB led color.
Here is closeup of control app running on Android smart phone:
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. It should be also possible read Arduino pins and sensors then transmit the data back to your android phone: in my testing I could get reading of analogue input by pressing
For more information there is introduction video ARDUDROID: The 2-Way Android Controller for Arduino via Bluetooth which is worth to check out.