loading
UPDATE

INTRODUCTION

In the guide, I will explain how I managed to send data back and forth between a PC and Arduino via a cheap Bluetooth HC-05 transceiver, which can be found for less than $10 on ebay with the breakout board. The version I have used in this project does not have a breakout board so it's little cheaper but  more difficult to solder.  I strongly recommend buying the module with the breakout board. This Bluetooth transceiver basically acts as a generic serial COM port.

The PC to Arduino Bluetooth serial connection can be useful in many applications such as controlling servos, motors, and writing to LCDs. The Arduino to PC connection can be useful in applications where the Arduino reads sensors then pass their values  via serial Bluetooth to a PC for processing. The distance for this transceiver is about 30 feet or so but it really depends on many other variables. This is ideal for indoors projects. 

The only downside of this cheap Bluetooth transceiver is the absence of headers which means you have to solder at least 4 wires. Then there's the absence of power LED as well as no TX/RX LEDs. I did not consider these features a necessity but some of you might want to pay more and get an enhanced version of this transceiver with all of these features.


The Bluetooth serial module I bought has the following specs:

-- Default COM setting: 9600, N, 8,1
-- Default Password/pairing code: 1234.
-- Supports the AT command to modify the baud rate, device name, passkey, master/slave, etc.
-- Supports baud rates 2400 -1382400.
-- Based on the CSR Bluetooth chip BC417143
-- Bluetooth specification v2.0 + EDR
-- Power supply: +3.3VDC 50mA
-- Frequency:  2.4GHz ISM band
-- Modulation:  GFSK(Gaussian Frequency Shift Keying)
-- Emission power:  ≤4dBm, Class 2
-- Sensitivity:  ≤-84dBm at 0.1% BER
-- Speed: Asynchronous:  2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps
-- Security:  Authentication and encryption
-- Size: 26.9mm x 13mm x 2.2 mm.
-- Working temperature: -20 ~ +75 Centigrade
-- Dimension: 26.9mm x 13mm x 2.2 mm

CREDITS

During my research, I have benefited from many projects on this and related topics. I have listed them in the references section.

RELATED PROJECTS

1) In a previous project, I used a Pololu Wixel and an Arduino to control a robot remotely from a PC terminal. Here, I will show similar data exchange functionality but without the robot.

2) I also hacked the RF system of cheap wireless car toy and used the Arduino to transmit signals.


Step 1: The parts list

HARDWARE

-- Arduino Uno (R2) or clone.
-- Bluetooth serial transceiver connected to Arduino. I got one from Ebay with the BlueCore4 chipset. Search Ebay for Wireless Bluetooth Transceiver Module RS232 / TTL.
-- Bluetooth USB dongle to be connected to PC. I used an old MSI pc2pc Bluetooth as well as a Bollionton Bluetooth USB dongles and both worked fine. 
-- The 1.2K Ohms & 2.2K Ohms resistors will be used as voltage dividers to drop the Arduino's 5V to about 3.3V. You can substitute these with 10K Ohms & 20K Ohms resistors. If you know how to calculate voltage dividers, feel free to use other values for your resistors. 
-- Breadboard and jumper wires.
-- Power source. I used a 9V battery.
-- Any PC that supports Arduino IDE will be needed to program the Arduino microcontroller. 
-- Most PCs and  smartphone w/Bluetooth and a terminal emulator can be used to control the Arduino. 

SOFTWARE

