Effective Use Of a Bluetooth Module

Table of Contents
Effective Use Of a Bluetooth Module

Most engineers often face difficulty while dealing with the connectivity of their projects, however, a Bluetooth module can easily solve this problem. So, automation experts and IoT enthusiasts like to build their projects based around microcontrollers such as an Arduino or Raspberry Pi. Hence, these microcontrollers are unable to communicate with other devices unless we enable them with connectivity. So, this connectivity is often given to them through a Bluetooth module.

The Bluetooth modules are small in size. Hence, we can easily integrate it in our Arduino and other microcontroller projects. And as the name suggests, this module communicates with the devices around it by using the Bluetooth technology. So, it opens up a whole new range of possibilities from simple data transfer to the remote control.

Bluetooth Module Pinout and Pin Description

Typical Bluetooth modules consist of four basic pins. Hence, their names and respective functions are outlined below.

Serial No. Pin Function
1. GND Grounding
2. VCC Power Supply
3. RX Receive the serial data
4. TX Send the serial data

1) GND

This pin basically serves to provide the ground for the circuit. So, providing a ground is an essential concept in electronics engineering and without this, no electronic gadget can truly function. Hence, this pin is a crucial part of a BLE module.

2) VCC

We use this pin for supplying power to the BLE module. So, this serves as the pivotal point which allows the Bluetooth module to draw in the required energy. Hence, VCC is by far the most important pin in any Bluetooth module.

3) RX

This pin primarily functions to receive any designated data from the specified network node or a certain nearby device. So, we use this pin to receive the desired instructions or information from other devices within a Bluetooth network or the very network itself. Hence, this pin establishes the basis for using the BLE module for IoT deployments.

4) TX

This pin allows the Bluetooth modules to send the designated data over to the network or close by devices. The designated data is often the one that is collected by the sensors that are attached to the microcontrollers. So, this pin truly unlocks the potential of a Bluetooth module. Whenever we want to place a Bluetooth module in a remote location for data gathering purposes, we rely on this pin to regularly send us the collected data and processed information.

Bluetooth Module offered By MOKOSMART

1) HZX

Bluetooth 4.0 HZX NRF51822 Module

Technical Specifications

  1. It features nRF51822qfaa as an onboard chip. However, you may use nRF51822qfac as well if that is what you prefer.
  2. This Arduino Bluetooth module has a communication distance of around 30 meters.
  3. So, it has a frequency range of 2.4 GHz
  4. It has multiple compatible RAM capacities. So, you can opt for a RAM of 16kB, 32kB, or 256kB.
  5. So, it can flawlessly operate within the temperature range of 40℃~ 85℃
  6. It has a 3-axis linear accelerometer that depicts very high performance. However, it consumes very little power.
  7. Additionally, this module has an onboard antenna.
  8. It has an RTC. So, it is able to act as a time counter.
  9. This module is highly secure and features encryption through AES HW.
  10. It has a QDEC feature. So, this module is readily deployable.

Electrical Features

  1. It has an operating voltage of 2.0V ~ 3.6V for Internal LDO.
  2. For External LDO, it has an operating voltage of 1.8V~3.6V.
  3. You can program its output power within the range of -20 to +4 dBm.
  4. Additionally, it features a PPI that is independent of the CPU.
  5. It has an expansion pin header for all the inputs and outputs. However, P0.27 and P.026 are a special exception.
  6. This module features special digital interfaces for UART(CTS/RTS), SPI Master/Slave, and I2C.
  7. You can configure it with 8/9/10 bit ADC. So, it is completely compatible with the NRF24L series

 2) MK02 nRF52832 and MK04 nRF52832 BLE Modules

MK02 bluetooth moduleMK04

