Bluetooth Comm for Arduino and PCINTRODUCTIONIn the guide, I will explain how I managed to send data back and forth between a PC and Arduino via a cheap Bluetooth HC- 0. The version I have used in this project does not have a breakout board so it's little cheaper but more difficult to solder. 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 3.
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.
Windows CE 6.0 Administrator's Guide HP Thin Client t5540 and t5550 Build 6.05.651 or higher. Bluetooth Scanner is licensed as Freeware for Windows (32-bit and 64-bit) operating system / platform from bluetooth software without restrictions.
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: 9. N, 8,1- - Default Password/pairing code: 1. Supports the AT command to modify the baud rate, device name, passkey, master/slave, etc.- - Supports baud rates 2.
Based on the CSR Bluetooth chip BC4. Bluetooth specification v. EDR- - Power supply: +3.
VDC 5. 0m. A- - Frequency: 2. GHz ISM band- - Modulation: GFSK(Gaussian Frequency Shift Keying)- - Emission power: . I have listed them in the references section. RELATED PROJECTS1) 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. I also hacked the RF system of cheap wireless car toy and used the Arduino to transmit signals. You can download the PDF documentation for the HC- 0. HARDWARE- - Arduino Uno (R2) or clone.- - Bluetooth serial transceiver connected to Arduino. I got one from Ebay with the Blue. Core. 4 chipset. Search Ebay for Wireless Bluetooth Transceiver Module RS2.
UPDATE August 31, 2013: I have published a guide on how to modify the default settings for.
- Intro: Modify the HC-05 Bluetooth Module Defaults Using AT Commands. UPDATES September 4, 2013: Featured on Hackaday.com http:// September 1, 2013.
- PuTTY: a free SSH and Telnet client.
- Terminal Emulation solutions provide terminal emulators that modernize and secure the host-access experience for users and IT alike.
- A Raspberry Pi Emulator can provide you with hundreds of hours of fun and remembering those good times playing those great retro games.
- Plug ELM327 WIFI Scanner into vehicle's OBD2 port.
- Termie opens a serial port and allows you to communicate with it in a chat-like interface.
TTL.- - Bluetooth USB dongle to be connected to PC. I used an old MSI pc. Bluetooth as well as a Bollionton Bluetooth USB dongles and both worked fine. You can substitute these with 1. K Ohms & 2. 0K Ohms resistors. If you know how to calculate voltage dividers, feel free to use other values for your resistors. I used a 9. V battery.- - Any PC that supports Arduino IDE will be needed to program the Arduino microcontroller.
SOFTWARE- - Windows 7 6. But this should work on other platforms supported by the Arduino IDE.- - Arduino IDE 1. Tera Term Pro terminal emulator but other similar emulators should work.- - Tera Term by the original author of the software. Step 2: Load the Arduino test sketches.
NOTE: When uploading sketches from the Arduino IDE to the Arduino microcontroller, make sure your Bluetooth transceiver TX pin/wire is not connected to the Arduino's RX pin (pin 0) . Else, this may prevent your PC from sending sketches to the Arduino microcontroller. Check the video to see how these demo sketches work.
I have two Arduino test sketches. The first one is a . So if you have a terminal emulator running on your PC, such as Tera Term, you will see a list of numbers rolling down your emulator's screen. I have done almost no error trapping in my code to keep the code clear and simple. I trust the developers will add it per their requirement. The second Arduino test sketch is a . If you click 0 on your keyboard, the LED will turn off.//////////////////////////////////////////////////////////////////////////////////// REMIXED BY: TECHBITAR (HAZIM BITAR)// LICENSE: PUBLIC DOMAIN// DATE: MAY 2, 2.
CONTACT: techbitar at gmail dot comint counter =0; void setup() . THE ARDUINO UNO IO PINS OUTPUT 5. V. SO AVOID CONNECTING THE ARDUINO 5. V OUTPUT PINS TO THIS TRANSCEIVER WITHOUT A VOLTAGE DIVIDER OR LEVEL SHIFTER. However since the Bluetooth pins output 3. V, this won't hurt the Arduino pins which tolerate 5.
V and will treat a 3. V signal from the Bluetooth serial transceiver as a logical high. This is why I did not use a voltage divider for the connection between the Bluetooth transmission/TX pin (rated 3. Arduino receive/RX pin 0 (rated 5. V.)START WIRING1) Solder 4 wires to the Bluetooth module: TX, RX, GND, Vcc.
Assemble the voltage divider. I have lots of photos to help with this step. Wire the Bluetooth module to the Arduino Uno according to this: Bluetooth TX - -- -- > Arduino Uno RX (Pin 0)Bluetooth RX - -- -- > Arduino Uno TX (Pin 1) via the voltage divider! Bluetooth GND - -- -- > Arduino GND pin. Bluetooth Vcc - -- -- > Arduino 3. V pin but NOT the 5.
V pin. 4) Power the circuit. I used a 9. V battery. Keep a mobile phone or a Bluetooth device handy to detect whether your Bluetooth transceiver is available. At this moment, your Bluetooth serial transceiver should come to live and other Bluetooth devices should see it.
If you don't see it, check the wiring again. My Bluetooth serial transceiver has a default name of HC- 0. Check your vendor documentation for your devices name and password/pairing code. When it's done, it will display a system message stating the installation was a success.
You will then see the Bluetooth icon in your system tray or on your desktop. Click on it to see a menu with a number of options such as Show Bluetooth Devices. Click on it and follow the slides.
Select Add Devices or Show Bluetooth Devices. If your Arduino Bluetooth serial transceiver is wired properly, your device name should show up on the list. Click on it and then click Next. You will be prompted to enter your Bluetooth devices' pairing code/password.
The default for most Bluetooth devices is either 1. If the pairing is successful, you will see a system message saying so.
Now, both your PC's Bluetooth and the Arduino's Bluetooth are connected as if by serial cable. Run Tera Term on your PC (or any similar terminal emulator) and select the COM port number specified by the pairing. FORGOT WHICH COM PORT? If you forgot the Bluetooth COM port used for the paired Bluetooth transceivers, right click on the Bluetooth icon on your System Icon area and select .
There you will see the COM port number. When you can't make a connection/pairing even though you are certain your Bluetooth devices are running normally, delete your Bluetooth device and start the process from the top. That seems to reset the connection.
RUN TERA TERMOnce the pairing is done, run Tera Term to start communicating with your Arduino. Tera Term will prompt you to pick either Serial or TCP/IP. Select Serial and make sure Tera Term shows the COM port number from the previous steps.
Also make sure the settings are the same for both Bluetooth serial modules. In this case: 9. 60.
N, 8,1. If you have uploaded the get test sketch, then type either 1 (one) or 0 (zero) to turn pin 1. LED on the Arduino on or off. If you uploaded the send test sketch, you will see a growing list of ascending numbers on the Tera Term screen sent from Arduino over serial Bluetooth.
Enjoy,Hazim Bitar (Tech. Bitar at gmail dot com).