Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

dont know how to use bluetooth module hc-05

Status
Not open for further replies.
You would get better help if you provided more information. What program are you using on the Android device to communicate with it's bluetooth interface ? What program are you running on the Arduino and which version of Arduino is it ? Have you configured the baud rate of your HC-05 to match the baud rate the program running on the Arduino is set to ? On the Blutooth configuration on the Android device does it show as connected to the HC-05 ? My first test would be to link Rx and TX on your HC-05 and run a terminal emulator program (I use Blueterm.) on the android device. If the link is working then you should see what you type displayed on the screen. (If you remove the connection between RX and TX on the HC-05 then the characters you type should not appear on the screen.)

Les.
 
Are you sure that all the connections are correct and effective?
 
Here is a method I used to configure an HC-05 using AT commands with an Arduino uno and the Arduino IDE.

"
Using the Arduino Uno to configure an HC05 Bluetooth module.


Either remove the ATMEGA328P or program it with this sketch which will not enable the TX pin on the ATMEGA328P. (It just runs a tight loop doing nothing.)


Connect the RX pin on the Aduino board to the RX on the HC05 module via a potential divider consisting of a 5K6 restistor from the RX pin on the Arduino and a 10 K resistor to ground. NOTE Connecting the RX pin to the RX pin seems strange but the RX pin on the Arduino board is actualy the TX pin on the ATMEGA16U2.

Connect the TX pin on the Arduino to the TX pin on the HC05 together with a 3.3 volt zenner to ground. (+ to TX pin - to ground.)


In the Arduino window click on the "Tools" dropdown box and select "Serial monitor"

In the "serial monitor window" set the baud rate to 38400 bauds. In the box to the left of the baud rate box select "Both NL & CR"
Type the required AT command in the send window then click send.
You will see the response in the main part of the serial monitor window.

NOTE The baud rate for AT commands is always 38400"

This is basically using the Arduino Uno as a USB to serial converter and using the serial monitor as a terminal emulator.

Les.
 
A 5K6 resistor resistor is 5.6 K ohms (5600 ohms) These components are to protect the HC-05 3.3 volt level inputs from the 5 volt siganls from the Arduino. I did not write a program to change the TX the pin to an input (So as not to load the signals between the ATMEG 16U and the HC-05) I unplugged the ATMEGA328. (I am useless at "C" progaming. I just made the suggestion as an alternative method.)

Les.
 
You deleted where I showed how to hook one up
Plus there is no helping without seeing what he has done.
And not all app's one android work as one thinks I use bluetooth rs232 terminal and Bluetooth USB wifi terminal the last one is the best.
 
You can hook it up just like this
490552153.jpg
 
int state;

void setup() {
Serial.begin(9600); // im not sure for this
}

void loop() {

if(Serial.available() > 0){
state = Serial.read();
Serial.println(state);
}

}
can i use this program
i connected gnd-gnd, 5v-5v, tx-tx and i puted 5k resistor from gnd andrx on module and 2k resistor from rx on module to rx on arduino
my board works on 3.3 logic level
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top