Pages: 1 2 3 [4] 5 6   Go Down
Author Topic: How to get the JY-MCU bt board to work  (Read 75579 times)
0 Members and 2 Guests are viewing this topic.
Toronto
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I also received the JY-MCU bt board from dx.com (SKU: 104299) and had some trouble getting it working. Mine shows up with the Bluetooth name "linvor", and responds to "AT+VERSION" with "linvorV1.5"  A lot of this has already been said, but here's what I learned:

1. It doesn't require a level converter.
2. You don't need to invert the signal.
3. The default bluetooth pairing code is 1234
4. The default baud rate is 9600 (and I believe N-8-1, but you don't really need to know that if you're using the arduino IDE serial monitor)
5. It will only respond to AT commands that are in uppercase. (eg AT, AT+VERSION, AT+BAUD4, AT+NAMElinvor, AT+PIN1234)
6. It doesn't like returns and linefeeds immediately after commands. In the Arduino IDE serial monitor, you should set the little popup to 'No line ending'.
7. It will not respond to AT commands when it is connected over bluetooth.
8. When I tried setting the baud rate with "AT+BAUD4" it responded with "OK9600" but then seemed to go dead. After much fiddling, for about ten minutes, it magically started working again. 9600 will work fine for me for now.
9. I successfully changed the name using the name command. My computer (Mac) took a while before it updated the name, but my phone (symbian) saw the change immediately.
10. I successfully used the SoftwareSerial sketch at http://arduino.cc/en/Reference/SoftwareSerial but changed all speeds to 9600, including the IDE Serial Monitor.
11. I also tried using that sketch with the software serial connection to the bt board at 9600, but with the hardware port (and serial monitor) at 57600. The AT command would respond "OK", but the "AT+VERSION" didn't respond at all. If I then added the delay(10); (described at http://eclipse.clinertech.com/arduino/bluetooth/blth.html) on a line before "mySerial.write(Serial.read());" it would work again. It's probably easier to just set everything to the same baud rate.
12. I don't think that this board can be used as a Master. It won't respond to "AT + ROLE = 1"

So now I'm a happy camper.
« Last Edit: December 16, 2012, 10:56:43 pm by JPHT » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have tried to connect the RX and [tx] pins of the jy mcu to the TX and [rx] pin of the Arduino UNO3 respectively,  but my simple AT command (enter through the Serial monitor of Arduino IDE) have no response. I only managed to get the "goodnite mr moon" to work. any ideas? i seriously doubt my connection is wrong but it still baffled me.

i learn that this is a slave one, but does it meant by soldering the pin 34 and pull high will make it a master (with the changes in role)?

** just curious for the sketch, does it work with Uno3? understood need to initialize the softwareSerial but that applies to other versions of arduino rather than uno3. uno3 has pin 0 and pin 1 as rx and tx pins

« Last Edit: January 12, 2013, 10:32:01 am by lchunleo » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How many phones would you say this device can pair with at a time?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had the same problems where only the AT command received a response. I have the breakout version 1.03 with firmware version 1.5. Found and changed a simple Arduino sketch to allow AT commands to be sent to the Bluetooth adapter. Simply adding a delay(10) allowed the other commands such as AT+VERSION to get a correct response from the Bluetooth adapter. I used Arduino's serial Monitor to send all the commands.  This is based on the code in the link provided earlier in this thread. Hope this is useful to some!

Link to the code: http://eclipse.clinertech.com/arduino/bluetooth/blth.html

I have the same problem with AT commands, only have AT working, non other. Is the problem in the software serial sketch maby? I don't have a usb to ttl board, only a usb to rs232 so I really need make it work over the arduino, any Ideas?

This code worked for me!! Thank you very much! I had to change BAUD rate to 9600 for BT and 57600 for arduino comm. Then in serial monitor baud 57600 no line ending. I am now controlling my lights via bluetooth! Thanks so much!
Logged

