Difference between revisions of "ELET114A Bluetooth Module"

From Wiki
Jump to: navigation, search
(Test equipment)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Test equipment==
+
=='''Introduction'''==
1. PL2302 USB to Serial Module<br>
+
[[File:Ehasfd.png]]<BR>
2. Mobile Phone<br>
+
The ELET114A Bluetooth module follows the BT2.1+EDR/3.0/4.0 Bluetooth profile and supports SPP, HID and so on. This module integrates the MCU and Bluetooth chip, thus boasts being high integrated, low consumption, and excellent Bluetooth radio frequency.
3. Computer<br>
+
=='''Features'''==
4. Bluetooth module<br>
+
Bluetooth Specification: V2.1+ EDR, BT3.0, BT4.0 (BLE)<br>
 +
Operating Frequency Band: 2.4 -2.48GHz unlicensed ISM band<br>
 +
Main Digital Interface: UART<br>
 +
RX Sensitivity: -88dBm<br>
 +
Operating Voltage: +5V 20mA<br>
 +
Operating Temperature: -30 ~ +85 ℃<br>
 +
Dimensions: 50 x 24 x 2mm<br>
 +
=='''Pin Descriptions'''==
 +
'''VCC''': Positive pole of the power source<br>
 +
'''GND''': Ground<br>
 +
'''TXD''': Serial interface, transmitting terminal<br>
 +
'''RXD''': Serial interface, receiving terminal<br>
 +
=='''Using SunFounder Uno'''==
 +
'''Step 1''': Compile and upload the code before building the circuit.
 +
<pre>
 +
/****************************************/
 +
#include <SoftwareSerial.h>
  
'''Notes:''' Pay attention to whether there is short circuit between the power source of the test board and GND, such as VCC and GND.
+
SoftwareSerial mySerial(7, 8); // RX, TX 
 +
// Connect HM10      Arduino Uno
 +
//    TXD          Pin 8
 +
//    RXD          Pin 7
  
==Test items and steps==
+
void setup() { 
1. Connect the wires:<br>
+
  Serial.begin(115200);
 +
  // If the baudrate of the HM-10 module has been updated,
 +
  // you may need to change 9600 by another value
 +
  // Once you have found the correct baudrate,
 +
  // you can update it using AT+BAUDx command
 +
  // e.g. AT+BAUD0 for 9600 bauds
 +
  mySerial.begin(115200);
 +
}
  
[[File:ELET01.png]]<br><br>
+
void loop() { 
 +
  char c;
 +
  if (Serial.available()) {
 +
    c = Serial.read();
 +
    mySerial.print(c);
 +
  }
 +
  if (mySerial.available()) {
 +
    c = mySerial.read();
 +
    Serial.print(c);   
 +
  }
 +
}
 +
/****************************************/
 +
</pre>
 +
'''Step 2''': Connect the circuit.<br>
 +
{| class="wikitable"
 +
|-
 +
|Bluetooth 4.0
 +
|Uno Board
 +
|-
 +
|VCC
 +
|5V
 +
|-
 +
|GND
 +
|GND
 +
|-
 +
|TXD
 +
|Pin 8
 +
|-
 +
|RXD
 +
|Pin 7
 +
|}
  
2. After connecting the '''Bluetooth module''' with '''PL2302 USB to Serial module''', insert the '''PL2303 USB to Serial module''' to the computer, the power indicator D2 on the Bluetooth module will light up and the Bluetooth status indicator D3 will keep blinking. <br>
+
[[File:Bluetoothuno.png]]<br>
3. First, download “Rollman” APP onto your mobile phone (Android only). Tap “'''open'''” and it will come to the Bluetooth interface for us to enable the Bluetooth function. Then tap '''searching and matching the corresponding equipment''' (Name: '''ELET_SPP_xxxxxx'''). Turn back to the interface of the APP as shown below: <br>
+
 +
===Using Android===
 +
If you are using an Android phone, please follow the steps below: <br>
 +
Step 3: You need to download a Bluetooth 4.0 debugging assistant onto the mobile phone to connect it with the Bluetooth 4.0 module. We've provided the tool in Android. Just download BlueTooth.zip on your smart phone and decompress. Then you can see a file BlueTooth. Enable Bluetooth on your phone and install it.<br>  
  
[[File:ELET02.png]]<br><br>
+
[[File:213.png]]<br>  
  
Tap '''Select Device''' and select our Bluetooth equipment. Note: The figure part in front is the Bluetooth module’s address and the following letter & number is the name. See the figure below:<br>
+
Step 4: Open the installed app. It will directly go to the Bluetooth pairing interface. So first pair your phone and the module.<br>
  
[[File:ELET03.png]]<br><br>
+
[[File:Bluetoothconnect.png]]<br>    
  
Tap '''Connect''', then the status becomes '''Connected''', indicates that the Bluetooth module is connected. Meanwhile, the status indicator D3 on the Bluetooth module will keep lighting instead of blinking. Just like the figure below:<br>
+
Step 5: After the pairing is done successfully, you'll be redirected back to the app homepage (Fig 1). Then tap Select Device at the top right corner. On the page, find the Bluetooth and hit it (Fig 2). Tap Connect. When Connect changes to Connected, it indicates that the pairing is good. At the same time the LED indicator on the module will change from blinking to constant lighting.<br>
  
[[File:ELET04.png]]<br><br>
+
[[File:Select device.png]]<br>
 +
 
 +
Step 6: Tap serial monitor in Arduino IDE, and type in “Hello!”, then you will receive it in the mobile phone. Similarly, SunFounder send by the phone will appear in the serial monitor.<br>
 +
 
 +
[[File:Hello receive.png]]<br> 
 +
 
 +
===Use iOS===
 +
If you are using an iPhone or MacBook, please follow the steps below (iPhone as an example):<br>
 +
Step 3: Go to the App store, search for the application – LightBlue and install.<br>
 +
Step 4: Click/Hit Settings -> Bluetooth, enable the Bluetooth and then open the LightBlue.<br>
 +
 
 +
[[File:Lightblue.png]]<br>
 +
 
 +
Step 5: If the Bluetooth is connected successfully, you will see ELET_BLE_XXXXXX as shown in Fig 4. Hit it to connect, then it redirects to the interface in Fig 5. Read and Write Page are separated.<br>
 +
     
 +
[[File:3009AD.png]]<BR>
 +
               
 +
Step 6: Read the message<br>
 +
Tap 0xFFE2 to enter into the interface in Fig 6, tap Hex in the top right corner to set the character type.<br> 
 +
Among the types (Fig 7), choose UTF-8 String.<br>
 +
       
 +
[[File:0Xffe2.png]]<br>
 +
 
 +
Hit Listen for notifications to read the value. Open Serial Monitor, select baud rate 115200, and send “Hello!”, then you will receive it in your iphone.<br>
 +
[[File:Serialmonitor.png]]   
 +
 
 +
Step 7:Write the message<br>
 +
Tap 0xFFE3, and then tap Hex in the top right corner to set the character type.<br>
 +
Among the types (Fig 9), choose UTF-8 String. Hit Write New Value to write a message.<br>
 +
   
 +
[[File:0xffe3.png]]<br>
 +
 
 +
Then you can see the message sent from the phone in Serial Monitor.<br>
 +
 
 +
[[File:Write12.png]]<br>
 
   
 
   
Open the “'''sscom32'''” serial port, select the port number (can be seen in the device manager part in the computer) and baud rate 115200. Then click open the serial port and we can use mobile phone to send data to the Bluetooth and it will be showed on the serial port. Likewise, we can send data to the Bluetooth through the serial port and show it in the APP of our mobile phone. Please see the result in figure below:<br>
+
=='''Testing by AT Command'''==
 +
Step 1. Build the circuit.<br>
 +
{| class="wikitable"
 +
|-
 +
|Bluetooth Module
 +
|FTDI
 +
|-
 +
|VCC
 +
|VCC
 +
|-
 +
|GND
 +
|GND
 +
|-
 +
|TXD
 +
|TXD
 +
|-
 +
|RXD
 +
|RXD
 +
|}
 +
 
 +
[[File:FTDI.png]]<br>
 +
 
 +
Step 2. Set parameters.<br>
 +
Run the serial debugging tool sscom32. Set the parameters first.<br>
 +
1) Run Open Com to check the COM port. Select the corresponding COM port as shown below.<br>
 +
 
 +
[[File:Open sscom.png]]<br>  
  
[[File:ELET05.png]]<br><br>
+
2) Select the correct baud rate. Here we select 115200bps as shown below.<br>
[[File:ELET06.png]]<br><br>
+
  
If the Bluetooth module is used in our cars, the name of the Bluetooth module need to be changed. First, we need to solder the Bluetooth core-board on our Bluetooth baseboard. In order to make the dismantling easier after changing, we don’t need to solder all the pins to the baseboard but a few necessary pins will be fine. As shown in the figure below:<br>
+
[[File:Baudrate.png]]<br>  
  
[[File:ELET07.png]]<br><br>
+
3) Before sending the command, tick the SendNew checkbox, then input “AT+MAC?” below Data input. If the Bluetooth module works normally, it will return the module’s address as shown below.<br>
  
From the first pin in the top right corner in counter-clockwise order, there are pins 1 ~ 34 of the Bluetooth module. We only need to solder pins: 1, 2, 5, 6, 11, 12, 13, 21, 22, and 27. After connecting them with PL2303 USB to serial module, insert the PL2303 USB to Serial module to the computer. Finally, open the “sscom32” serial port, select the port number (can be seen in the device manager part in the computer) and baud rate 115200. Click '''open the Serial port'''.<br>
+
[[File:Sendnew.png]]<br>
 
   
 
   
'''Note:'''we also need to find “send the new rows” in the serial port and tick it.<br>
+
4) For more directives, please check the Datasheet of ELET114A.<br>
 +
=='''Resources'''==
 +
[http://wiki.sunfounder.cc/images/b/b2/Sscom32E.zip Sscom32E][[File:ZIP.jpg]]<br>
  
Thus after inputting the '''AT+DNAME?''' In the serial port and clicking '''send''', the name of the Bluetooth module '''ELET_SPP_XXXXXX''' will be shown in the receiving end of the serial port. <br>
+
[http://wiki.sunfounder.cc/images/e/ed/BlueTooth.zip BlueTooth][[File:ZIP.jpg]]<br>
Then input '''AT+DNAME="RollmanMini_XXXXXX”''' (Just change ELET_SPP into RollmanMini) in the input port and send it. When there is an OK in the receiving end, it indicates that we have changed successfully. Input '''AT+DNAME?''' again and send it, we will see the changed name of the Bluetooth in the receiving end as shown below. <br>
+
  
[[File:ELET08.png]]<br><br>
+
[http://wiki.sunfounder.cc/images/f/f1/ELET114A_Datasheet_v1.0.pdf ELET114A_Datasheet] [[File:PDF.jpg]]<br>

Latest revision as of 08:18, 23 March 2017

Introduction

Ehasfd.png
The ELET114A Bluetooth module follows the BT2.1+EDR/3.0/4.0 Bluetooth profile and supports SPP, HID and so on. This module integrates the MCU and Bluetooth chip, thus boasts being high integrated, low consumption, and excellent Bluetooth radio frequency.

Features

Bluetooth Specification: V2.1+ EDR, BT3.0, BT4.0 (BLE)
Operating Frequency Band: 2.4 -2.48GHz unlicensed ISM band
Main Digital Interface: UART
RX Sensitivity: -88dBm
Operating Voltage: +5V 20mA
Operating Temperature: -30 ~ +85 ℃
Dimensions: 50 x 24 x 2mm

Pin Descriptions

VCC: Positive pole of the power source
GND: Ground
TXD: Serial interface, transmitting terminal
RXD: Serial interface, receiving terminal

Using SunFounder Uno

Step 1: Compile and upload the code before building the circuit.

/****************************************/
#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 8); // RX, TX  
// Connect HM10      Arduino Uno
//     TXD          Pin 8
//     RXD          Pin 7

void setup() {  
  Serial.begin(115200);
  // If the baudrate of the HM-10 module has been updated,
  // you may need to change 9600 by another value
  // Once you have found the correct baudrate,
  // you can update it using AT+BAUDx command 
  // e.g. AT+BAUD0 for 9600 bauds
  mySerial.begin(115200);
}

void loop() {  
  char c;
  if (Serial.available()) {
    c = Serial.read();
    mySerial.print(c);
  }
  if (mySerial.available()) {
    c = mySerial.read();
    Serial.print(c);    
  }
}
/****************************************/

Step 2: Connect the circuit.

Bluetooth 4.0 Uno Board
VCC 5V
GND GND
TXD Pin 8
RXD Pin 7

Bluetoothuno.png

Using Android

If you are using an Android phone, please follow the steps below:
Step 3: You need to download a Bluetooth 4.0 debugging assistant onto the mobile phone to connect it with the Bluetooth 4.0 module. We've provided the tool in Android. Just download BlueTooth.zip on your smart phone and decompress. Then you can see a file BlueTooth. Enable Bluetooth on your phone and install it.

213.png

Step 4: Open the installed app. It will directly go to the Bluetooth pairing interface. So first pair your phone and the module.

Bluetoothconnect.png

Step 5: After the pairing is done successfully, you'll be redirected back to the app homepage (Fig 1). Then tap Select Device at the top right corner. On the page, find the Bluetooth and hit it (Fig 2). Tap Connect. When Connect changes to Connected, it indicates that the pairing is good. At the same time the LED indicator on the module will change from blinking to constant lighting.

Select device.png

Step 6: Tap serial monitor in Arduino IDE, and type in “Hello!”, then you will receive it in the mobile phone. Similarly, SunFounder send by the phone will appear in the serial monitor.

Hello receive.png

Use iOS

If you are using an iPhone or MacBook, please follow the steps below (iPhone as an example):
Step 3: Go to the App store, search for the application – LightBlue and install.
Step 4: Click/Hit Settings -> Bluetooth, enable the Bluetooth and then open the LightBlue.

Lightblue.png

Step 5: If the Bluetooth is connected successfully, you will see ELET_BLE_XXXXXX as shown in Fig 4. Hit it to connect, then it redirects to the interface in Fig 5. Read and Write Page are separated.

3009AD.png

Step 6: Read the message
Tap 0xFFE2 to enter into the interface in Fig 6, tap Hex in the top right corner to set the character type.
Among the types (Fig 7), choose UTF-8 String.

0Xffe2.png

Hit Listen for notifications to read the value. Open Serial Monitor, select baud rate 115200, and send “Hello!”, then you will receive it in your iphone.
Serialmonitor.png

Step 7:Write the message
Tap 0xFFE3, and then tap Hex in the top right corner to set the character type.
Among the types (Fig 9), choose UTF-8 String. Hit Write New Value to write a message.

0xffe3.png

Then you can see the message sent from the phone in Serial Monitor.

Write12.png

Testing by AT Command

Step 1. Build the circuit.

Bluetooth Module FTDI
VCC VCC
GND GND
TXD TXD
RXD RXD

FTDI.png

Step 2. Set parameters.
Run the serial debugging tool sscom32. Set the parameters first.
1) Run Open Com to check the COM port. Select the corresponding COM port as shown below.

Open sscom.png

2) Select the correct baud rate. Here we select 115200bps as shown below.

Baudrate.png

3) Before sending the command, tick the SendNew checkbox, then input “AT+MAC?” below Data input. If the Bluetooth module works normally, it will return the module’s address as shown below.

Sendnew.png

4) For more directives, please check the Datasheet of ELET114A.

Resources

Sscom32EZIP.jpg

BlueToothZIP.jpg

ELET114A_Datasheet PDF.jpg