HC-05 Bluetooth autostart in AT mode

Hi everyone,

I am developing a mobile universal RS232 monitor that will work over Bluetooth. Because there are many speeds, parity and other settings, I will need to reconfigure Bluetooth speed etc. at each startup. My code works this way:

(power on)
- read speed, parity configuration from EEPROM (last used config)
- enter Bluetooth AT Command mode 
- set speed, parity to bluetooth module
- exit AT mode
- ready to send data over Bluetooth
(when nothing will be connected on RS232 cable, arduino will listen and catch configuration unique commands when needed)

The problem I am facing to how to get HC-05 in AT mode immediately after each start (and being possible to exit it with arduino). Is there any other solution than using relays? I am thinking about some sort of FET level converter, but not sure which one.
I think that KEY pin must be in 3V3 logic. There might be a voltage divider (as on RT/TX pins), but not sure as there is no proper datasheet....

Thanks

Helium328PU:
I think that KEY pin must be in 3V3 logic. There might be a voltage divider (as on RT/TX pins), but not sure as there is no proper datasheet....

I think that is correct but I'm not sure anybody bothers about it. The only time I have seen anybody take the trouble is when a signal from an off-board divider is applied direct to pin 34.

The data sheets only apply to the bare modules.

I believe you can do what you want by using the JY-MCU board that does not have a button switch. The KEY pin and whatever else can then be programmed in Arduino's setup procedure.

Nick_Pyner:
I think that is correct but I'm not sure anybody bothers about it. The only time I have seen anybody take the trouble is when a signal from an off-board divider is applied direct to pin 34.

The data sheets only apply to the bare modules.

Yeah, I know. I was trying to find some datasheet/schematic for adapter board....

Nick_Pyner:
I believe you can do what you want by using the JY-MCU board that does not have a button switch. The KEY pin and whatever else can then be programmed in Arduino's setup procedure.

Well, I have exactly these ones:

http://www.aliexpress.com/item/Power-board-EBR31872802-Y-Board-Best-price-and-good-service/792191210.html

They have a KEY pin and button also. I found this reference (might not be accurate) :

There is a current limiter to KEY pin (R5) which could be probably used to connect LED indicator to KEY pin. However even if this is a case, I cant apply 5V logic to KEY with digitalWrite() - I guess that will blow the BT controller...

As I am thinking more about this, I think that I have to remove that protection film from one module and try to measure those ultra-tiny resistors to know if there is any sort of divider.

Helium328PU:
Well, I have exactly these ones:

http://www.aliexpress.com/item/Power-board-EBR31872802-Y-Board-Best-price-and-good-service/792191210.html

A ZS-040 perhaps, and I suspect not what you want.

However even if this is a case, I cant apply 5V logic to KEY with digitalWrite() - I guess that will blow the BT controller...

It would be a good idea to, but you are not that likely to blow anything if you don't. I have had bluetooth running continuously for a couple of years with no dividers on anything.

Nick_Pyner:
A ZS-040 perhaps, and I suspect not what you want.

It doesnt look exactly same as ZS-04 but might be sort of clone design (there are unused pads for SMD components on my modules).

Nick_Pyner:
It would be a good idea to, but you are not that likely to blow anything if you don't. I have had bluetooth running continuously for a couple of years with no dividers on anything.

I took off the protection film on one module and measured all connections. Found that RT and TX are really directly connected to module, Its strange that it works as all datasheets are specifiyng 3V3 logic only...

Anyway, in my modules, AT button is directly connected to 3V3, no connection for external trigger. So I have to desolder it.
Found this nice improvement for Arduino manual power on:

So I will add same transistor switch on the AT mode and connect output to the module pin 34. It should work right?

Thanks for help!

That transistor is used as a digital switch, to turn on/off the bluetooth module by code.

However, on the pin 34 you can see there is a voltage divider that allow to safely control it by the 5V logic level of the Arduino.