HOME

PROJECTS

TUTORIALS

C FUNCTIONS

PROGRAMS

PRODUCTS

VIDEOS

COMPANY

SPANISH

                 

Wireless bluetooth module with serial port interface for Bolt 18F2550 system.

Author: Moisés Rafael Gutiérrez Damián

 

In the project described below, an expansion card with an HC-06 slave Bluetooth module and a serial interface RS232- DB9 connector was developed. The card is inserted into the serial port of any microcontroller system. In the particular case of this project, the Bolt 18F2550 system was used, as shown in the following photos.

Electronic Design

The prototype was build using a minimum of components, with a Bluetooth module whose specification is given at the end of this page, a MAX3232 circuit, for converting the signals to standard RS232 and a 3.3 volts regulator.

The power of 5 volts to the module, is taken from the RTS (pin 7) DB9 connector of Bolt system. The LED indicates the status of the Bluetooth connection: when flashing, the module is in the phase of interconnection with other modules located in the same area. When the LED is always on, indicates that the module is already synchronized or "paired" with another Bluetooth module and therefore is ready to transmit and receive information.

The Bluetooth module operating protocol is completely transparent to the system microcontroller, an functions like a serial cable with fixed connection to its DB9 connector. The speed and transmission format is, by default, 9600,n,8,1.

Electronic diagram of Bluetooth module for Bolt system

 

 

To test the system, a standard PC USB-Bluetooth master module (see photo) must be also installed. When installing the Bluetooth drivers, the PC creates a virtual COM port. Both the PC and Bolt 18F2550 system communicate as if using a simple DB9 cable conexion.

You may download here Hyperterminal for Windows 7  to test the program. The coverage is 10 meters. Using Bluetooth technology allows replacing the RS232 fixed serial cable previously used for communication between devices.

 Load the executable file of the following test program into Bolt 18F2550 system, using software Bolt v.1.0.1:

C18-BOLT-BLUETOOTH-MODULE.c

C18-BOLT-BLUETOOTH-MODULE.hex

C18-BOLT-BLUETOOTH-REMOTE-CONTROL.zip

COMMANDS OF TEST PROGRAM FOR BOLT 18F2550 SYSTEM

User entries in PC using Hyperterminal, 9600 bps

Action taken by Bolt system

Comments

OK>R1 Relay on  
OK>R0 Relay off  
OK>T Sends text: "TIEMPO=" User must write the number of seconds (CR)
TIEMPO=12 (CR) Sends text: "12 SEGUNDOS" Activates relay the desired time
OK>S Sends text: "S=15". Sends decimal value of microswitches (0..15)

BLUETOOTH MODULE SPEC

Model: JY-MCU-HC-06

Voltage: 3.3 volts, @ 8 ma. with integrated antenna and TTL-RS232 interface.

Default speed: 9600 bps. 

Class: 2, 10 meters range.

Protocol: RFCOMM known as serial port emulator.

Dimensions: 27 x 13 x 2.2 mm.

 

To configure the parameters of the HC-06 module with AT commands, please read the following link:

How to configure the Bluetooth HC-06 module using Bolt 18F2550 system with AT commands, through the serial port