HC-05 receiving, but not sending data (Arduino Uno)

Hi everyone,

I have an issue with my communication between the HC-05, my Android phone (using Kai Morich's Serial Bluetooth Terminal) and the Arduino Uno.
What I'm trying to do is sending data from my phone to the Arduino, then printing it on the Arduino IDE's Serial Monitor. Also, the same vice versa, i.e. sending data from the Serial Monitor in the Arduino IDE to my phone's Bluetooth terminal.

However, the problem is that only sending data from my phone to the Arduino is working, the other way around, there is just nothing showing up in my phone's app

This is the code I use:

#include <SoftwareSerial.h>
SoftwareSerial hc05(2, 3);

void setup() {
  Serial.begin(9600);
  hc05.begin(9600);
}

void loop() {
  if (hc05.available()) {
    Serial.write(hc05.read());
  }
  
  if (Serial.available()) {
    hc05.write(Serial.read());
  }  
}

Here is my hardware setup:

I'm new to Arduino and this forum, so please forgive if I've overlooked something obvious or did something wrong in this forum.

I appreciate your help.

Hello nillzy

Welcome to the worldbest Arduino forum ever.

This is a nice project to get started.

Try this mods

#include <SoftwareSerial.h>
SoftwareSerial hc05(2, 3);

void setup() {
  Serial.begin(9600);
  hc05.begin(9600);
}

void loop() {
  if (hc05.available()) {
    Serial.println(hc05.read());
  }
  
  if (Serial.available()) {
    hc05.println(Serial.read());
  }  
}

Have a nice day and enjoy coding in C++.

Some wires are over the top of others so its hard to see where they go. Could you please post a schematic. Hand drawn, photographed and posted is fine.

Although powered by 5V the inputs of the HC05 are not 5V tolerant. It is recommended that a voltage divider be placed on the HC05 RX to drop the Uno TX from 5V to around 3.3V.

image

Hi paulpaulson,

thank you for the quick answer, and the nice welcoming.

However, I still have the same problem with your code.
Is there anything else I can try?

Have a nice day too!

Hi groundFungus,

I tried my best to create a schematic.

This is how the pins are connected at the moment:

Though not really a schematic that is readable, good job.

Vin is NOT a power output. Connect the HC05 Vcc to the Uno 5V pin.

The HC05 needs little power to receive so the tiny amount that the Vin will supply may be enough, but it takes a lot more to transmit so the small amount from Vin is not sufficient. Give the HC05 5V from the 5V pin and use the voltage divider to protect the RX input.

Thank you for the compliment.

I have connected the HC05 with the 5V pin and installed the voltage divider, as the image you posted shows.
However, the problem is still the same: I can send data from my phone to the Arduino IDE's Serial Monitor, but sending data from the Arduino IDE to the Bluetooth Terminal still results in nothing showing up.
Do have any other idea what I could try else?

I really appreciate your help.

What is the app on your phone that is receiving?

I use the serial Bluetooth terminal app from the playstore to do development testing.

Did you try the code that @paulpaulson posted in post #2?

I am using the same app, and yes, I tried @paulpaulson's code.

hello @nillzy
check Vin connection and for the serial communication (UART), you have to alter the receiver (Rx) and transmetre (Tx) means conect rx to tx and tx to rx.

Can you post a photo of your wiring that shows, clearly, where all wires go?

And post the latest code that you tried, please.

Do you have another HC05 module? If so, does it work the same?

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