HC-05 Disconnecting After 2 seconds

Hi there,

I have my hc-05 wired up to my arduino using just the four pins, gnd, vcc, rx, and tx. I've tried both my hc-05's now, and they both have the same issue on my windows 10 computer. On my mac, I was able to stay connected. Why might the hc-05's disconnect only after a few seconds?

I think the only way HC-05 can involuntarily disconnect is because of inadequate power to Arduino, and the fact that the Mac soldiers on is just coincidence, but at least you have proven that your wiring and code are kosher. If the power is indeed adequate, all your problems are at the PC end, about which you say nothing. The standard terminal programmes, RealTerm, Putty, etc., should be fine under Windows 10, which has been around for quite a while now. You might try proving the point by talking to a phone instead, again using a standard terminal.

Which Arduino board? How is the board powered?

I have two boards, arduino micro and uno. Both of the hc-05's are connected to the 3.3v power, and the power source is a 5v power bank.

I only have an iphone, and for some reason it cant identify hc-05's. The only terminal im using is the serial monitor in the arduino IDE. But, the problem isn't happening when I have the IDE running. Even if I just connect and don't communicate at all with the hc-05, it will disconnect shortly. For power, im using a 5v power bank and I connected the vcc of the hc-05 to the 3.3v of the arduino.

Then maybe it's your 'power bank' shutting down. Many do if there isn't sufficient current draw (varies my manfacturer, 120-250mA or so).

Just tested with the usb from my computer as a power source... still doesn't work

Maybe upload a good picture of how you have things patched together, everything in the open and traceable.

Here's some photos:




You can tell which pins are wired to which on the arduino by colour. I have the state pin on there for at command mode, but it never affects connection. Power bank is connected to arduino via usb.

You mentioned before using the 3V.
I think it's inadequate.
Can you power from "5V" and GND (disconnect rx, tx and en for now)?
Does it stay 'connected' then?

Just tested. Doesn't stay connected still

You have the HC05 connected to the hardware serial (pins 0 and 1) on the Uno? Those pins are also connected to the USB to serial chip on the Uno. Could that be interfering with the HC05?

A schematic would be useful so that we can more easily interpret the photos.

I would suggest that you use a software serial port on other pins for the HC05 so that you can use the hardware serial for program upload, program output and debugging.

I see the writing on the back of the HC-05 specifically says 3.6 - 6v, so why are you doing this?
Clipboard02

I suspect you are kidding yourself, the serial monitor isn't receiving from Bluetooth, and it isn't working at all. Use a proper terminal programme like RealTerm for Communication via Bluetooth. There are several terminals available, all are freebies. I think Groundfungus is right, you have Bluetooth on hardware serial and sharing with the serial monitor, hence the confusion, but no damage done. In real life, it is quite OK to have Bluetooth on hardware serial, but not in a situation like this, so use software serial with Bluetooth on a different pair of pins.

What do you mean connect the HC-05 to different pins? You mean other than 0 and 1? Im not sure how that'll fix it, because I'm not even running into problems with uploading or anything, it just won't connect reliably

Tested on both 3.3 v and 5v. I've had it connected to my mac before while connected on 3.3 v and it stayed connected for hours. But just to be safe I've tested all of your guys' suggestions on both power sources. I just can't use 5v permanently because there's a servo module attached to it

Yes. Pins 0,1 are for hardware serial. Never use software serial on those pins. I believe any other pins can be used for software serial on a Uno

If you disconnected Bluetooth before uploading, that's fine and normal. That is not the issue anyway, it's the anything. If you are communicating via hardware serial via Bluetooth, you can't use the serial monitor - you can just look.

You had better learn, and there is nothing to stop you doing it. If you insist on disobeying the manufacturer's clear instruction, you will eventually deserve all the grief you get. You may also find you are exceeding Arduino's specification, and the same applies.

1 Like

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