A very good wireless local area network (and personal) is undoubtedly the Bluetooth (BT). Today in our day-to-day is common to find us with cell phones, stereos, cameras, etc., interconnected with the help of the famous "blue little light”.

In the world of IoT and automation in general, it is very common find remote controls via mobile phones using BT technology. This is due to two basic components, but very important:

  • Simple Development Platforms for ANDROID apps (like MIT AppInventor2) Cheap and
  • affordable BT modules (eg HC-06)

In this instructable, I will develop some ideas about controlling Arduino’s outputs through a mobile device in order to move a Robot, turn on lamps on a house, etc.

Step 1: The Bluetooth module and the Arduino

In the market is very common to find BT modules 3.0 "Master-Slave" as the HC-05 and "Slaves" as the HC-06. More recently, appeared HC-08 and HC-10 working with technology BT 4.0 or BLE ( "Bluetooth Low Energy").The BLE modules are the only ones that can be connected to an iPhone, because unfortunately Apple does not provide support to BT 3.0.

For the projects discussed here, I will use an HC-06 that is very popular and cheap (Bye, bye, Iphone! Androids win here!). The module is powered with 5V which makes it to be easily connected to an Arduino UNO for example. His transmit (Tx) and receive (Rx) pins can be connected directly to the UNO, with no need to use voltage dividers as we see in the case of ESP8266. Usually the HC-06 should be connected directly to pins 0 and 1 Arduino (“Serial 0”):

  • HC06-Tx to pin Arduino 0 (Rx)
  • HC06-Rx to Arduino pin 1 (Tx)

When using Serial 0 inputs (the only HW Serial port at UNO), it is very important to remember that the HC-06 may not be physically connected to pins 0 and 1 during the program load, because the USB port also use the same serial. A simple way to get around this little problem (if your project does not use many GPIOs UNO) is to use a “SW serial port” through the library SoftwareSerial. In our case here, we will use the pins 10 and 11 of UNO (Tx, Rx respectively).

<p>Nice but I can not make it work so that the leds go out when i tell them. I can turn them on but not off with voice commands. Any idea?</p>
<p>btw I use a HC-05 it works!</p>
<p>also, can you explain the voicecontroll code for the arduino, what exactly is going on?</p>
<p>i wanted to try this with the pic18f452 any idea how i could do it</p>
<p>it uses assembly code or c </p>
<p>great very easy with help</p>
<p>Thanks a lot!</p>
<p>Thanks a lot!</p>
<p>a great&hellip;&hellip;</p>
<p>Thanks a lot!</p>
<p>Very nice project! Thanks for sharing!</p><p>Can I use a HC-05 instead of HC-06?</p>
<p>I never used the HC-05, but it should work fine once it is a Master/Slave. The HC-06 is only a slave, so HC-05 works. Besides, both works with BT 3.0 (compatible with Android devices). As far as I know there are some differences regarding the AT commands response, but the HC-05 are superior, like respond with the device name, etc. </p>
<p>Thanks! I'm gonna try it and let you know the result.</p>
<p>Any tips for transferring large amounts of data faster than available via the serial port profile? </p><p>Most BLE applications I've seen are 250kbps, so I'd like to find some bluetooth classic (2.1 EDR) solution.. which should in theory support 2.1Mbps (probably using the FTP profile)</p>

About This Instructable




Bio: Engineer, 
Married to Ilza, 
Paula's father, 
Living in Santiago, Chile.
More by mjrovai:IoT: Connecting the RPi, Arduino and the world!Hacking a RC car with Arduino and AndroidMaze Solver Robot, using Artificial Intelligence with Arduino
Add instructable to: