Instructables

How to Create an Arduino Compatible Bluetooth 4.0 Module

Featured
Picture of How to Create an Arduino Compatible Bluetooth 4.0 Module
UPDATE: I had some people mention I screwed-up and posted the wrong breakout board. For that I'm sorry, please email me and we'll talk.

 I have corrected the link with a new version of the breakout that should correct "all" issues (working RX/TX LEDs).


But I'll add, please use this Instructable at your own risk.  I'm a Psychology major :P

I had been looking for a cheap alternative to some of the Arduino Bluetooth devices I'd seen, which in my opinion are overpriced.

Redbear's Mini: $39.95 (Note: This is a uC and BLE combo).
Redbear's Uno Shield: $29.95
BLEDuino: $19.95 (if part of Kickstarter)
Bluegiga Shield: $69.95

After seeing these, I thought I'd try to make one; this is my bumbling process for making an Arduino Bluetooth 4.0 device at home:

I highly recommend reading details about the HM-10 and interfacing with it: Variants of the PCB can be found here; though, many are untested.
This is a fellow to keep an eye on.  He is working on creating open-source firmware to replace the HM-10 firmware.  
 
Remove these adsRemove these ads by Signing Up

Step 1: How to Create an Arduino Compatible Bluetooth 4.0 Module

This guide is intended to show how to interface one of these HM-10 Bluetooth Low Energy modules to an Arduino.

I started working with these little Bluetooth modules in attempt to add Bluetooth 4.0 to my robot projects.

 
moris_zen3 months ago

Hi Ladvien ,

Thanks for posting your work .

I purchased 3 PCBs v0.93 but could not get them to work .

I wanted to bypass the regulator and some resistors - what I need is just a breakout to properly connect to the small pitch of the HM-10 .

Can you pls share the schematics of the breakout you made and mention the latest correct version ?

Thanks.

B.T.W - What Android SW did you use for the BLE ?

Ladvien (author)  moris_zen3 months ago

The v0.93 had some mistakes. I've a later version boards (v0.9.9) I'll send you if you like, but if you are looking to make a dead-simple breakout, my Eagle files can be found on my Github. The linik is above :)

moris_zen Ladvien3 months ago
Hi Ladvein ,
I downloaded the PCB file but would like to better understand where and regulator is connected and which resistors I can short to work only with 3.3V .
I would appreciate if you can send me the schematics .
My email is moriszen[AT]gmail[DOT]com.
thanks
B.T.W - would you be interested to make a small PCB Arduino + BLE for a project I am working on (paid) ?
Thanks
schmoofer3 months ago

Has anyone at all gotten the commands "AT+DISC?" or "AT+ALLO?" to work? I've gotten almost every other command to work but those. I'm running v526 firmware and tried it both on an HM-10 and HM-11 module with CC2541 chips, but to no avail. I get no response with those commands (already switched to "Master/Central" role).

Ladvien (author)  schmoofer3 months ago

I've not played with either feature. I'm sure I'll get around to them, though.

But speaking from general experience, I'm guessing the firmware is incomplete; keep an on eye on future updates.

schmoofer Ladvien3 months ago

Thanks for letting me know. The firmware changelogs mentioned those commands being added around v523, so it wouldn't make sense to make such a bold statement and not implement them. Oh well.

dtrotzjr5 months ago

Quick update. I spent some time tonight doing some basic tests of Thomas' latest board schematic and the latest version does light up the LED's fine. :-)

Ladvien (author)  dtrotzjr5 months ago

Good to hear. I'll have the next iteration tested and posted by Tuesday.

dtrotzjr5 months ago

All of these tips were great!

One tip I have for the SM LEDs is to put a dab of of hot solder on one of the pads and while it is still hot carefully place the LED onto the pad with the tweezers, let it cool then solder the other side, once the other side is done come back and make sure the initial side is soldered well. Also be sure to note the polarity of the SM LED which is not as easy to determine as it is with their through hole counterparts.

dtrotzjr5 months ago

When you post the update, be sure to update the BOM to reflect the single 20K resistor and the optional 2x 0.1uF caps as well. Good work!

stvmac116 months ago

I really enjoyed reading this project. I'm all about diy. I've worked with bluetooth serial projects in the past, and I figured this wouldn't be any different. I see there might have been a few board versions floating around. I was able to order the 0.9.3 before you took it off OSHPark (I assume because of the non-functional TX,RX lighting - which is fine, I don't need to see them.)

Do you happen to see anything wrong with the board? I bridged 1 joint, left one open, and soldered 4 10k resistors. I'm using an arduino with a 3.3v source (no need for a voltage divider)

It powers on OK, the IO1 LED flashes when not connected, and stays HIGH when connected, but I'm unable to send or receive any AT query or communicate at all. I use SoftwareSerial - HM-10 RX to Arduino TX, and HM-10 TX to Arduino RX.

Being unable to communicate seems to be a problem with the TX, RX. Do I have the resistors on the correct joint?

Any help would be greatly appreciated! Keep up the good work!

