Bluetooth options

My application involves control of a robot from an iPhone, by talking to an Arduino from the phone. After designing my project around the Yun - talking to the Yun via REST over WiFi (which works well), I've decided to investigate an alternative design using Bluetooth. The slow startup times of the Yun are becoming an issue, and it looks like I can do a cheaper design with BT as well.

In my application, the Arduino only needs to be a slave (communication initiated from the phone). I do need to be able to change the Bluetooth device name (not necessarily from a phone, but during initial configuration.)

By searching this board and elsewhere, it looks like most people use an HC-05 board for Bluetooth communication. And it looks like there are quite a few sources for HC-05 boards, mostly in Asia and elsewhere. They look the same on the surface, but I see a lot of comments regarding different issues, that makes me think they're not all the same.

So can someone please advise me as to which board to get, and where from? Or what should I look for when comparing different vendors/boards? For now, I just need a single board for prototyping, but eventually will want to get them on a regular basis - so I'd like to be sure that the boards will continue to be available and will be the same.

I will want to be able to solder the board onto a PC board I will design, if it matters.

Also - one thing I will miss on the Yun is the ability to telnet to the console to view debug messages. Has anyone gotten remote debugging over BT working?

Thanks!

  • Dave

There is a HC05 and a HC06 and one of them can be a master or a slave and the other can only be a slave. I can never remember which is which. The one I have is a slave. I got it from Hobbytronics. One of the documents on the bottom of the page is the user manual for BOTH devices.

…R

dptdpt: My application involves control of a robot from an iPhone,................. please advise me as to which board to get,

Neither. They won't work with an iPhone.

You need a Bluetooth 4 module - "BLE". This presupposes that there is an iPhone app suitable for your needs, and that is probably where your real problem lies.

You may find that the real solution is to ditch the iPhone and get an Android.

Ugh. Freakin apple. Well, I am writing the iPhone app myself, so that’s not a problem.

So it looks like I’m in the same boat with the BLE modules. There are a lot out there. So same question for the BLE boards - any suggestions as to where to get one? Does it matter - or should they all work?

A google search turned up many, such as this one.

And do you know what the range is of BLE?

Try adafruit.com Example: http://www.adafruit.com/products/1697

It's been said before, but Apple products have their own implementation of the bluetooth stack, which makes them mostly non-standard. So a device that works with Android, Windows, Linux, etc, will not work with Apple unless it is Apple compliant (and most chinese BT devices and dongles aren't).

The HC05 is a great little BT adapter, very easy to work with from Arduino using the SoftwareSerial library. I just finished a project using a HC05 (version 1.02, quite old), and it interfaced with a custom Android app. It worked like a charm. It is also pretty easy to change the HC05's name and password (using AT commands from a Serial Monitor).

dptdpt: Ugh. Freakin apple. Well, I am writing the iPhone app myself, so that's not a problem.

such as this one.

And do you know what the range is of BLE?

Hummmmm.... I wish we had this conversation a few hours ago. I have just bought a bare BLE module and a JY-MCU backboard. This was essentially out of curiosity and I would have bought that one from Banggood if I had known. The unpopularity of BLE on eBay rather suggests that it isn't quite ready for the big time but I can't help feeling that user apathy is part of the problem and the fact that it was developed for the Apple Bluetooth stack doesn't actually help much. There was a time of confusion when the BLE makers apparently kept shifting the goalposts. I'm not sure that is still the case, but resellers may be muddying the water with their own agendas. The way I see it now is that that BLE module is a direct replacement for the HC-0x and Arduino wouldn't/shouldn't know the difference, or care, and I'm sure BLE is the way of the future.

The practical range of the BLE is not clear and the greater the claim, the less clear it will always be, but it is surely a hell of a lot better than an HC-0x. A claimed range of 60m, or more, looks pretty good when all I want is 15m with three intervening timber frame walls in the way.

Crossroads - that AdaFruit one looks nice, but at $20, it's a heck of a lot more expensive than the $5 one from Banggood. I think I'll order a Bangood one and try it out, but get the Adafruit one too so I can get working on this sooner.

If anyone has any experience working with either of these, or interfacing an Arduino with any other BLE module, please let me know!

Update on this.

I'm still waiting on my Banggood BT modem. In the meantime, I've done some more research. It looks like a lot of people are using the HM10 BLE modem, such as this one.

This. guy made a breakout board for it to make it easier to mount on a breadboard and/or connect to an Arduino.

I will likely try the HM10 - if anyone has any experience with this, let me know.

Does anyone know why they make these bluetooth modules without holes to solder header pins to? How are you supposed to secure/solder them to your board without holes?

It looks like the main hassle in integrating one of these to an Arduino project is to send it 3.3v VCC, and to convert to/from the Arduino 5v and the BLE 3.3v for the Tx/Rx signals. Since it's so low power, a simple resistor voltage divider would be the way to go for the VCC - agreed?

dptdpt: Does anyone know why they make these bluetooth modules without holes to solder header pins to? How are you supposed to secure/solder them to your board without holes?

You don't seem to to realise how big these modules are - or aren't. The pads are spaced at 1.5mm c-c, so even if they had holes, they still wouldn't fit properly on your board. More to the point, the pad pattern and assignment is the same as an HC-05 - hence my previous comment that they should be a direct replacement on the solder boards designed for the HC-05. This is the reason, not to mention the price, that I have bought an HM-10 and a JY-MCU board, as I said out of curiosity. Needless to say, this means a lot of the pads aren't used, but they aren't on the HC-05 either, and I have yet to feel deprived by that. As I said, the dealers muddy the waters with the various breakout boards using the same cheapo module, which may offer more than you need, but if you do understand and need the extra features, you can pay up the extra money and look happy. I recall the banggood one you ordered looks the same as what I was prepared to assemble myself. It's the first time I have seen that - and at a sensible price too - hence my comment. I imagine it is the first of many. The HM-10 I have ordered is the one you allude to.

It looks like the main hassle in integrating one of these to an Arduino project is to send it 3.3v VCC, and to convert to/from the Arduino 5v and the BLE 3.3v for the Tx/Rx signals. Since it's so low power, a simple resistor voltage divider would be the way to go for the VCC - agreed?

Agreed to the point that it's exactly the same hassle as an HC-05. I have never converted the voltage for Rx/Tx. It clearly isn't necessary to do anything with Bluetooth's Tx, but I am putting in a divider for the Rx on the board I am currently making.

I know how big they are - I have an HC-05. I'm just used to having something with pins to solder. You're right - headers wouldn't work though. I'm getting a PCB printed that I will connect this to, so I will need to solder to that. Nonetheless - that JY-MCU board looks like a good option if Banggood isn't good about shipping. We'll see. So you're saying that it's a bare board that can accept an HM-10? Where can one order one of those? If I google JY-MCU, they all look to be populated already with a BT module.

The bare boards are always available on eBay for about $1.50. If you go about it methodically you can remove the pins and solder it directly to a shield, thereby saving the need for a PC board. I have never seen a board sans pins. I say what I say because the Banggood looks like it's on a JY-MCU board and, looking at the data sheets for HM-10 and HC-05, I'm sure one is the direct replacement for the other. Further, that seems the bleeding obvious anyway. I reckon we will all be using HM-10s shortly, but not in the way Lady Ada and the like offer them.

Note that assembling your own gives the option of omitting the LED - a happy accident in my case.....

I'm dong my own board anyway. I can't decide if I will get a JY-MCU board to connect to my board, or if I should just get put the HM-10 on my board and add the supporting resistors, etc myself. Seems like a hassle but doable. I can follow that instructable about the supporting circuitry needed for the HM-10.

I would go for the former, for which the only supporting circuitry is a divider for bluetooth RX, but I didn’t find it too hard to solder a bare module. There is a wiring diagram in the HN-10 data sheet, which shows all the peripherals, including the push-button for configuring which is included on the zs-040 board but I don’t know if the JY-MCUs have it yet. I have just seen that Tinxi-world are now selling bare ZS-040 boards.

Stilllllll waiting for the Banggood BLE modules to arrive from China. In the meantime, I'd like to finish the design of the PCB that this will be connecting to. I'll breadboard/test everything before finalizing the PCB, but I'd like to make a first pass.

So anyone know where an Eagle part (lbr file) is for the JY-MCU board? Or do you have the dimensions/pinouts so I can make my own?

Regarding connecting the JY-MCU, I guess what I'll do is desolder the right angle headers from it and replace them with straight headers I can solder to pads on my board. I'm still not clear on voltages. Do I need to put in voltage dividers for VCC? Rx? Tx? Or will it take 5v...?

The pins are standard 2.54 and the board is 15x35. Check eBay for the pin order. I have just found that the ZS-040 board is 2mm longer. It would be smart to put in a 1k/2k divider for the RX, but I have never done it. If it goes on Serial0, a jumper for the 5v track would be a good idea.

Never mind about the Eagle part, I went ahead and made one.

I could still use some advice on the voltage that this board I'm getting from Banggood will use. It looks like it's 3.3v, so I guess I'll put in a voltage divider to feed it 3.3v for VCC, and another one to convert the Arduino 5v Tx into 3.3V. Hoping that the 3.3V Tx coming from the BT module will be recognizable in the Rx pin on the Arduino. If anyone wants to weigh in, it would be appreciated!

Look at Bangood's picture. It clearly shows it's 5v VCC, just like JY-MCU is for HC-0x. Clearly, shifting Arduino's TX to 3v3 is a good idea, even if I have never done it. It is equally evident that there is no need to upshift Bluetooth's 3v3 Tx. Arduino can read it just fine.

Hmmm. Wondering if I will have slew issues with a resistor based voltage divider on the Arduino tx pin. Should I use one of these, or a similar logic converter, instead?

I'm sure everybody else uses 1k/2k resistors, so, no.