Pololu A-Star Mini Serial Channel issues

Hey guys

I’m struggling with an A-Star and an HC-06 bluetooth module. The bluetooth is plugged in properly, TX to RX and RX to TX and so on, light comes on and it connects (Solid red light)

However, the serial buffer for the bluetooth (I’m using Serial1) is filled with “0” and never receives any proper commands.

The code I’m using is here:
in setup

  Serial1.begin(9600);
  Serial.begin(9600); //USB for debug outputs

in loop

  if (Serial1.available())
  {
    int inByte = Serial1.read();
    Serial.print(inByte, DEC);
  }

As I’ve said, the USB serial monitor simply reports a long string of 0’s, no matter what is sent via bluetooth. Serial1 is always available and even when I cleared the buffer out with
while(Serial1.available()){Serial1.read();}
the read function will always report a 0.

Thank you for the support.

Hello.

Can you post a picture showing how you have everything connected in your setup? How are you sending data to your Bluetooth module and what are you sending to it?

- Amanda

A picture won’t tell you much, other than the module is properly connected - Much more useful will be the wiring pins.

A* 3.3v -> HC-06 vcc
A* gnd -> HC-06 gnd
A* tx -> HC-06 rx
A* rx -> HC-06 tx

I’ve tested every configuration of wiring possible, including reversing the RX and TX pins to go to tx->tx and rx->rx.

Data is sent to the A* via various app’s bluetooth transmission utilities. These utilities have been confirmed to work on other boards.

The technique used in the app I wrote is
mmOutputStream.write("B".getBytes());
for example. This writes the letter “B” to the bluetooth output stream.
When this command is triggered on the app, nothing happens on the robot.

Exactly! By seeing clear pictures of your setup, I can double-check that your connections and soldering are fine. Also, with the pictures, I can see if there is anything else about the system that could be causing problems, but I would not have thought to ask about.

Regardless, I suspect that your Bluetooth module uses 3.3V logic, not 5V logic like the A-Star, and the pins might not be 5V tolerant. If that is the case and you applied 5V to the HC–06’s TX and RX pins, it is possible that those pins were damaged. Since you mentioned the HC-06 had worked before with other boards, you can try connecting the HC-06 to one of them to make sure the device is still working. If it is, then you should use a bidirectional logic level shifter (like this one) or a voltage divider to convert between the different logic levels before continuing.

- Amanda