Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interface with jy-mcu
02-03-2014, 07:38 PM,
#1
Interface with jy-mcu
Hellow,

I've been trying to interface with my bluetooth jy-mcu adapter all day now and I just can't figure it out.

I have 2 bluetooth serial adapters which do exactly the same so I'm fairly sure that it isn't the hardware.

I have configured baudrate 9600 and sending works like a charm. I've connected my pinguino with bootloader v2.12 to my cell phone and I can recieve data on my cellphone.

But when I try to send data on my cellphone and receive it on my pinguino I've get all strange characters.

It's almost as if the baudrate of sending differs from the baudrate of receiving. The bluetooth adapter is version 1.06 with Linvor1.8.

In the past I've been able to successfully connect a version 1.05 with my pinguino but now it just doesn't seem to work. I've tried my own program which was able to send data to my cellphone but not receive it and I've tried this program: http://wiki.pinguino.cc/index.php/Serial_Example but neither one's work.

Thanks if anyone can help my. It's probably something stupid that I've mist.

Regards

Xump
Reply
02-03-2014, 09:24 PM,
#2
RE: Interface with jy-mcu
(02-03-2014, 07:38 PM)Xumpino Wrote: Hellow,

I've been trying to interface with my bluetooth jy-mcu adapter all day now and I just can't figure it out.

I have 2 bluetooth serial adapters which do exactly the same so I'm fairly sure that it isn't the hardware.

I have configured baudrate 9600 and sending works like a charm. I've connected my pinguino with bootloader v2.12 to my cell phone and I can recieve data on my cellphone.

But when I try to send data on my cellphone and receive it on my pinguino I've get all strange characters.

It's almost as if the baudrate of sending differs from the baudrate of receiving. The bluetooth adapter is version 1.06 with Linvor1.8.

In the past I've been able to successfully connect a version 1.05 with my pinguino but now it just doesn't seem to work. I've tried my own program which was able to send data to my cellphone but not receive it and I've tried this program: http://wiki.pinguino.cc/index.php/Serial_Example but neither one's work.

Thanks if anyone can help my. It's probably something stupid that I've mist.

Regards

Xump

Did you look at this page : http://wiki.pinguino.cc/index.php/SPP_Bluetooth_Modules ?
Personnally a few months ago I tried this same BT adapter with my Android smartphone and it worked.
Would you give more details ?
André
Reply
03-03-2014, 06:18 AM,
#3
RE: Interface with jy-mcu
As I noted at http://wiki.pinguino.cc/index.php/SPP_Bluetooth_Modules it is very easy to damage the bluetooth chip if you apply more than 4.2V even for a moment (voice of experience).

Have you tried using a computer rather than your cell phone?

Do you still have the Linvor v1.05 module?

Also, do you know which HC-0x version of the bluetooth module you have? I only had HC-05 and HC-06 available when I wrote up that page; I now have an HC-07 and HC-09 but haven't had time to check them out yet. It sounds lkke you might have one of these later revisions. Can you post a photo of your new module?
Reply
03-03-2014, 11:36 AM,
#4
RE: Interface with jy-mcu
(03-03-2014, 06:18 AM)Pinguino Wrote: As I noted at http://wiki.pinguino.cc/index.php/SPP_Bluetooth_Modules it is very easy to damage the bluetooth chip if you apply more than 4.2V even for a moment (voice of experience).

Have you tried using a computer rather than your cell phone?

Do you still have the Linvor v1.05 module?

Also, do you know which HC-0x version of the bluetooth module you have? I only had HC-05 and HC-06 available when I wrote up that page; I now have an HC-07 and HC-09 but haven't had time to check them out yet. It sounds lkke you might have one of these later revisions. Can you post a photo of your new module?

Hellow,

Thanks for the repley. I don't have the 1.05 module anymore. Like you said it's very easy to damage them so that's what happened.

Also thanks for the tip for the 4.2V. The chip says that the range is from 3.6V till 6V. So I always believed that a 7805 Voltage regulator is good enough to power the module.

I see if I can upload some pics. From what I can tell it's a BC417.

Regards

Xump
Reply
03-03-2014, 04:44 PM, (This post was last modified: 03-03-2014, 05:08 PM by Xumpino.)
#5
RE: Interface with jy-mcu
Ok, some more news.

I've just got the bluetooth adapter completely working on my serial port of my raspberry pi.

I am able to login so sending and receiving is possible...

So now I'm sure that the module isn't broken.

I'm beginning to fear that it has something to do how the pinguino Serial package interprets this module... Although I don't really see how this could be. Isn't this just a serial connection once you just use Rx Tx...

I'm going to try it with the same configuration as I'm using now. So baud rate 115200 and see how far I get.

Should I lower the voltage of my 7805 with some diodes?