IMG_20140119_132330.jpg
Ladvien (author)  stvmac116 months ago

The reason I took the board down is because I had linked the wrong version. As dtrotzjr pointed out. The board version I linked still works as you have it soldered, except of course the RX/TX LEDs don't work. I'm currently working on corrections and will have new boards sent off by end of day. If you are able to Skype: thomas_ladvien. I would like to replace your boards for you :)

stvmac11 Ladvien6 months ago

What a simple fix! I switched the RX and TX lines and now we're rolling. TY

dtrotzjr6 months ago

Parts are starting to roll in, but I didn't realize that your latest boards do not properly light the TX/RX LEDs is that correct? Can you please update this instructable to reflect this? Can you update the board too?

Ladvien (author)  dtrotzjr6 months ago

Yes, yes, and yes.


I might need a day or two. I apologize, I thought I put a note in the Instructable stating they didn't work. I'll create a board with working TX/RX LEDs and post it, but I wont order myself. Sorry, too many irons in the fire right now.

musawir6 months ago

I purchased a BLE module that is based off of the same TI CC2540 chip you used in your project, but has a different PCB package which I don't quite understand. Here is the thing I have bought: http://www.aliexpress.com/snapshot/310173495.html


I have a couple of questions if you don't mind answering. First, are ALL the pins on these modules needed? Can't I just solder some wires out of the pin slots that I will use and leave the rest alone? Secondly, the debugger pins on my module are listed as: GND, 3.3V, P2.2, P2.1, RESET
How do I interface this to the FTDI?

dtrotzjr6 months ago
This is awesome! Thank you for sharing! I ordered all my parts tonight. I'll let you know how it goes!
danasf7 months ago
Thanks for this tutorial, it was super helpful.

I managed to get a HM-10 working with Android 4.4, Arduino and a RGB LED strip using Google's BLE sample code. It's very rough at the moment (first attempt at putting together an Android app) but it does function: https://github.com/danasf/hm10-android-arduino
Ladvien (author)  danasf7 months ago
Glad it was helpful. Thank you so much for sharing. Now I just gotta get me an Android device with BLE. :)
sjúnior48 months ago
Hi cbrittain1,

First of all, congrats for your nice work here !

I would like to ask you for some help. I bought a BLE Shield for Arduino from (http://imall.iteadstudio.com/development-platform/arduino/shields/im130704001.html). They made this shield using your Hm-10 Bluetooth module. But I have no idea on how to program it or send AT commands from Arduino.

I read the “AT commands” at the datasheet and I tried to send "AT commands” from arduino to BLE shield using this code ( http://arduino.cc/en/Reference/SoftwareSerial ) but I only received the commands back.

Do you have any arduino sketch handling this that you can share with me ?

Thanks in advanced,
Sebastian.
Ladvien (author)  sjúnior48 months ago
I should clear up; I didn't make the HM-10, just a stupid ole' breakout.

That said, I'd personally start playing with with a serial specific program (such as RealTerm). I've looked over their shield schematic, it's pretty similar, though, they do include a linear voltage-regulator, which in my opinion defeats some great attributes of BLE (like the LE part). So, in theory, you could plug directly into the shield with an FTDI breakout and talk to the HM-10 without the Arduino involved mucking up the works.

The HM-10 has been created by JNHuamao (nice folk, by the way , www.jnhuamao.cn) and they've had several different firmware versions. Not all firmware have the same AT commands.

I can state, all of the have the

Send: "AT"
Get: "AT+OK"

As a confirmation that the connection is good.

After that, it's a matter of programming the Arduino correctly. A good thread to read is here: http://forum.arduino.cc/index.php?topic=161151.0

Your shield schematic is here:
ftp://imall.iteadstudio.com/Shield/IM130704001_ITEAD_BLE_Shield/SCH_IM130704001_ITEAD_BLE_Shield.pdf

Let me know how it goes. They are great little modules :)
sjúnior4 Ladvien8 months ago
I will study this stuff and came back later.

Thanks for your answer and tips !
DJJules9 months ago
Nice Work here
alinke9 months ago
well done, nice job!
you call yourself all hack, I hope you mean that as a compliment to yourself. The smd soldering advice alone makes this valuable. Good work, I look forward to more of your hacks.
Ladvien (author)  monterreymachito9 months ago
Thank you, sir. If I had shown all the mistakes I made, it would make more sense :)

http://letsmakerobots.com/node/37815

mbetancurt9 months ago
Great thanks, one question , how did u program the BTLE chip? U got my vote!
Ladvien (author)  mbetancurt9 months ago
Thank you. The modules I've linked to have pre-installed firmware :)

http://www.fasttech.com/products/0/10004051/1292002-ti-cc2540-bluetooth-40-ble-2540-transparent-serial

When not connected, they have an AT mode. A full list of commands can be found here.
http://www.ubermentis.com/files/HM-10_English.pdf

If you need to install your own firmware, do know it can be done. But it's time consuming. You can read about my little adventures working with BLE here:

http://letsmakerobots.com/node/38009

and here

http://letsmakerobots.com/node/37815
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!