Connect your MPU to PC with bluetooth device HC 06

Connect your MPU to PC with bluetooth device HC 06. This topic is show how to send data from MPU to PC. Mostly , When we get data from sensor and send it to PC , usb- serial module is used. It’s very simple but because data sent by wire that you have set MPU near from PC. Wireless connection between MPU and PC is can do with xbee module , but it’s expensive and you have had 2 modules, one for PC and another for MPU.

Connect your MPU to PC with bluetooth device HC 06

 

Xbee module
More simple and cheap method is use HC-06 bluetooh module and if your PC had bluetooth device you have had only 1 moudle.
You can buy it at amazon.

1.Connect MPU to usb serial module to set baudrate and name

usb-serial moudle              Bluetooth Module
Gnd…………………………….Gnd
Tx……………………………….Rx
Rx……………………………….Tx
Vcc…………………………….. +5V

 

2. Setting

Open Arduino ->Serial monitor
Set name:  AT+NAME+name
ex: name is ngoduong ->AT+NAMEngoduong

Set baudrate : AT+BAUDn
ex : baudrate 115200 -> AT+BAUD8
AT+BAUD1   -> 1200
AT+BAUD2   -> 2400
AT+BAUD3   ->4800
AT+BAUD4   ->9600
AT+BAUD5   ->19200
AT+BAUD6   ->38400
AT+BAUD7   ->57600
AT+BAUD8   ->115200

 

3.Pair with your PC

I using ubuntu, so that i use Blueman applet app.
Open Blueman application ->Search ->Add ->Setup->Use custom passkey
Input 1234 -> Forward

waitting…
If it ok -> chose Serial port ->Forward

4. Now you can connect it to you MPU

MPU              Bluetooth Module
Gnd…………………………….Gnd
Tx……………………………….Rx
Rx……………………………….Tx
Vcc…………………………….. +5V
To send serial data with stm32 please click

Sponsored Links: