Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Bluetooth HC-05 connecting issue

joniengr

Full Member level 3
Joined
Nov 3, 2018
Messages
178
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
1,589
Hi,

I am struggling with connecting bluetooth module hc-05 to microcontroller. I have made the following connections.

Pin 1: En/Key : Gnd
Pin 2: VCC : + 5V
Pin 3: Gnd : Gnd
Pin 4: Rx : Connected to Tx of Microcontroller
Pin 5: Tx : Connected to Rx of Microcontroller
Pin 6: State: Not connected

I guess the connections are right or maybe I am missing something. When I send a character from the bluetooth app, it does not toggle the LED connected to the microcontroller.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,940
Helped
13,925
Reputation
28,098
Reaction score
12,568
Trophy points
1,393
Location
Bochum, Germany
Activity points
273,761
it does not toggle the LED connected to the microcontroller.
Means your controller toggles the LED if it receives a character? Sure HC-05 is set to the same baudrate as microcontroller?

Does the HC-05 LED signal connection to the master?
 

joniengr

Full Member level 3
Joined
Nov 3, 2018
Messages
178
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
1,589
Means your controller toggles the LED if it receives a character? Sure HC-05 is set to the same baudrate as microcontroller?

Does the HC-05 LED signal connection to the master?
The microcontroller suppose to toggle the LED when a character is received through UART. I have tested the microcontroller program on breadboard. If I send command from PC using serial terminal, it toggle the LED. This means that microcontroller program is working.

Latter I connect the microcontroller to HC-05. I have powered up the microcontroller with 3.3 V when I connect to HC-05. The smart phone find the device HC-05. I just pair it but not able to connect in the App.

When I power up the HC-05 and pair it, the status light flashes two times per second but when I try connecting the device in the App it gives two flashes per second and then off for one second and then two flashes.
 

joniengr

Full Member level 3
Joined
Nov 3, 2018
Messages
178
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
1,589
The default baud rate of HC-05 in command mode is 38400 and 9600 in data mode. I am using 9600 in microcontroller.

Pin 1: En/Key has to be connected to ground for data mode.
--- Updated ---

I have found the mistake. I did not swap the Tx and Rx pins. Now it is working. I have connected Tx and Rx in the following way.

Pin 4: Tx : Connected to Rx of Microcontroller
Pin 5: Rx : Connected to Tx of Microcontroller
 
Last edited:

Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top