13
Tech Firma Making Technology Accessible Bluetooth RN42 Module Datasheet Wireless Serial Communication Plug the Bluetooth RN42 Module into the Scooterputer Sensor Shield and GLCD Display to provide a wireless serial communication link. Using the Bluetooth RN42 Module, there is no need to connect with a wired data cable. Just apply power and the devices immediately auto- connect. Or use it to connect to a Bluetooth- enabled mobile phone using one of our Scooterputer smart phone applications. Overview The optional Bluetooth RN42 Module from Tech Firma, LLC provides wireless communication between Scooterputer and a display device such as our Graphic LCD 128x64 Display product or a smart phone. Based on the highly integrated RN-42 Bluetooth device from Roving Networks TM , the Bluetooth RN42 Module eliminates the need to run a wired data cable from the Scooterputer Sensor Shield to your display. This makes installation simpler and extends the range between devices to up to 60 feet (20 meters). The Bluetooth RN42 Module can be used to send Scooterputer sensor data to a cell phone. Our smart phone applications present an attractive, colorful screen for displaying sensor data. When used as a display, a smart phone can be mounted to the vehicle using one of the widely available RAM Mount TM systems, allowing it to be attached and detached quickly and easily. When used on the GLCD Display, any Bluetooth-enabled device can be paired with it and used to send data for display. Features Based on the RN-42 Bluetooth device from Roving Networks TM SPP (Serial Port Profile) support Jumper for Master or Slave mode Jumper for Auto-discover mode Green LED connection indicator Range up to 60 feet (20 meters) Simple PWR, GND, RX, TX connections Small package size 3.3v power requirement Tech Firma, LLC Datasheet - Rev 14.0 1

Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

  • Upload
    ledat

  • View
    220

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

Wireless Serial Communication

Plug the Bluetooth RN42 Module into the Scooterputer Sensor Shield and GLCD Display to provide a wireless serial communication link. Using the Bluetooth RN42 Module, there is no need to connect with a wired data cable. Just apply power and the devices immediately auto-connect.

Or use it to connect to a Bluetooth-enabled mobile phone using one of our Scooterputer smart phone applications.

OverviewThe optional Bluetooth RN42 Module from Tech Firma, LLC provides wireless communication between Scooterputer and a display device such as our Graphic LCD 128x64 Display product or a smart phone.

Based on the highly integrated RN-42 Bluetooth device from Roving NetworksTM, the Bluetooth RN42 Module eliminates the need to run a wired data cable from the Scooterputer Sensor Shield to your display. This makes installation simpler and extends the range between devices to up to 60 feet (20 meters).

The Bluetooth RN42 Module can be used to send Scooterputer sensor data to a cell phone. Our smart phone applications present an attractive, colorful screen for displaying sensor data. When used as a display, a smart phone can be mounted to the vehicle using one of the widely available RAM MountTM systems, allowing it to be attached and detached quickly and easily.

When used on the GLCD Display, any Bluetooth-enabled device can be paired with it and used to send data for display.

Features Based on the RN-42 Bluetooth device

from Roving NetworksTM

SPP (Serial Port Profile) support

Jumper for Master or Slave mode

Jumper for Auto-discover mode

Green LED connection indicator

Range up to 60 feet (20 meters)

Simple PWR, GND, RX, TX connections

Small package size

3.3v power requirement

Tech Firma, LLC Datasheet - Rev 14.01

Page 2: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

SpecificationsPhysical Dimensions – 1.45”l x 0.63”w x 0.15h” (36.9mm × 16.0mm x 3.8mm)

Note: Pins not included in length

Power - +3.3v @ 25mA (Connected Idle)

RN-42 Device - Refer to RN-42 Class 2 Bluetooth Module datasheet from Roving NetworksTM

(available at www.techfirma.com/downloads)

OperationThe Bluetooth RN42 Module can be plugged into connector CONN4 on the Scooterputer Sensor Shield. The Bluetooth RN42 Module can be plugged directly into the connector, standing upright, or plugged into a right-angle connector adapter if height is restricted.

Bluetooth RN42 Module plugged into CONN4 with right-angle adapter (shown with GPS Module removed)

