HC-05 module on a JY-MCU breakout board - what and how is it buffered ?

Hello all,

I've bought myself a HC-05 module on a JY-MCU breakout board, but cannot seem to find anything concrete about what the JY-MCU breakout board (stamped ZS-040) does or needs.

The pinning:

STATE (out) RXD \ 3.3v TXD / GND \ 3.6 ... 6v VCC / EN (in)

Biggest problem: The voltages (in and out) of the EN and STATE pins. Are they 5v tolerant or is 3.3v the maximum for either (signal voltage or pull-up). And are the RXD and TXD pins 5v tolerant ?

Secondary problem: What is the EN pin connected to on the HC-05 module ? What is it supposed to do ?

And some confusion: Why does the JY-MCU board have a voltage regulator at all ? Now it can't connect to a pure 3.3v MCU, and when used with a 5v MCU it needs logic-level conversion buffers for the communication. That doesn't makee much sense ...

Regards, Rudy Wieser

Reply to
R.Wieser
Loading thread data ...

On Tue, 14 Jul 2020 19:27:08 +0200, "R.Wieser" declaimed the following:

The first description I find for the HC-05 (ignoring the actual module maker) mentions "Arduino" -- and I suspect they mean Uno, Mega, or other AVR Arduino, rather than one of the ARM based ones.

If so, the board is optimized for 5V signals (though that page says

4-6V for VCC).

A datasheet for the chip itself says 3.3V VCC

formatting link

This page

formatting link
states all are 3.3V except for VCC. And if the unit has on-board regulator, there is typically some losses involved, so one needs 4+V to get 3.3V out.

formatting link
""" This pin is used to toggle between Data Mode (set low) and AT command mode (set high). By default it is in Data mode """ Though the tutorial link states that EN pulled LOW during power-up is needed to enter command mode???

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Dennis,

I would think so too, but I've found descriptions using different, but rather similar break-out boards, with some of those descriptions specifically mentioning 3.3v for the KEY pin, and using a resistor divider to drop the 5v signal to a 3v one for the RXD pin.

But the below tutorial directly connects the KEY and RXD input pins to the Arduinos output pins (supposedly being driven at 5v).

formatting link

:-) I found the same PDF. And if the HC-05 module would be all that I had (not on a break-out board) my problems, other than how to attach wires to it, would not exist.

The whole thing is that I do not know what the JY-MCU breakout-board the HC-05 module is placed ontop of does for me. Having discovered that multiple *unspecified* versions of that breakout-board circulate doesn't help either. :-(

On my JY-MCU break-out board I can see 6 (assumed to be) resistors, one LED, one three-legged component that I assume is the voltage regulator, and another three-legger which I haven't got the foggiest about (perhaps a transistor or FET driving the LED ?).

Have you looked at that breakout-board image just above it ? It doesn't seem to have /any/ components on the break-out board itself ... Either all of them are on the other, bottom side or this shown module isn't quite representative.

:-D Yep, I found similar. Which one of the two should I believe ?

Ofcourse, its easy enough to test for my particular module (just send an "AT",CR,LF and see what comes back), but that should /not/ be needed. :-(

(its possible that the above-mentioned three-legger is a transistor or FET allowing the EN pin signal to rise above 3.3v - but inverting that signal in the process)

And I see we are bumping against the same inconclusive information. :-) No matter, thanks for the response.

Regards, Rudy Wieser

Reply to
R.Wieser