Technical Specifications

  1. It has a multi-protocol transceiver that operates at 2.4 GHz
  2. It has a low energy mode which allows it to have a Bluetooth sensitivity of -96 dBm.
  3. This Bluetooth audio module features a 64kB Ram and a 512kB Flash.
  4. There are over 30 I/O pins all of which are configurable.
  5. This WIFI Bluetooth module allows for AES HW encryption through EasyDMA.
  6. This BLE module features it’s very own temperature sensor.
  7. It has dimensions of 21×13.8×0.8mm
  8. This low power Bluetooth module features up to five 32-bit timers. So, these timers come with their own counter mode.
  9. It has an NFC-A tag that significantly boosts the connectivity.

Electrical Features

  1. This Bluetooth 4.0 module has a peak current of 5.3 mA in the TX pin.
  2. This Bluetooth low energy module features a peak current of 5.4 mA in the RX pin.
  3. The BLE module features its very own PPI.
  4. These have 12-bit and 200 ksps ADC – 8 channels that are configurable. So, you can also program their gain.
  5. It supplies voltage in the range of 3.6V to 1.7V
  6. This module has an interface that has a single pin antenna.

 3) MK10

MK10

Technical Specifications

  1. It has a sensitivity of -95dBm in BLE mode.
  2. It has a sensitivity of -103dBm over the long-range.
  3. This Bluetooth 5.0 module features RSSI which has a resolution of 1dB.
  4. It has a RAM of 256kB and a Flash of 1MB.
  5. Its security is accelerated by HW.
  6. It has multiple 128-bit co-processors which include AAR, ECB, CCM, and AES.
  7. This BLE module features a USB2.0 controller.
  8. It has around 48 I/O pins.
  9. Its dimensions are 30.0×20.0x0.8mm.
  10. It has an internal oscillator of 64MHz which allows for fast wake-up.

Electrical Features

  1. The Tx pin has +8dBm of power.
  2. It is compatible with nRF24L, nRF52, nRF24AP, and nRF24L series.
  3. You can program its output from -20dB to +8dBm.
  4. This offers a quite flexible power management system.
  5. It supplies voltage in the range of 5,5V to 1.7V
  6. For external components, it regulates the power supply from 3.3V to 1.8V.

The function of the Bluetooth Module

1) Inter-device connectivity

We primarily use a BLE module in our Arduino projects when we want our project to communicate with the devices around it. So, you can say that the primary purpose of a Bluetooth module is to instill connectivity in the microcontroller project. Hence, once our project is able to communicate with the devices around it, we can then proceed to further developments.

2) Data Collection and Transmission

One of the major reasons for deploying IoT projects is to collect data. Some examples are monitoring temperature, pressure, humidity, etc. So, once the sensors in our IoT project collect the data, we need them to send it to us. For this purpose, we use a BLE module which enables the microcontroller to effectively transmit the collected data.

3) Automation

One of the major reasons why we develop and deploy IoT projects through microcontrollers is that we are looking for automation. So, automation is the concept where routine tasks are performed automatically through the help of technology. For instance, sounding an alarm whenever there is a fire or emptying a gas container when the pressure is too high. Hence, automation is highly preferable in industrial IoT applications. However, we cannot achieve automation without leveraging the capabilities of a BLE module. Hence, a BLE module allows the microcontrollers to send instructions to relevant mechanical systems through the help of Bluetooth signals.

4) Remote Control

Controlling objects far away from us is known as a remote control. However, we can only achieve these with the help of a BLE module. Therefore, a BLE module makes it possible for us to send relevant commands to the distant electronic objects. Hence, this way we don’t have to put in much effort, and yet we are easily able to perform the same task from a distance.

Applications of Bluetooth Module

1) Robotics

The biggest application of a BLE module is in the field of robotics. Hence, we can control the movement and actions of a robot by using its Bluetooth capabilities. For this purpose, we use Arduino for building the robot and then integrate the Bluetooth module with it. So, we can then use a dedicated app to control the way the robot moves. Additionally, we can also control what the robot does as long as we are within the Bluetooth range.

2) Security

Every smart device is enabled with Bluetooth these days. And every device has a unique Bluetooth identifier. So, we can harness this capability for the purpose of security applications. For instance, we want to secure the entrance to a certain house. For this purpose, we will build a validator by using Arduino and a BLE module. So, we will then install it near the entrance gate. So, when a person tries to enter the house, the validator will scan the Bluetooth identifier of that person’s smartphone. Hence, if the identifier is recognized as an authorized person then he will be allowed to enter. However, if the identifier is unrecognized then the validator will alert the inhabitants of the house.

3) Asset Management and Tracking

Large warehouses and departmental stores often struggle with keeping track of their inventory. So, the major problems are that the size of the store is too large and manual labor is just not sufficient to search the whole store if an item goes missing. This is where a BLE module can come in handy. So, we can attach beacons with an important inventory. And a central Bluetooth module will establish secure communication with each beacon. So, we can use this link to triangulate the location of our inventory and easily find it if it is misplaced.

How to use a Bluetooth Module?

If you are acquainted with microcontrollers such as an Arduino then it is fairly simple. Therefore, the following is a step by step guide for using a Bluetooth module.

1) Connect the Bluetooth Module with Arduino

As we have discussed earlier, Bluetooth modules have four pins. So, you have to connect each of these pins to a respective component of the Arduino.

  • RX pin of the BLE module is connected with the RX pin of the Adriano
  • TX pin of the BLE module is connected with the TX pin of the Adriano
  • Connect a 5V battery to the VCC pin of the Bluetooth Module
  • GND pin of the BLE module is connected with the GND pin of the Adriano

2) Put the instructions in the form of a code

Arduino has its own language and IDE. So, any instructions that you want to give to the Bluetooth module, you must convert them in the form of an Arduino code.

3) Upload the instructions (Code) on the Arduino

Then you have to upload the code onto Arduino by using the dedicated USB port. So, now the Bluetooth module is active and ready to use.

4) Deployment of the Bluetooth Module

Now you can deploy the BLE module along with the Arduino to your chosen IoT application.

Wiring mode

Connecting with RJ25

The BLE Module often has a gray or blue ID. Hence, when we are using RJ25, we must connect the port with gray or blue ID on Makeblock Orion.

Connecting with Dupont wire

When we use the Dupont wire for establishing a connection between the Arduino board and the Bluetooth module then we have to connect the digital port 0 and 1 with the RX and TX pins.

Guide to programming

For feeding instructions into the Bluetooth module, we need to convert them into code by using the Arduino language. As we all know that every programming language has some dedicated libraries, hence, Arduino has its own special libraries. So, when you are using the BLE module then you should use the Makeblock-Library-master. So, we highly recommend that you should thoroughly test your code and how the Bluetooth module responds to it before actually deploying it. Arduino has an IDE of its own which has built-in debugging features. Hence, you can use those to optimize the performance of your code.

 

Written by ——
Nick He
Nick He
Nick, a seasoned project manager in our R&D department, brings a wealth of experience to MOKOSMART, having previously served as a project engineer at BYD. His expertise in R&D brings a well-rounded skill to his IoT project management. With a solid background spanning 6 years in project management and get certifications like PMP and CSPM-2, Nick excels in coordinating efforts across sales, engineering, testing, and marketing teams. The IoT device projects he has participated in include Beacons, LoRa devices, gateways, and smart plugs.
Nick He
Nick He
Nick, a seasoned project manager in our R&D department, brings a wealth of experience to MOKOSMART, having previously served as a project engineer at BYD. His expertise in R&D brings a well-rounded skill to his IoT project management. With a solid background spanning 6 years in project management and get certifications like PMP and CSPM-2, Nick excels in coordinating efforts across sales, engineering, testing, and marketing teams. The IoT device projects he has participated in include Beacons, LoRa devices, gateways, and smart plugs.
Share this post
Empower Your Connected Need with MOKOSmart loT Device Solutions!