Two-way Bluetooth communication made easy

It’s hard to imagine an easier way to set up communications between an Android device and an Arduino using Bluetooth than by following this guide. In the center of the breadboard you can see the cheap and ubiquitous HC-05 Bluetooth module. Having picked up one of these ourselves we can attest that after opening the package and holding one in your hand you may be struck with a “where do I start?” conundrum. If you’ve got an Android handset and an¬†Arduino you start right here, then methodically replace one side of the equation at a time until your own project has a Bluetooth component and you actually understand how it works.

Hardware for the project comes in a couple of parts. The Bluetooth module wants 3.3v logic levels so that is taken into account. The image above shows a buffer chip doing the conversion, but the Fritzing schematic on the post uses a voltage divider. The software end of things consists of an Arduino sketch and an Android app. Check out all the controls on that screen. With bi-directional communications and a slew of already-configured commands this should get you up and running quickly on pretty much any possible project.

One thing to note is that there are different firmwares for these HC-05 units. For more on that see this project.

http://www.youtube.com/watch?v=USeZd9jthZM

14 thoughts on “Two-way Bluetooth communication made easy

    1. The HC-05 model the breakout board comes with current limiting resistors which means you can get away with wiring 5V to the HC-05 but it will deteriorate overtime until it stops working.

  1. I can confirm these bluetooth modules are simply the easiest/cheapest way to add wireless communication to your project.
    They are so cheap it’s basically not worth looking into any other option…
    Here are a couple of projects I used them on, and I love them !

    http://trandi.wordpress.com/2013/04/17/stepper-motor-bluetooth-serial-driver/

    http://trandi.wordpress.com/2012/01/13/spoka-night-light-controlled-from-and-android-phone/

    The 1st one uses a slightly more expensive version of the module, that is pre-soldered and has nice connectors, but still, for only 2¬£ extra I think it’s worth the effort saved…

    Dan

    1. this is great, BUT
      pin security is a joke in Bluetooth world.
      Is there anything dangerous exposed over this link? can you break engine by just programming megasquirt wrong way?

      Of course this is extremely far fetched, but I can see some people using this BT module to connect to ODB ports, and that means remote door opening, key pairing and so on.

      1. Oh absolutely – easy;YES secure;NO
        Security through obscurity I guess. Once the car is all tuned I would probably disconnect the module. Anything you could do once you pwnd it would just make the motor stall out and make it a pain in ass to get the car going again without AAA. (like wipe the spark table) You can’t drive the pistons into the valves or anything…
        – Kris

        1. I wouldn’t worry too much about it unless you really upset some technically savvy people. On the other hand, while in most motors you can’t command immediate physical destruction (valves into pistons, etc) you could re-write a super-lean fuel table. Super-lean running under load will burn holes right through the top of your pistons. It’s a long-game attack for sure…

          I guess if it’s a turbo car you could probably write ridiculous boost values too. I know you can rewrite them in my car (went from 138hp/148ft-lbs to 168hp/198ft/lbs).

  2. In addition to the above guide, I had also published another Bluetooth guide titled “Cheap 2-Way Bluetooth Connection Between Arduino and PC” http://goo.gl/1HGjx for those who are interested in Bluetooth HC-05 communication with Arduino but without an Android device

  3. It’s nice for simple experimenting and as an introduction to arduino >bluetooth> mobile communication but I personally think it’s better to use appinventor – it really let’s you customize your app and access all the different hardware on mobile phones: gyros, accelerometers, wifi, other sensors, touchscreen, text to speech and speech to text, read text messages and everything you need

    Here is some of my work, feel free to use the code and modify it:

    If you have any questions or problems just find my thread on arduino forum

      1. Yeah hazim, MIT is well known for its sloppiness…. ohh and it’s kind of hard to get ppl to pay 3$ for an app if there are free and fully customizable alternatives. So yeah I see your point entirely. Grow up dude or get a real job

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s