Any help is still welcome...

Regards

Xump

ps: Because I like to do something riskfull :p I've decided to connect the module to the 5V port of the raspberry and the module works perfectly so the voltage shouldn't be the problem neither...

ps2: I'm using a pic18f2550 on custom made board...
Reply
03-03-2014, 06:08 PM,
#6
RE: Interface with jy-mcu
Since the 7805 provide a regulated 5 volt output it is common practice to reduce voltage using tre general purpose diode forward biased in series to reduce voltage to 3.2 Volt.
Personally i used 7805 with three 1N4007 many times without problems. Check only that the max current is within the 1N4007 limit (1A)

I guess you have some speed mismatch problems, try to log tx and rx signal with a logic analyzer and send the sequence RYRYRYRYRYR to measure if actually the speed is as it would be. I will try to reduce speed and see if this help. May be your Pinguino board speed is nominally 115200 but actually it isnt. This could explain why with a different board (raspberry) it works.

Fabio.


(03-03-2014, 04:44 PM)Xumpino Wrote: Ok, some more news.

I've just got the bluetooth adapter completely working on my serial port of my raspberry pi.

I am able to login so sending and receiving is possible...

So now I'm sure that the module isn't broken.

I'm beginning to fear that it has something to do how the pinguino Serial package interprets this module... Although I don't really see how this could be. Isn't this just a serial connection once you just use Rx Tx...

I'm going to try it with the same configuration as I'm using now. So baud rate 115200 and see how far I get.

Should I lower the voltage of my 7805 with some diodes?

Any help is still welcome...

Regards

Xump

ps: Because I like to do something riskfull :p I've decided to connect the module to the 5V port of the raspberry and the module works perfectly so the voltage shouldn't be the problem neither...

ps2: I'm using a pic18f2550 on custom made board...
Reply
04-03-2014, 01:54 AM,
#7
RE: Interface with jy-mcu
(03-03-2014, 11:36 AM)Xumpino Wrote: Also thanks for the tip for the 4.2V. The chip says that the range is from 3.6V till 6V. So I always believed that a 7805 Voltage regulator is good enough to power the module.

Be careful, the chip is not 3.6V to 6V - that is the base board on which the chip is mounted and is because the base board has its own voltage regulator.

Glad to hear you got it working with the Pi. I'd try reducing the baud rate from 115,200 to 9600 and see if it will then work with the Pinguino - if it does, try increasing the baud rate until you find the sweet spot.

A photo of your module would be nice to see.
Reply
05-03-2014, 08:04 PM, (This post was last modified: 05-03-2014, 09:15 PM by Xumpino.)
#8
RE: Interface with jy-mcu
Hellow all and thanks for the replies,

In the mean time I've uploaded some pics of the module. You should be able to read the main controller clearly...
http://www.imagebam.com/image/c2f39a312257812
http://www.imagebam.com/image/95a339312257830
http://www.imagebam.com/image/80ba9d312257842
http://www.imagebam.com/image/76777d312257852

Unfortunately I don't have a logic analizer. But if I understand it correctly there is a chance that the baud rate has to have a specific value for the pinguino.
I don't really understand why but hey I can try different values and see if I can find the sweet spot.

Thanks for the help,

Regards

Xump

PS:
Ok I've made a stupid mistake. None of the Baud rates worked so I've tried 230400 but now I can't reset the module...
I've tried following program in the pinguino

Code:
void setup()
{
         Serial.begin(230400);
         delay(1000);
         Serial.print("AT+BAUD4");
}

But it didn't work. According to an arduino forum you needed to do this with Serial.write but I can't seem to compile that command...

Also I'm using bootloader 2.12 could'nt that have something to do with my issues...

Thnx
Reply
06-03-2014, 05:46 AM,
#9
RE: Interface with jy-mcu
The actual bluetooth module is an HC-06 on a JY-MCU BT_BOARD v1.06 which is why you can use 3.6-6V to power it because the BT_BOARD includes a voltage regulator.

To get it back to 9600, you must make sure that it is not paired (the LED must not be lit solid). Once paired, AT commands are not recognised.

The general advice is to use an MCU to deliver the required baud rate change if you've set it to a very high baud rate as you have done. However, I suspect you can recover it with a computer and a terminal program if you can script it or use a macro to deliver the baud rate change command (without a terminating carriage return or linefeed).
Reply
22-03-2014, 03:55 PM,
#10
RE: Interface with jy-mcu
Hellow, some new progress. I've bought some new jy-mcu modules from dealextreme. Very strange but those modules do exactly the same as my old ones while they are guaranteed to work under andriuno...

Is it possible that I need to install a new bootloader or something like that? I can test it myself but then I need to desolder my pic...

Regards

Xump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)