The Bluetooth RN42 Module can also be plugged into the WIRELESS connector on the GLCD Display.

There are two primary applications for the Bluetooth RN42 Module:

1) Data cable replacement

2) Interfacing Scooterputer to a smart phone (Android or iPhone)

Tech Firma, LLC Datasheet - Rev 14.02

Page 3: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

Data Cable Replacement

The Bluetooth RN42 Module is supported by both the Scooterputer Sensor Shield and the Tech Firma GLCD Display. Two Bluetooth RN42 Modules can be paired together to pass serial data between these two products in place of wired communication using a data cable. Since power to the GLCD Display is normally provided through the data cable, external power must be supplied via the provided DC PWR jack (see the datasheet for the Graphic LCD 128x64 Display) when employing the Bluetooth RN42 Module.

The Bluetooth RN42 Module plugged into Scooterputer is configured as a Master sending sensor data to the GLCD Bluetooth RN42 Module configured as a Slave, with a range greater than 6o feet (20 meters).

Data cable connection Bluetooth RN42 Module connection

Configuring The Bluetooth RN42 Modules For Data Cable Replacement

Each Bluetooth RN42 Module must be programmed internally with a “name” and “operating baud rate”. The modules are delivered from the factory pre-programmed with the name set to “Scooterputer” and the operating baud rate set to 38,400 bps.

When used for common data cable replacement with Scooterputer and the GLCD Display, you should use these settings as delivered, eliminating the need to perform any programming. However, these settings may be changed if desired for other applications using the instructions given later in this datasheet.

Assuming the modules have their name and operating baud rate set, the Bluetooth RN42 Modules must be configured for Master or Slave mode and then paired. Jumper pads are provided on the Bluetooth RN42 Module for configuring as a Master device, and for putting the device into “auto-discover” mode for pairing. Only one Bluetooth RN42 Module (the one intended for Scooterputer) should be jumpered as a Master device; the module plugged into the GLCD Display will be the Slave device.

After the pairing procedure is complete, the auto-discover jumper is removed from both Bluetooth RN42 Modules. Once paired, the Master will only attempt to connect and communicate with the paired Slave whenever they are in range of each other. The Master will not attempt to connect to any other Bluetooth device.

Tech Firma, LLC Datasheet - Rev 14.03

Page 4: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

Use the following steps to configure the Master device and pair it with the Slave device:

1. Solder a jumper (30 ga. “Kynar” solid wire) across all three pads of the Master module that will be used on the Scooterputer Sensor Shield. The AUTO DISCOVER mode jumper across the center pad and the pad labeled “A” on the right is temporary so leave enough wire to grab for removal later.

2. Solder a jumper across the center pad and the pad labeled “A” on the right of the Slave module that will be used on the GLCD Display. This jumper is temporary so leave enough wire to grab for removal later.

Jumper across left and center pad for MASTER.; Jumper across right and center pad for AUTO DISCOVER mode.

3. Check to ensure JP4 on the Scooterputer Sensor Shield has a jumper on pins 3-5. This setting provides 3.3v power to the Bluetooth RN42 Module.

4. Plug the Master Bluetooth RN42 Module into connector CONN4 on the Scooterputer Sensor Shield.

5. Plug the Slave Bluetooth RN42 Module into connector WIRELESS on the GLCD Display.

6. Place the two assemblies within proximity of each other and apply power.

7. After a moment the green ‘CONNECT’ LED on both Bluetooth RN42 Modules should light up, indicating that the modules have automatically discovered and connected to each other.

8. Remove power and then remove the jumper across the center and right ‘A’ pad on both modules. DO NOT remove the jumper across the left and center pads on the Master module.

9. Plug the modules back into their respective devices, apply power, and ensure the modules connect automatically as indicated by the green ‘CONNECT’ LED.

Tech Firma, LLC Datasheet - Rev 14.04

Page 5: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

Programming the Bluetooth RN42 Modules for Name and Operating Baud Rate

The simplest way to do this is using a Windows based personal computer (PC) equipped with a Bluetooth interface. Once the PC finds and connects to the Bluetooth RN42 Module, the HyperTerminal application provided with Windows can be used to send ASCII commands to the Bluetooth RN42 Module to enter Command Mode and program the settings. The settings remain, even when powered down, until they are explicitly changed or the factory defaults are restored.

Important Notes

The Bluetooth RN42 Modules are delivered pre-programmed with the name set to “Scooterputer” and operating baud rate of 38,400 bps. The steps shown on the following pages are provided for reference, to be used only if the modules need to be reset to factory default settings, or if different settings are desired. Read the steps carefully and follow exactly as shown.

Command Mode must be initiated by entering ‘$$$’ within 60 seconds of powering up the Bluetooth RN42 Module. If the ‘CMD’ response is not shown in the HyperTerminal window and random incoming characters continue, exit HyperTerminal, power cycle the Bluetooth RN42 Module, then retry connecting and entering Command Mode within 60 seconds of reapplying power. See the steps for connecting to and programming the Bluetooth RN42 Module.

In rare cases it may be necessary to restore the Roving NetworksTM RN-42 device to factory defaults. If the Bluetooth RN42 Module seems to be unresponsive, use the steps, Resetting the Roving NetworksTM RN-42 Device to Factory Defaults, and then use the steps for connecting and programming the local name and operating baud rate. Do this only as a last resort.

Connecting the PC to the Bluetooth RN42 Module:

1. Check to ensure JP4 on the Scooterputer Sensor Shield has a jumper on pins 3-5. This setting provides 3.3v power to the Bluetooth RN42 Module.

2. Check to ensure all jumpers have been removed from the Bluetooth RN42 Module. The device must have the Master and the Auto Discover jumpers removed.

3. Plug the Bluetooth RN42 Module into connector CONN4 on the Scooterputer Sensor Shield.

4. Place the Arduino / Scooterputer Sensor Shield assembly near the PC and apply power.

5. Run My Bluetooth Places on the PC (location may vary depending on the version of Windows – refer to the Windows documentation).

6. Select View devices in range or Search for devices in range.

7. A device labeled “RN42-XXX” or “RN42-XXX SPP” should be shown when the search is complete. In this example, it appears as “RN42-D577”.

Tech Firma, LLC Datasheet - Rev 14.05

Page 6: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

It is not unusual for the PC to have to make more than one attempt to find nearby Bluetooth devices. If the RN42 device is not shown, repeat Step 4.

8. If “SPP” is not included in the name, right-click on the device and choose the Discover Available Services command from the menu. The SPP (Serial Port Profile) supported by the Bluetooth RN42 Module should then be found and displayed in the name.

Tech Firma, LLC Datasheet - Rev 14.06

Page 7: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

9. Once the device is shown with “SPP” in the name, right-click on the device and choose the Connect SPP or Connect to Bluetooth Serial Port command from the menu. The PC should connect and the green LED on the Bluetooth RN42 Module will turn on.

10. Make a note of the virtual serial port assignment shown in the dialog for this connection, as it will be needed for HyperTerminal. In this example, the Bluetooth serial port is assigned to COM7.

Tech Firma, LLC Datasheet - Rev 14.07

Page 8: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

It is not unusual for the PC to have to make more than one attempt to connect. If the connection drops out, repeat Steps 9 & 10.

Programming the Bluetooth RN42 Module Settings:

1. After the PC is connected to the Bluetooth RN42 Module, run the HyperTerminal application on the PC (location may vary depending on the version of Windows – refer to the Windows documentation).

2. In the Connection Description dialog, enter an arbitrary name for the connection then click OK.

3. In the Connect To dialog, choose the virtual serial port (noted earlier) in the Connect using: dropdown list then click OK.

Tech Firma, LLC Datasheet - Rev 14.08

Page 9: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

4. In the COM(x) Properties dialog, make the following settings then click the OK button.

5. The HyperTerminal display should show random incoming characters. Enter ‘$$$’ (three dollar signs) to enter Command Mode. The random characters should stop and ‘CMD’ will appear in the HyperTerminal display indicating that the Bluetooth RN42 Module is in Command Mode.

NOTE: Command Mode must be initiated by entering ‘$$$’ within 60 seconds of powering up the Bluetooth RN42 Module. If the ‘CMD’ response is not shown and random incoming characters continue, exit HyperTerminal, power cycle the Bluetooth RN42 Module, then retry connecting and entering Command Mode within 60 seconds of reapplying power.