-- Windows 7 64-bit. But this should work on other platforms supported by the Arduino IDE.
--  Arduino IDE 1.0
--  Tera Term Pro  terminal emulator but other similar emulators should work.
-- Tera Term by the original author of the software
<p>What all can you do with this? I am looking for a way to communicate long-distance with a friend, I have almost all the tools and supplies needed, so can you actually make them &quot;talk&quot; with each other?</p><p>If so that would be great, but it was a great tutorial!</p>
<p>Any idea why iPhone does not see the device? </p><p>It works fine with Mac OS X, though.</p>
<p>The protocol is different with iOS. I got s low cost Android tablet to experiment with.</p>
<p>http://www.eevblog.com/forum/beginners/hc05-bluetooth-and-iphone/</p>
<p>Hello, i have a noob question,to use the HC05 must i go through any initial set ups? i followed you intructions, my pc already have a built in bluetooth. i connected to the HC-05 uploaded the code onto my arduino, then used a separate power source for the Arduino . i made sure to connect to the sending COM and when i try to create a connection from arduino to BT it fails . gives me avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x59</p>
<p>Would be cool if you didn't post your comment 10 times.</p><p>Anyway, i think your problem is not in the serial connection to your arduino,but programming your arduino.</p>
<p>Will this code work with this</p><p><a href="https://www.robomart.com/arduino-uno-online-india" rel="nofollow">https://www.robomart.com/arduino-uno-online-india </a> ?</p>
If i want to connect BT 53 module. It has version 4.1, what will be the procedure to connect it?
<p>Thanks for your instructable. Any idea why it doesn't work on an Arduino Mega powered via 9V (not USB)?</p><p>When using SoftSerial (using other pins) or Serial1 it works, just not on the standard Serial port on pins 0 and 1.</p><p>I'm using a 2k and a 1k resistor.</p>
<p>Is HC-06 works with same steps?</p>
<p>This worked for me when testing, and installing and pairing worked fine without any errors. The bluetooth device is shown as HC-06 in Windows.<br><br>However, connecting to COM7: Standard serial over bluetooth (yes, COM7 is correct), both with tera term and other emulators, nothing happens.<br><br>Also, you have this at the end of your tutorial:<br>&quot;Also make sure the settings are the same for both Bluetooth serial modules. In this case: 9600, N, 8,1&quot;<br><br>9600 is correct, as it's the default speed. But where does &quot;N, 8, 1&quot; enter into the picture?<br><br>The only configuration options I can find are for the Serial connection in tera term, and they show the following:<br><br>Port: COM7<br>Baud rate: 9600<br>Data: 8 bit<br>Parity: none<br>Stop: 1 bit<br>Flow control: none<br><br>This was done with the USB cable still connected. When I disconnected this, the bluetooth device was still shown as connected and paired on port COM7, but this changed nothing.<br><br>Then I tried connecting my Android phone to it, and connection and pairing worked fine. I also ran a bluetooth terminal emulator on the phone, and it was successfull in connecting to the device.<br><br>However, sending 1 or 0 from the emulator did nothing, while it worked fine in the Serial monitor in Arduino.<br><br>Any ideas?</p>
Hi,<br><br>Just ensure your usb to serial rx is connected to hc05 tx and tx to rx... Opposite config... Should work fine :)
<p>In short, it works when testing from the Arduino IDE Serial Monitor, but there's no reaction when connecting the terminal emulator(s) over bluetooth, in Windows or Android. No echo return, and no LED on/off.</p>
thanks
<p>Can you please explain how to change pairing code using AT commands? I would really appreciate that. Email: <a href="mailto:umarsalmanrao5@gmail.com" rel="nofollow">umarsalmanrao5@gmail.com</a> THANKS!</p>
<p>It explains how to get to &quot;AT mode&quot; in the PDF.</p>
In case anyone has the same problem I had: the computer was receiving text from the arduino via bluetooth but I could not send text to the arduino from my computer or my phone. The break-out board I was using had a bad connection from the TX of the HC-05. If I bypass the break-out board and attach directly to the HC-05 TX pin everything works.
Hey I too have a same problem cn u pls tell me how to bypass the breakout board connection or jst send me the pics of ur circuit pls on my mail id parasvohra30@gmail.com
<p>Good instructions , any idea about how to flash another firmware to this moudle ?</p>
<p>My voltage on input RX is not hight enough and is about 3.06V instead of 3.33V. I used 1k and 2k resistors and my output 4.13V. So I shouldn't rely on this schematic and do my own calculation...</p>
<p>Very good instructional tutorial fine and working as stated. Thanks for the leading i correct path and android apps. for my future projects. I'm very much grateful to Bidar for his consistent support in this project</p><p>Thanks a lott</p>
<p>This came in handy! I had bought one of these a while ago and forgot how to wire it up. It is odd how the tx and rx on the arduino and bluetooth are mixed up, but it's the only way it'll work. And your method of communication is way better than the way I did it in the past!</p><p>Thanks!</p>
<p>Hi, Thanks for your work. </p><p>A suggestion - Do not use repetitive tinny sounding music. Any verbal is better, even if a different language.</p><p>After watching and listening to several videos it becomes grating on the nerves to listen and filter out such noise. And if we turn down the volume - IF - someone begins to speak we my may miss some good instruction. </p>
the BT module appeared in the serial ports menu on tera term but then i get the error &quot;cant open com6&quot; ... although the arduino serial monitor received the serial.println order and the boards rx kight blinks when i send 1 using the monitor but the led dznt work although it works if i switch to the blink led example by ardino website ... any suggestions,?
Worked perfectly. Cheers!
Hai tech.. I would like to ask question,..what if I dont have any 9V battery and I only connected the cable to my PC..the same set-up with your set-up ,the difference is that I will have PC and with the cable wire as the source of the power for my arduino,Will My Bluetooth Module works in this manner?
gr8 tutorial, did you use processing to create the app for android you are using,and is the source code for app available,i want to customise it according to my need. by the way thanx for the tutorial.
I just got this working using an <a href="http://www.ebay.com/itm/HC-05-Bluetooth-Transceiver-Host-Slave-Master-Module-Wireless-Serial-6pin-/221286562520" rel="nofollow">HC-05 module</a> sold by nyplatform on ebay. It has a built-in regulator and level shifting, and an led to show connection status.<br> <br> One problem that took me a long time to figure out was that instead of connecting my Arduino RX pin to the module's TX pin, and vice versa, I had to go TX to TX and RX to RX. After I did that everything worked fine.<br> <br> So wiring to that module is as simple as can be. Just connect like so:<br> &nbsp; Arduino module<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5V<br> &nbsp;&nbsp;&nbsp;&nbsp; GND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GND<br> <br> No voltage dividers needed. And it has header pins so it plugs right into a breadboard.
very nice work. can i ask you. could i, isntead of soldering to dig pins 0,1, do this: <br>plug usb cable. cut the cables, and solder those cables to the bluetooth??
can any body explain me what is role of master/slave/slave loop role in hc05 . <br>bcz when i was use hc 05as master role that could not find by othe BT device . <br>and can slave mode send data from uc to pc? <br>plz help me i cant uderstand..
Is the voltage divider needed or can I just plug the bluetooth module into the 3.3v pin of the arduino?
Ignore this, I wasn't paying attention,
thanks sir! It will help me a lot , but can hc-05 Bluetooth module sustain 4V of power supply ???
Thank you for the video. You helped me. You show how to add a new device in Windows, and at 5 minutes 25 seconds in the video, one can see that &quot;Other Bluetooth Other&quot; is replaced by &quot;HC05 Bluetooth Other&quot;. With my system, there was no change. It stayed on &quot;Other Bluetooth Other&quot;, and subsequently the device could not be added. So, You made me think my Bluetooth dongle is failing. I tried with another Bluetooth dongle, and, hurray, &quot;Other Bluetooth Other&quot; is changing to something else, i.e. &quot;Linvor Bluetooth Other&quot; in my case. And afterwards, everything is ok.
Hey, thanks for guide. It helped much enough! The only thing that I did not like is, I cant see com ports sometime. I don't know the reason why but when I unplug the power and give it again to the hc05 it becomes normal.
hello, <br>Thank you very much for the tutorial. I followed all the steps but i was not able to see the COM PORT number for my bluetooth (HC-05), there wasn't anything listed under &quot;Service&quot; inside the properties of the BT. Please suggest me what i can do next. <br> <br>Thanks, <br>Milan
Great guide. Thanks
The Problem I have is that I am sending it AT and the BT module SHOULD answer back with OK but nothing happens. If I use my mobile phone, I can see and connect to it easily! <br> <br>The BT TX is directly going to the Arduino RX however the Arduino TX is going into a 10k resistor, and into the RX of the BT. From here, I connect 20k to ground. <br> <br>So its like a potential divider, with RX of BT in the middle, 20k at bottom to gnd and 10k at top to Arduino Tx... <br> <br>
Will this code work with this <a href="http://www.digibay.in/development-boards/bc04-wireless-bt-bluetooth-transceiver-module-rs232-ttl-master-slave" rel="nofollow">http://www.digibay.in/development-boards/bc04-wireless-bt-bluetooth-transceiver-module-rs232-ttl-master-slave</a>?
I just released my Android software BTInterface I've used this module with a backplane. <br>Lots of info on my site www.btinterface.com <br>Please take a look. <br> <br>ian
It turned out that I needed a 2.2K resistor going from the HC-05 TX pin to GND. I suspect the default state either had too much or too little voltage going to the Arduino RX pin.
I'm seeing some strange behavior. <br>I'm using this HC-05 clone: <br>http://www.lctech-inc.com/Hardware/Detail.aspx?id=25662aa3-0517-4d3d-960e-ff261d5ef28c <br> <br>I hooked up the electronics as shown in your diagrams, except I used an adafruit level shifter instead of resistors. <br>I'm using a Mac and I'm able to pair with the device. <br>When I run the sketch that sends counter data, I'm able to open CoolTerm, connect to the HC-05 serial port, and I'm able to receive the data. <br>However, when I try to run the program where you can turn an LED on with 1 or off with 0, it does not work! <br>What could I be doing wrong?
Hello, when i use the resistor as voltage dividers i receive only random caracters on my computer and if i use it directly it works normal.. i get confused :/
plz i want some help i have bought an hc05 bluetooth module andhave done all the necessary wiring that you have done in the next steps but i am still not having any results when i am searching for the device from a mobile phone or any device. thx
Still dont have this working. My problem seems to be that when I have everything installed, communication over COM3, both the Arduino IDE as well as TeraTerm can't connect to that port because ' it is already in use' yeah, by the bluetooth module I would think, so how do I fix this? I have followed the ibble to the letter
I am quite unknowledgeable about what would be a master or a slave in Bluetooth, but as for now I am even unable to get any type of significant connection and I'd be glad if someone could offer some pointers/help <br> <br>I have what I believe is the HC06 connected to my Arduino Rx -&gt;Tx and Tx -&gt;Rx <br>I have a bluetooth dongle on my pc. I easily establish a connection, at least that is wht my computer says, it recognizes the HC06 and comes back with teh device ' linvor'. <br> <br>But that is it. I have a program running on my arduino at 9600 Baud that basically repeatedly sends the message ' test' to the serial port, but I get nothing on my pc (In the IDE serial monitor or a terminal program that is) and I keep having a flashing LED on my bluetooth HC06 module, whereas I understand it should go on uninterrupted when there is transmission. <br>What is it I do wrong? <br>
I don't know about the led code thingie but right click on the bluetooth icon in the task bar, click open settings, select com ports tab from the top, click add, select outgoing check box, browse for the module and click ok, you should have a comport installing and close any arduino ide open and reopen it, select the serial port (eg: com 30) from tools drop down menu, now try the testing program again

About This Instructable

613,253views

598favorites

License:

Bio: Did I unplug the solder iron?
More by techbitar:IR Remote Control Station for Android - TURN THE TV DOWNSensoDuino: Turn Your Android Phone into a Wireless Sensors Hub for ArduinoModify The HC-05 Bluetooth Module Defaults Using AT Commands
Add instructable to: