I just purchased some HC-05 Bluetooth devices and I have followed the directions to put the devices in AT command mode by holding EN HIGH when the HC-05 powers up. When I do this the HC-05 goes into the "slow blink" to indicate it is in command mode. However, when I send it "AT" I get odd characters in the response.

Note that when I type "AT" I get exactly 4 characters back. They are just not the "OK" characters I expect. I also verified that the Arduino IDE serial console is sending both NL and CR characters.

BTW, here is the Mel Patrick HC-05 authored setup program I am running:

https://raw.githubusercontent.com/dmccreary/coderdojo-robots/master/src/bluetooth-remote/hc-05-setup/hc-05-setup.ino

HC-05 serial problem

It has been suggested that the data from the HC-05 is only going up to 3.3v and that might be the cause of the problem, since the Arduino is looking for a 0-5 volt signal.

I also note that when I remove the TDX line from the HC-05 that no responses come back. So I suspect that it is getting the "AT" fine through the RTX from the Arduino to the HC-05. It is just some problem in the return data format.

Is there a simple transistor circuit I can hookup to shift the levels back to 0 to 5 volts from the 0 to 3.3 volts?

I am also using an Arduino Nano if that makes any difference.

Thanks - Dan

share|improve this question
    
How is it wired? Are you using hardware of software serial? Do you have it set at the right baud rate? – Majenko Mar 20 '16 at 15:59
    
I have wired the RTX and TDX connections correctly and I have set the correct baud rates. I have another one with similar connections working fine now, but I still don't understand why this device is failing. I have three theories. 1) The defaults were set wrong in this device and got changed back on reset, 2) or the voltages levels were not working.or 3) I have a bad wire... – Dan McCreary Mar 20 '16 at 16:49
    
Here is the current dialog: HC-05 BlueTooth Programmer 1. AT test a. Set Device Name (a,name) 2. Version b. Set Role (b,0) 3. Address c. Set Password (c,1234) 4. Name d. Set UART (d,Baud,Stop,Parity) 5. Role m. Display this menu 6. UART 7. State 8. Password 9. Device Reset Blue is what I typed: 1 OK 2 OK +VERSION:2.0-20100601 3 OK +ADDR:98d3:31:fb1d15 4 OK +NAME:t 5 OK +ROLE:0 6 OK +UART:38400,0,0 7 OK +STATE:INITIALIZED 8 OK +PSWD:1234 OK a,DAN_ROBOT_1 OK 4 +NAME:DAN_ROBOT_1 OK – Dan McCreary Mar 20 '16 at 16:51
    
are setting the serial monitor to 38400 baud? it s the default speed of AT mode – Antony Santero Mar 21 '16 at 14:57

Try setting your baud at 38400. Connect Tx->Tx & Rx->Rx when configuring your module. Tx->Rx & Rx->Tx during execution.

share|improve this answer
    
Why do you need to swap the connections over? – Code Gorilla Mar 21 at 12:58

Is there a simple transistor circuit I can hookup to shift the levels back to 0 to 5 volts from the 0 to 3.3 volts?

Yes there are level shifting circuits you can use, resistor dividers and all that stuff, but you will be better off using a proper level shifting circuit, something like this:

Level Shifter

I believe there is something to do with the speed of switching between high and low and getting crisp rise and falls of the signal.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.