Bluetooth HC-05 command delay

This is the schematic:

When I hold down the EN button and plug the USB into my laptop, it flashes on two seconds and off two seconds which is the correct flashing for AT command mode. (As it should). However when I send the code on post #21 to Arduino, and open the serial monitor to Both NL & CR and 9600 baud. I then attempt to send "AT" without quotes, or any other AT command it does not say OK.

When I don't hold down the EN button and its not connected, it constantly flashes on/off in under a second (As it should).

I am attempting to restore it to factory settings but I can't even get AT commands to work, is this HC-05 real?

I set up a HC05 with an Uno and loaded the code in reply #21. I hold the button and power up the Uno (via USB). The LED flashes AT mode. Then I enter AT in serial monitor and I get OK back.

The one difference is that I have the recommended voltage divider on the Uno TX to HC05 RX to drop the Uno 5V to 3.3V to the HC05 RX input pin. All of my HC05s have been wired that way. As I mentioned previously, the inputs are not necessarily 5V tolerant.

I have to wonder if the HC05 RX pin is still OK after having 5V to it.

The photos look just like all of my HC05 modules.

My suggestion is to get new HC05s and make sure to wire them with the voltage divider or other level shifter on the HC05 RX pin and do not apply over 3.3V to any input pin (including EN) on the HC05. Except for Vcc, that must be 3.6 to 6V (5V).

I guess Ill have to test that out. What does the voltage divider you have look like and how is it setup?

It says Power 3.6V--6V on the back and I assumed that was the range and 5v should work fine? If not ill see if I'll have to buy a new one.

Yes, power 3.6 - 6V. But levels 3.3V. 5V is fine for power but the inputs are 3.3V.

The page that I linked in reply #15 shows the circuit for the voltage divider. That page has lots of good info on setting and using AT mode.

This page has info on using the HC05 in communication mode.

Note: A 2K resistor can be made with 2 1K resistors in series.

When I hold down the EN button and plug the USB into my laptop, it flashes on two seconds and off two seconds which is the correct flashing for AT command mode. (As it should). However when I send the code on post #21 to Arduino, and open the serial monitor to Both NL & CR and 9600 baud. I then attempt to send "AT" without quotes, or any other AT command it does not say OK.
When I don't hold down the EN button and its not connected, it constantly flashes on/off in under a second (As it should).

Your AT mode and unconnected data mode flash patterns appear normal, however it's clear that you are not seeing a response to AT commands.

Is it still true that when you pair and connect a phone to the module you still see the abnormal flash pattern and the delayed transmission?

What brand of phone are you using and what is the Android os level?

You might be facing incompatibility baud rate problems. Baud rate at AT Mode is always 38400. As a test, I think you should set also Serial Monitor to 38400 and use Serial.begin(38400) in the code.

 BTSerial.begin(38400);  

The bluetooth module is connected to a SoftwareSerial port, BTSerial. That port is set to 38400.
I have tested the code in reply #21 with real hardware and I do get OK when sending AT and other AT commands work. The setting of the Serial port (serial monitor) is irrelevant.

Okay I get that. I followed the directions in the link. How does this setup look?
I drew little x's to highlight which breadboard holes are plugged.

Looks right as far as I can tell.

When I send an AT command only the RX light flashes on my Arduino. Is this the same for you? This is still really weird because it works really well some of the time, so perhaps there is a short. Where did you get your HC-05 from?

This is consistent with no "OK" being sent back from the module to the serial port of the Arduino.

We know that AT mode does not function correctly.

What happens when you connect a phone. What happens with the mode light flashing pattern. Can you turn the led on and off?

This is still really weird because it works really well some of the time

What does this mean? Data mode between the module and the phone is working correctly, or that AT mode sees an OK return sometimes?

Well when it connects it still has the slow blinking light. It used to be able to turn the led on/off but now it recognizes the connection but doesn't work at all. It still repeats the same slow blink. So not getting OK commands is expected if it only flashes RX?

If it does not have the normal connected pattern of 2 rapid flashes (on, off, on, off, takes ≈ 1 second) then a pause (off) of several seconds I would say the module is defective and you should get a replacement.

I already did, which one do you recommend?

DSD Tech products are warranted and have technical support. You will most likely get a better product than the cheapest unit you can on ebay or Alibaba.

https://www.amazon.com/DSD-TECH-HC-05-Pass-through-Communication/dp/B01G9KSAF6

I just got a new one and now everything works fine.

1 Like

Great news. Thanks for keeping us informed.

Defective hardware can be frustrating, and I hope that you think you have learned more than you have wasted time.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.