Falmouth, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My BT module is playing  alittle funny. It's a JY-MCU ver 1.05. I have it all seemingly working connected to my Android app. I have the Android app send the numbers "1", "2" & "3" with a new line between each. About one in every ten returns correctly, but mostly they return as 0 or a number between 200 and 255, or half correct.
I've tried all the different baud rates from within arduino but to no avail. I currently have the NewSoftSerial connection on pins 2 and 3 set at 9600 which is connected to the BT module. Both the hardware serial and the arduino serial monitor are also set to 9600.
My phone connects to the module fine and seems to send data out fine.
Has anyone else had this issue with the reliability?
Many thanks
Logged

Falmouth, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, OK so I got it all working fine. It was just a case of rewriting the arduino code to be a little slower to give it time to digest the incoming serial and send it back out to the computer. I used the following code in the end, which works perfectly for me for displaying any data received by the BT module.

Code:
#include <NewSoftSerial.h>

NewSoftSerial mySerial(3,2);

void setup() {
Serial.begin(9600);
mySerial.begin(9600);
delay(500);
Serial.println("go");
}

void loop() {
  int data;
  if(mySerial.available()){
    data = mySerial.read();
  delay(20);
  Serial.println(data,BYTE);
  }
}

I have had issues with using serial communication a number of times and it always seems to catch me out. Hope this is helpful
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the JY-MCU bt board. I was wondering if i can use this Bluetooth module to transfer data such as Heart rate and temperature through a phone ???
Thank you,
alifa
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the JY-MCU bt board. I was wondering if i can use this Bluetooth module to transfer data such as Heart rate and temperature through a phone ???
Thank you,
alifa

I think you could, but I'm not really sure. If you store your Heart Rate and Temperature in a int type variable it'll work, but if you wanna store it in a char[] or int[] I'm not really sure you could
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot. My friend used it for just temperature. I was not sure if it can do Heart rate or ECG. But thanks a lot. What happens if you are not using arduino as a MCu???
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2177
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the JY-MCU bt board. I was wondering if i can use this Bluetooth module to transfer data such as Heart rate and temperature through a phone ???
Thank you,
alifa

I think that depends entirely on the phone. As far as the Arduino is concerned, it uses the same command to send via bluetooth as send to serial monitor - serial.print, ergo, anything you can see, you can send. I imagine the same applies to data received but I have never done that.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings All!!

I'm new to Arduino, and to Bluetooth, so please be patient with me as I might not describe something correctly.

I am working with the JY-MCU and an Arduino UNO like others are within this thread.  I am having a problem with the AT commands.  The JY-MCU will respond to AT, AT+PINxxxx, and AT+BAUDx.  It will not respond to anything else.  I cannot change the name, and it won't give me the firmware version.

I am also unable to pair with it.  I've tried using an Android device to discover it and have had no luck.  I will admit, shortly after I connected Vbatt+ and GND to the JY-MCU I accidentally touched it and got a nice static shock, I'm not sure if I corrupted the micro or not, perhaps that is the root of my problems.

Any help would be greatly appreciated. 
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2865
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Re: How to get the JY-MCU bt board to transfer 4800 baud serial GPS data 10 meters?
Is there anything special I might need to know?

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2177
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

JY-MCU bt board to transfer 4800 baud serial GPS data 10 meters?
Is there anything special I might need to know?

Yes.

1. The factory datasheet for the HC-05 shows the supported baud rate as 9600 minimum.

2. I get 10m line-of-sight OK, but one wall is likely to bring that down to 5m.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2865
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As it happens I own a 9600 Baud Skylabs GPS receiver. I forgot about it last night.. I think I'm going to use an ATtiny 4313 and decode the GPS data and temperature / RH and send them to the 4313 via the HC05 BT transceivers.. Not worth a 328 for such a trivial task..

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Boston MA USA
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> 1. It doesn't require a level converter.
> 2. You don't need to invert the signal.

Both of these statements are incorrect for this board. You do need a signal converter if you're going to talk to any real RS-232 device, and not an Arduino board, and you do need to invert the signal. This board does =not= talk real RS-232. The signal levels are different and don't float on ground.
Logged

A black hole is where divided by zero.

Pages: 1 2 3 [4] 5 6   Go Up
Jump to: