Using the BlueSMiRF

Contributors: jimblom
Favorited Favorite 12

Hardware Overview

SMiRF? Mate? Silver? Gold? What's the Difference?

The "Silver" and "Gold" designations of these modules indicates whether they use an RN-42 Bluetooth module or an RN-41. The Silvers use the RN-42, and the Gold uses an RN-41. The difference between those two modules? Range and transmit power. The RN-41 is a class 1 Bluetooth module, so it can communicate at up to 100 meters, but it also transmits at a higher power (meaning shorter battery life). The RN-42 is class 2, which limits the transmit range to about 10 meters.

The difference between Mate and SMiRF all comes down to the pin-out of the six-pin header. If you flip each of the boards over, and look at the pin labels, this is what you'll see:

Pinout of BlueSMiRF and Bluetooth Mate

The pinout of the Mate matches that of products like the FTDI Basic and the FTDI Cable. It's a "standardized" pinout for a serial interface and power supply combination. This pinout allows the Mate to be plugged directly into the serial header of Arduino Pro's and Pro Minis.

Bluetooth Mate plugged into Arduino Pro

A Bluetooth Mate can be plugged directly into the serial header of an Arduino Pro.

That's all there is to this whole Mate/SMiRF/Silver/Gold debacle: transmit range and pinout. Besides that, everything else on these boards is the exact same -- schematic, command interface, size, you name it.

Design Overview

The RN-42 and RN-41 are pin-for-pin compatible, so the schematic for each of these boards is the same. The only difference exists at the connector pin-out for the Mate and SMiRF. Click the image below to see a bigger view of the schematic (or click here to see it in PDF form).

Bluetooth Mate Silver Schematic

Key to the design are level shifting circuits between the RN-41/42's serial pins, and the output header. The maximum operating voltage of the Roving Networks modules is 3.3V, so these enable a device operating at 5V (like an Arduino) to safely communicate with the Bluetooth modems. There is also a linear 3.3V regulator on the board, so a voltage from 3.3V to 6V can be used to supply power to the module.

The boards also include two LEDs. There's a red "Stat" LED, and a green "Connect" LED. These can be used to determine what state the Bluetooth module is in.

Annotated Board

Finally, be aware of where the antenna is -- give it some room to breathe. Don't place it near any big chunks of metal or enclose it in a Faraday cage, and you should be just fine.

The Pinouts

Each of the four Bluetooth boards breaks out six pins. Four pins are devoted to the serial interface, and the other two are for power.

Pin LabelPin FunctionInput, Output, Power?Description
RTS-ORequest to sendOutputRTS is used for hardware flow control in some serial interfaces. This output is not critical for simple serial communication.
RX-ISerial receiveInputThis pin receives serial data from another device. It should be connected to the TX of the other device.
TX-OSerial transmitOutputThis pin sends serial data to another device. It should be connected to the RX of the other device.
VCCVoltage supplyPower InThis voltage supply signal is routed through a 3.3V regulator, then routed to the Bluetooth module. It should range from 3.3V to 6V.
CTS-IClear to sendInputCTS is another serial flow control signal. Like RTS, it's not required for most, simple serial interfaces.
GNDGroundPower InThe 0V reference voltage, common to any other device connected to the Bluetooth modem.

Powering the Modules

These Bluetooth devices are designed to work seamlessly in both 3.3V and 5V systems. The voltage supplied to the VCC/GND pins can be anywhere between 3.3V and 6V. Voltages on the input serial and control signals (RX-I and CTS-I) can be anywhere between 3.3V and 5V. The output signals (TX-O and RTS-O) will range from 0V for a LOW logic level, and VCC for a HIGH. That means if you power them at 6V, the TX and RTS signals will output up to 6V.

The current consumption of a modem depends on what it's doing at the time. It can be as low as 0.026mA when the device is asleep, and as high as 50mA when data is being transmitted. This table from the datasheet provides some good estimates:

Current consumption characteristics

Connecting a device up to the Bluetooth modems is as easy as applying power and wiring up the serial RX and TX pins. What do we send over that serial interface, though? That's where we need to look at the the firmware and the Bluetooth module's operation modes.