HC-06 Waveform - with and without Pullup

Sort of in continuation of this post [Bluetooth Module JY-MCY HC-06][1]
I was looking at the waveform on the TX pin of my HC-06 Buletooth module (connected to the RX pin on the Photon). and this is what I see when no pull-up is used (either connected to the Photon or not). Probe is set to 1X.

And this is with a 47K pull-up.

I see no improvement in the waveform whether the module it powered from 3.3V or 5V I just can’t see how this would work without a pull-up even on an Arduino, honestly.

I just received 2 HC-05 module today. I’ll try them later tonight or over the weekend and post my findings here. But I’m curious. Do folks have these modules working on the Photon and if so how? Or an Arduino for that matter. It should be noted that:

  1. With a pull-up I don’t encounter any issues whatsoever with regards
    to data loss or gibberish data
  2. When connected to my PC via FTDI USB to Serial, and no pull-up I
    have no issues with the Bluetooth module when working with it via a
    terminal program

Are the levels and waveform typical or is the module I have somewhat of a dud?
[1]: Photon - Serial1 vs Serial - Bluetooth Module HC-06 [SLOVED]

I’ve recently written a SoftwareSerial library for the Photon (with the NewSoftSerial Arduino lib in mind) and used INPUT_PULLUP for the RX pin (as did the Arduino lib).
This might explain why the HC-06 works on Arduino and FTDI (which may well use internal pull-ups for HW serial too), but the Particles don’t.

Maybe something for @BDub to comment on.

1 Like

Yes, that looks like what the trick is. I was going to experiment with an Arduino UNO this weekend to see what is going on there.

Here is the waveform for the HC-05 Bluetooth module

Much cleaner, wouldn’t you say?

No pull-up being used here. However, note that the HC-05 modules require +5V on the Vcc pin. They will not operate (turn on) with 3.3V. Their levels are 3.3V however, so they are a good replacement for the HC-06 modules with not only cleaner signals but with the advantage of having the option of configuring them to be a Bluetooth Master as well as a Bluetooth Salve unlike the HC-06 modules that can only be a Bluetooth Salve.

I’d think the fact that these modules are meant to be master they need to provide the (inactive) high level where a pure slave could rely on a master to care for that.

But I think this “issue” is a good one for @BDub to chime in on, to see if there is something that could be improved (add an optional parameter to attach RX pull-ups when required).
I guess it’s not there by default is to keep Serial1 5V tolerant, which the pins wouldn’t be with the 3.3V pull-up attached by default.

Good point, yes. Yes I too feel the experience could be improved and a pull-up option would be nice.

Hey all! So it looks like the v1.06 version of that HC-06 board has a diode in series with the TX pin. This will allow the TX pin to pull LOW but not drive HIGH. That’s why the pull up resistor is doing wonders for your results. You can simply replace the diode on the BT module with a 0 ohm resistor (or wire) and then you’ll never have to mess with internal pull ups or external pull up for this module again :smile:

1 Like

@BDub,

Thank you for finding this and posting it here. This does explain the need for a pull-up. However, in my case I did not have any issues using a terminal program with an FTDI USB to serial set to 3.3V.

I like his final solution better :wink: That is, using a hardware pull-up. this would give folks the option to use a pull-up if needed by simply modifying code.

Also while we could think about adding an option for user control of a software pull up on this RX line, it does make the input not 5V tolerant as Scruff pointed out. Also it’s only about 40kohms so weak at best, and TTL USART devices typically don’t drive through a diode or open collector output. The external pull up or removal of diode (could just jumper around it) would be fine solutions.

Agreed.