Bluetooth To Serial Modules: Deal Extreme, Part # 80711
Bluetooth To Serial Modules: Deal Extreme, Part # 80711
Introduction I recently came across a number of vendors on eBay and elsewhere sellin small circuit boards that billed themselves as !"ireless #S2$2 Bluetooth %ransceiver Modules!. %hese really cau ht my interest for a number of reasons. &irst was their low cost' many could be had for well under (20.00 with the one from )eal *+treme comin in around (,.00. My -rimary interest was to connect one of these devices to a microcontroller based device in one of my railroad controllers so that I could ather telemetry data from a movin train. It also has the -otential to be used to control a train via Bluetooth. I ordered units from a few vendors and be an e+-erimentin when they arrived. Hardware Overview .ll of the units that I ordered are very similar and are based on the same chi- set. %he unit shown here is from )eal *+treme' -art / 00111. %he antenna is at the ri ht and the connections to the board are on the to-' left and bottom ed es. %hey are referenced by callin the to- ri ht indentation !1! and countin se2uentially in a counter cloc3wise direction around the board with the last connection numbered !$4!. %here are 1$ connections on the to-' 0 on the left side and 1$ on the bottom. %he -lated contacts can be seen more clearly in the -hoto of the bac3 of the board.
First Experiences %he modules re2uired $.$ volts )4 with the e+ce-tion of one that could run with either $.$ or 5 volts due to the inclusion of a volta e re ulator on the secondary circuit board. Brin in the boards to !life! was as sim-le as a--lyin volta e to the a--ro-riate -ins. %he units with an on-board indicator 6*) be an to flash indicatin that they were ready to be found by another Bluetooth device. Since the )eal *+treme boards were bare an 6*) and 410 ohm current limitin resistor were added to -ins 22 7 round8 and 24' referred to as 9I:718. :nce -ower was a--lied I used a Bluetooth e2ui--ed .ndroid tablet 7and later my .ndroid -hone8 to attach to the boards. %heir default names were all !linvor! and each was found without any trouble. :n the .ndroid devices I used a terminal -ro ram called Blue %erm to attach to them. ;nfortunately there is nothin that you can do beyond attachin unless somethin is attached to the serial -ort on the module. %o e+-eriment with the serial -ort I connected the round' transmit and receive -ins to -ins 5' 2 and $ on a )B 9 and hoo3ed u- to my 94 throu h a serial to ;SB ada-ter. .fter a number of unsuccessful tests and e+-eriments with baud rates and settin s I discovered that the volta es on the modules was not a--ro-riate to tal3 to a com-uter without some modification. I found a number of entries on the Internet that indicated that the best way to accom-lish this modification was to use a M.<2$2. MAX232 Circuit %he circuit that I used is shown below. %he ca-acitors are tantalum 4.1 uf devices. %he documentation for the M.< 2$2 calls for 1 uf but all I had on hand were the 4.1s and they wor3 fine. I used a 5 volt re ulator 7106058 to su--ly the M.<2$2. %o et the lower volta e for the module I -ut three silicon diodes in series dro--in the 5 volts to 2.9 volts. %he circuit -erforms very well and allows direct connection between the Bluetooth module and either my .ndroid device or the com-uter. It also wor3s with both 9I4 and 9I4.<* microcontrollers. %he -ro ram that I use on the com-uter is called %era %erm. Since "indows 1 does not include =y-er%erminal it is a ood substitute and the -rice is ri ht 7freeware>8.
Circuit Prototype %his -hoto shows the circuit built for testin on a -rototy-e board. %he Bluetooth module is at the left. %he ?um-er is in the far left. %he $ -in header connects to the )B-9.
AT Commands In order to -ut the module into command mode' which is used to chan e the baud rate and name' you need to connect -in $4 to the -ositive volta e terminal. %he schematic shows a ?um-er that can be used to connect these contacts. "hen I first o the module wor3in with %era %erm I ty-ed .% on the terminal and the module res-onded :@. I tried other commands that were in various documents that I found and never received a re-ly from the device. . bit of e+-erimentation determined that ?ust ty-in the commands did not serve to communicate with the module. I needed to use a different method. ;sin %era %erm I selected 4:A%#:6 from the -ull down menu then B#:.)4.S% 4:MM.A). "ith the settin s shown below I was able to communicate with the Bluetooth module. .s you can see the command !.%BC*#SI:A8 returns !linvolC1.5!.
.%BA.M*newnamehere
can be used to chan e the name of the module. ;sin .%BA.M*)*-three chan es the name to !)*-three!
.%B9IA++++ sets the -assword 79IA number8 - I have not tested this as I left all of my modules set to the default 12$4 .%BB.;)/ where / is a di it between 1 and 9 1 2 3 4 5 6 7 8 9 >> >> >> >> >> >> >> >> >> 1200 2400 4800 9600 (Default) 19200 38400 57600 115200 230400 sets -arity - not tested
.%B9A