Some 3.3v logic interfaces are 5v tolerant. You need to see the device datasheet for that. Often a resistor (I've seen 1Kohm mentioned) directly in the signal line is enough to prevent damage. AFAIK it uses the, often, inbuilt powerline protection diodes - but I'm sure a more comtetant HW guy could spell chapter and verse.

I think there was a discussion on this NG earlier this year about interfacing 5v to the Pi - utilising a 1K resistor for protection - or maybe it was anoth NG or Forum.

Reply to
Jim Jackson

Jim,

The question is: Should I bother to check the HC-05 datasheets, or does the JY-MCU breakout board already handle it (which I thought it was there for) ?

Yes, I'm aware of that possibility.

The thing is that currently I cannot find *any* information on what the JY-MCU breakout board does or doesn't do (like does it already have such a series resistor in place ?) - or even what its STATE and EN pins are supposed to be there for. Which is the whole problem.

And yes, I could spend some time trying to trace some of the tracks on the breakoutboard to the components on it (by eye or ohm meter) and than do /my best guess/* to what is going on, but that is definitily NOT the way it should be going.

*and hope that its good enough!.

Currently I feel like I've been had, as if I've bought myself a cheap throw-away gadget. :-(

Regards, Rudy Wieser

Reply to
R.Wieser

formatting link

STATE Mode the device is in from a photo is seems to imply this is an output from the device indicating the state RXD Receive TXD Transmit GND 0V VCC 5V EN Disables module when LOW this is fairly explicit. Pull low to disable the module

The photo shows RX/TX at 3.3V logic levels. Even it has a safety resistor putting another one will very probalby be ok - and safe! Or buy a little dual 3.3V 5V level shifter to use between the device and the MCU. If you are interfacing to the RPI then all is ok as they are 3.3V logic. (this is the RPI NG!).

Reply to
Jim Jackson

Jim,

Thanks for the link. But look at that pin description table. It doesn't actually *say* anything.

"STATE" "Mode the device is in"

- What "mode" are they talking about ?

- Which pin of the HC-05 module is it connected to ? (presuming it is)

- Is it a direct connection or does the break-out board have any components (resistor, diode, etc) in it. If the latter, for what purpose (what is its effect).

- In the case its /not/ a direct connection : Which "high" voltage does it output ?

"EN" "Disables module when LOW"

- Which pin of the HC-05 module is it connected to ? (presuming it is)

- Is it a direct connection or does the break-out board have any components (resistor, diode, etc) in it. If the latter, for what purpose (what is its effect).

- In the case its /not/ a direct connection : Which "high" voltage does it accept (min and max) ?

You know, the basic stuff.

Really, just mentioning where the STATE and EN pins are connected to on the HC-05 module would be, to me, way more helpfull.

Furthermore:

- if a low disables the module, how to I enter the "command" mode (so I can configure it), as my module doesn't have a pushbutton. ... or did I buy an intentionally crippled one ? That would be a bit hard to swallow.

You mean by way of the silk-screen text ? Yeah, I noticed.

Don't be too sure about that: back-current thru such a resistor and the clamping diodes is known to be problematic (I probably followed the same thread you mentioned :-) )

Yeah, I know I can do that. Together with another 3.3v voltage regulator (and supporting components) ofcourse. But thats sheer insanity.

Bottom line: A breakout board which makes it impossible to feed the HC-05 from a 3.3v source (presumably due to a voltage drop in the power regulator), but which also doesn't seem to have anything for the signal lines to make it easy to use the HC-05 module on a higher voltage. Its almost as if its some kind of intricate joke.

Regards, Rudy Wieser

Reply to
R.Wieser

Reply to
Jim Jackson

On Wed, 15 Jul 2020 22:53:14 +0200, "R.Wieser" declaimed the following:

The odds are very good that all pins on the module map directly to the same pin of the HC-05 chip itself... And most likely the chip specification sheet will use the same name.

Now -- if they are buffered/inverted between the module pins and chip should be in the documentation from the module manufacturer. If there is no such documentation, or only a reference to the chip specification, it is up to you to determine what is happening or contact the module manufacturer. (Let me guess, you went lowest bid on eBay for this)

formatting link
formatting link
(Note: this particular variant indicates the "Key" [EN] pin is used to update the on-board firmware and not to toggle into AT command mode -- might be a difference between HC-06 and HC-05 chips; feel free to search for spec sheets of the two for comparison)

formatting link
implies the module has voltage converters for 5V I/O.

formatting link
The schematic diagram shows a Maxim MAX3232 chip -- but it appears that chip is unused unless you wire up to some of the pads on the module. The MAX3232 is used to translate TTL UART signals to real RS232 (+/- 12V). {The J1 connector has both TTL level and RS232 level -- but that is on an 8-pin connector, but the module only exposes a 6-pin connector} There is a transistor cascade taking "UART TXD" and boosting it up to 5V "TX TTL" level. "RX TTL" appears to just be fed to through a diode to drop the signal to 3.3V "UART RXD". Note that both of those conflict with the bottom labeling on this module, which states 3.3V levels for RXD and TXD.

At this point, I'd probably pull out an oscilloscope and put that on the output pin&ground, then apply first 3.3V to the module, followed by 5V

-- and seeing what voltage peak appears on the output (the schematic implies the output has a 5V pull-up, so I'd guess that is the default level for the output, and the transistors are used to draw it down to GND level).

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Jim,

And as I've already tried to make clear, I absolutily disagree with you there.

True. With the meager information the webshops page offered I assumed that the rest of it would be provided with the module itself. Thats not a mistake I will easily repeat.

But tell me, as the breakout board itself does not have much, if anything, to descern it from a multitude of other boards (all sold under the generic HC-05 breakout board name) how would I find the information to it ? What would I need to search for ?

And as you might have noticed, I did such research - just afterwards instead of beforehand - only to discover that none is to be had (or to be more precise: enough "user generated content" floating around, but at times conflicting with each other - making it inconclusive)

Which is why I asked here.

Bottom line: Even though I bought a breakout-board module enabeling the HC-05 module to work with supply voltages between 3.6v and 6v it can't be used (connected) in any way (to a 3.3v or a 5v MCU) without adding more components*. Which is not what I expect from a "use with different supply voltages" breakout board.

*with the RPi as an exception, as it has 3.3v signal lines and a 5v power output pin.

Regards, Rudy Wieser

Reply to
R.Wieser

Dennis,

No such luck I'm afraid. I'm looking at the HC-05 datasheet here :

formatting link

No EN or STATUS pins. Heck, not even RXD and TXD are present as such. :-)

That is documentation I expected to come with the module, but didn't. And with the absense of an actual product number (other than the webstores internal one) there is no way to get at it.

Nope. I ordered it thru a webshop in my own (small) country. Pretty-much to forgo the kind of horror stories you sometimes read about ordering abroad. Alas, It looks like I fell into another pit.

That would clash with the "LEVEL : 3.3V" silk-screen info on the back of my module (directly next to the RXD and TXD pins) - which makes me yearn for the breakout boards manufacturer specs.

I'm afraid that that schematic (in the same image as the module) is just a tad too blurred to be able to read any text there. Heck, can't even see what the two words at either end of that diode say (and I've even scaled up the 1000x1000 "hires" image to try)

Yup. Conflicting/mismatching info that I've also found during my searches. Which either means someone (a hobbyist ?) cut corners, or is possibly targetting a different module ...

I was thinking of using an ohm meter to figure out where the breakout board pins lead to (directly connected to the HC05 module or thru something), but your idea doesn't sound half bad either. :-)

Though its definitily /not/ something I expected to need to do. I will probably refrain from buying more, as I would likely need to go thru the whole song-and-dance again. :-(

Regards, Rudy Wieser

Reply to
R.Wieser

On Thu, 16 Jul 2020 12:11:09 +0200, "R.Wieser" declaimed the following:

Unfortunately, that PDF uses images, and not formatted text -- so no cut&paste...

Page 4 lists: UART RTS, UART CTS, UART TX, and UART RX

Page 5 states """ How to set the mode to server (master):

  1. Connect PIO11 to high level.
  2. Power on, module into command state.
  3. Using baud rate 38400, sent the ?AT+ROLE=1\r\n? to module, with ?OK\r\n? means setting successes.
  4. Connect the PIO11 to low level, repower the module, the module work as server (master). """ which does seem to follow what one document implied for the EN pin -- used to enter command mode rather than data mode.

Note that the actual chip has a lot of pins, many used for esoteric reasons (PIO pins imply their use depends upon the firmware on the chip --

formatting link
ties into the SPI pins for programming the chip).

formatting link
also echoes the PIO11 information: """ Among all the available pins, the HC-05 firmware uses the following pins in a minimum system:

UART_TXD and UART_RXD for serial transmission (communication with the microcontroller).

PIO8 usually connects with a LED. When the module is power on, LED will flicker. And the flicker style will indicate which work mode is in since different modes have different flicker patrons. It will blink fast in pairing mode, slow in AT mode and fill double-blink each couple of seconds after paired with another device . PIO9 also is usually connected with a LED. It indicates whether the connection is built or not. When the Bluetooth serial is paired, the LED will be turned on. It means the connection is built successfully.

PIO11 is the work mode switch. When this PIN port is input high level, the work mode will become order-response work mode (AT mode). While this PIN port is input low level or suspended in air (high impedance), the work mode will become automatic connection work mode.

PIO0 and PIO1 to enable RX and TX lines.

RESET, VCC and GND for obvious purposes. """

STATUS is likely PIO8, though could be PIO9 (or even going through an AND or OR gate of the two)

""" Many times the HC-05 comes already mounted on a PCB in a very reduced working system, just enough to use the serial communication. Note that:

Although many of these mounted devices are compatible with 5 V logic levels, they do work just fine with 3.3 V.

Some may have a small switch connected to pin 34. This is very convenient, as we can very easily enter AT-mode this way (just press the switch while you power on the device). """

The fifth image down on the Amazon page (at least for me) is just the schematic at a somewhat larger scale. The diode part is

UART_RXD --->|--- RX_TTL

If using an active ohm/resistance measuring mode, I'd be concerned. DVMs tend to run 6-9V (4xAA, 1x9V) through the leads when measuring resistance. That could fry a 3.3V CMOS system. The o'scope is high impedance and passive, not injecting any voltage on the pins.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Dennis,

...

I'm sorry, but I ment that I actually looked at the contents of that PDF (read: it opens fine), and found that the names for the pins on the breakout board do not match any names in that PDF document (though I went a bit of a stretch for the RXD and TXD pins - those are rather easy to find the similar names for :-) ).

I found a webpage describing that process for a button-less module. I saved it for a "just in case" case. And whatdoyouknow, it has become just that.

Not quite. It could as easily be connected to the RESETB pin (pin 11).

Indeed. Especially the USB pins, and asked myself if I could perhaps wire it up to an USB connector - only to realise that if the firmware is not written for it neither the SPI nor the USB pins will do anything. Heck, those hardware parts might not even be on the used chip.

Although I would gladly accept that (would make my life /that/ much easier), its not what the specs to the HC-05 breakout board says : a 3.6v minimum voltage. But, I don't know why they say that*, as the HC-05 module itself will, according to the PDF, happily work with a supply as low as 1.8 volts ...

*other than perhaps to guarantee that the I/O "high" level is at 3.3v.

The breakout board has some space for that button, but its not present. With some luck the track is connected to that pin though, allowing me to put a makeshift switch there myself.

Could you post the direct link to that image ?

Thats something that crossed my mind too ... Though I got very little choice if I want to check where the STATE pin connects to.

Thanks for the help - again. :-)

Regards, Rudy Wieser

Reply to
R.Wieser

1st result when searching for hc05 on google
formatting link
seems pretty straight forward to me
--
I know on which side my bread is buttered. 
		-- John Heywood
Reply to
Alister

Alister,

Absolutily !

.... up until the moment you find some more of the same on other webpages, which mentions that the EN pin just disables the module. No mentioning of a datamode there.

Also, my board doesn't have that button shown there. Should I therefore presume its crippeled ? Or does it maybe work differently ?

And by the way: No mentioning of signal levels for/of the EN and STATE pins anywhere, nor if the breakout board adds tolerance for 5v signals on TX and RX and perhaps the above two too.

To make things worse: the wiring diagram in the "How to Use the HC-05 Bluetooth module" chapter mentions that the TXD and RXD go to the MCU - which under the "HC-05 Technical Specifications" might be an Arduino - which is supposed to run on 5v, and directly connecting the RX pin to one of the Arduinos pins set to output will likely destroy the 3.3v module. Either someone forgot something, or that particular module can handle 5v signals.

Nope sirree, its not as straight forward as you think it is. :-)

Regards, Rudy Wieser

Reply to
R.Wieser

On Thu, 16 Jul 2020 19:24:36 +0200, "R.Wieser" declaimed the following:

Based upon the link that suggested uploading a more capable firmware, I suspect the chip does have all the parts for that pinout. The SPI pins appear to be used for firmware updating.

Partly, I suspect, as any on-board voltage regulator will consume some of the input voltage just to ensure a stable 3.3V output. The second reason may be that MAX3232 (or was that 2323 ). The double ended voltage multiplier (to get both +12 and -12 for true RS-232) may require at least some higher level to function.

I'd like to, but the image selection appears to be handled by Amazon Javascript on the page, as the mouse passes over them -- the URL doesn't change. I see, on the left:

Top view diagonal of board with jumper at lower right, with small schematic bottom left and module dimension diagram top right.

Diagonal view top with jumper at lower left, no auxiliary diagrams

Top down view, jumper on left

Diagonal view bottom, jumper lower right

Schematic only

Module dimensions only

The page source is over 18000 lines (about half are blank lines), most is Javascript. The thumbnail for the image is at line 9720, but I don't know how to go from

formatting link
to the full size version. I suspect it's coded into that file name, and the server parses it to provide the image as the mouse moves over the thumbnail.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Tx & RX are described as TTL serial TTL is a fully detailed standard as far as signal levels go.

--
If I had a Q-TIP, I could prevent th' collapse of NEGOTIATIONS!!
Reply to
Alister

Dennis,

Yes. 0.3 volts. At least, thats the difference between the minimum allowed supplied and the I/O voltage. Supplying 3.3v should drop the I/O voltage to 3.0 volt, which should be plenty enough for an input pin of a 3.3v MCU*.

That is, assuming that the voltage regulator itself doesn't throw a wrench into it (will go into a kind of "pass thru" mode when it gets a too-low voltage).

*on the other hand, having an output pin supply 3.3 to an input-pin of device that runs on 3.0 volts could create problems in regard to possible present clamping diodes.

My thanks for going thu it. Thats really a cr*pload.

I took a chance and just removed everything from the second-to-last dot upto the ".jpg" extension. I got a 500x500 image back, which stil is isn't perfect but better readable than what I had.

Regards, Rudy Wieser

Reply to
R.Wieser

Alister,

Your second mistake.

Just take a look here:

formatting link

"Serial communication at a TTL level will always remain between the limits of 0V and Vcc, which is often 5V or 3.3V"

Nowerdays a "TTL signal" often doesn't refer to the voltage, but to the "low"/"zero" level being at 0v, and the "high"/"one" level being at VCC (regardles of what VCC might be) - as opposed to an RS232 specced signal, where "low" is at +v and "zero" at -v.

And I see that you did not read my initial message too closely. In it I wrote that the RXD and TXD pins are specced as having 3.3v levels ...

Regards, Rudy Wieser

Reply to
R.Wieser

FWIW there is somewhere the original TTL spec where 0 is less than some voltage and 1 is more than some voltage with in between being 'here be dragons'

"A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal, and "high" when between 2 V and VCC (5 V)"

Whether or not what you are discussing conforms to that, I do not know. Just my 2 pennoth..

--
?It is dangerous to be right in matters on which the established  
authorities are wrong.? 
 Click to see the full signature
Reply to
The Natural Philosopher

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.