6. Enter ‘+’ (plus sign) <Enter> to turn echo on.

7. Enter ‘D’ (dump) <Enter> to display the current configuration settings.

Tech Firma, LLC Datasheet - Rev 14.09

Page 10: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

8. Enter ‘SN,Scooterputer’ <Enter> to program the name. A reply of ‘AOK’ will be displayed.

9. Enter ‘SU,38400’ <Enter> to program the baud rate. A reply of ‘AOK’ will be displayed.

Tech Firma, LLC Datasheet - Rev 14.010

Page 11: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

10. Enter ‘D’ (dump) <Enter> to display the new configuration settings and verify for correctness.

11. Exit HyperTerminal, disconnecting from the Bluetooth RN42 Module.

Resetting the Roving NetworksTM RN-42 Device to Factory Defaults:

1. Connect a normally closed momentary switch between the module’s power, 3.3v, and pad JP1.

2. Plug the Bluetooth RN42 Module into connector CONN4 on the Scooterputer Sensor Shield, or the WIRELESS connector on the GLCD Display.

3. Apply power then toggle the switch 3 times.

4. Remove power and remove the switch.

Tech Firma, LLC Datasheet - Rev 14.011

Page 12: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

Interfacing Scooterputer To A Smart Phone (Android or iPhone)

A smart phone can be paired with a slave Bluetooth RN42 Module plugged into Scooterputer. Once paired, the Scooterputer application running on the smart phone can connect to the module and display Scooterputer information.

Each Bluetooth RN42 Module must be programmed internally with a “name” and “operating baud rate”. The modules are delivered from the factory pre-programmed with the name set to “Scooterputer” and the operating baud rate set to 38,400 bps.

You should use these settings as delivered, eliminating the need to perform any programming. However, these settings may be changed if desired for other applications using the instructions given in the previous section, Data Cable Replacement.

Pairng and connecting the smart phone to the Bluetooth RN42 Module:

1. Plug the Bluetooth RN42 Module into connector CONN4 on the Scooterputer Sensor Shield.

2. Place the Arduino / Scooterputer Sensor Shield assembly near the smart phone and apply power.

3. Using your smart phone, scan for nearby Bluetooth devices. A device named "Scooterputer" should appear. Select that device for pairing.

4. If prompted for a passcode, enter "1234" and proceed with pairing. The smart phone should show Scooterputer in its list of paired devices.

5. Run the Scooterputer application. The application will connect and the green connection LED labeled CON on the Bluetooth RN42 Module will light up.

6. If the application does not connect immediately, unpair the Scooterputer device on the smart phone and retry these steps.

Tech Firma, LLC Datasheet - Rev 14.012

Page 13: Tech Firma · PDF fileLCD 128x64 Display product or a smart phone. ... (see the datasheet for the Graphic LCD 128x64 Display) ... the GLCD Bluetooth RN42 Module configured as a Slave,

Tech FirmaMaking Technology Accessible

Bluetooth RN42 ModuleDatasheet

Open SourceDownloads available at www.techfirma.com/downloads

Scooterputer Sensor Shield Sketch Arduino Libraries Eagle CAD Schematic Eagle CAD PCB Layout Component Datasheets

Copyright © 2012 Tech Firma, LLC. All rights reserved.

Tech Firma, LLC reserves the right to make corrections, modifications, and other changes to its products, documentation and services at any time. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. Tech Firma, LLC makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Tech Firma, LLC assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Tech Firma, LLC assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using Tech Firma, LLC components. Parameters which may be provided in Tech Firma, LLC datasheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters must be validated for each customer application by the customer. Tech Firma, LLC products are not designed, intended, or authorized for use as components in applications in which the failure of the Tech Firma, LLC product could create a situation where personal injury or death may occur. Should Buyer purchase or use Tech Firma, LLC products for any such unintended or unauthorized application, Buyer shall indemnify and hold Tech Firma, LLC and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Tech Firma, LLC was negligent regarding the design or manufacture of the part.

Tech Firma, LLC Datasheet - Rev 14.013