Most engineers often face difficulty while dealing with the connectivity of their projects, 然而, a Bluetooth module can easily solve this problem. 所以, automation experts and IoT enthusiasts like to build their projects based around microcontrollers such as an Arduino or Raspberry Pi. 因此, these microcontrollers are unable to communicate with other devices unless we enable them with connectivity. 所以, this connectivity is often given to them through a Bluetooth module.
The Bluetooth modules are small in size. 因此, 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. 所以, 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. 因此, their names and respective functions are outlined below.
|3.||RX||Receive the serial data|
|4.||TX||Send the serial data|
This pin basically serves to provide the ground for the circuit. 所以, providing a ground is an essential concept in electronics engineering and without this, no electronic gadget can truly function. 因此, this pin is a crucial part of a BLE module.
We use this pin for supplying power to the BLE module. 所以, this serves as the pivotal point which allows the Bluetooth module to draw in the required energy. 因此, VCC is by far the most important pin in any Bluetooth module.
This pin primarily functions to receive any designated data from the specified network node or a certain nearby device. 所以, we use this pin to receive the desired instructions or information from other devices within a Bluetooth network or the very network itself. 因此, this pin establishes the basis for using the BLE module for IoT deployments.
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. 所以, 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
- It features nRF51822qfaa as an onboard chip. 然而, you may use nRF51822qfac as well if that is what you prefer.
- This Arduino Bluetooth module has a communication distance of around 30 米.
- 所以, it has a frequency range of 2.4 吉赫茲
- It has multiple compatible RAM capacities. 所以, you can opt for a RAM of 16kB, 32kB, or 256kB.
- 所以, it can flawlessly operate within the temperature range of 40℃~ 85℃
- It has a 3-axis linear accelerometer that depicts very high performance. 然而, it consumes very little power.
- 此外, this module has an onboard antenna.
- It has an RTC. 所以, it is able to act as a time counter.
- This module is highly secure and features encryption through AES HW.
- It has a QDEC feature. 所以, this module is readily deployable.
- It has an operating voltage of 2.0V ~ 3.6V for Internal LDO.
- For External LDO, it has an operating voltage of 1.8V~3.6V.
- You can program its output power within the range of -20 至 +4 分貝.
- 此外, it features a PPI that is independent of the CPU.
- It has an expansion pin header for all the inputs and outputs. 然而, P0.27 and P.026 are a special exception.
- This module features special digital interfaces for UART(CTS/RTS), SPI 主/從, and I2C.
- You can configure it with 8/9/10 位模數轉換器. 所以, it is completely compatible with the NRF24L series
2) MK02 nRF52832 and MK04 nRF52832 BLE Modules
- It has a multi-protocol transceiver that operates at 2.4 吉赫茲
- It has a low energy mode which allows it to have a Bluetooth sensitivity of -96 分貝.
- This Bluetooth audio module features a 64kB Ram and a 512kB Flash.
- There are over 30 I/O pins all of which are configurable.
- This WIFI Bluetooth module allows for AES HW encryption through EasyDMA.
- This BLE module features it’s very own temperature sensor.
- It has dimensions of 21×13.8×0.8毫米
- This low power Bluetooth module features up to five 32-bit timers. 所以, these timers come with their own counter mode.
- It has an NFC-A tag that significantly boosts the connectivity.
- This Bluetooth 4.0 module has a peak current of 5.3 mA in the TX pin.
- This Bluetooth low energy module features a peak current of 5.4 mA in the RX pin.
- The BLE module features its very own PPI.
- These have 12-bit and 200 ksps ADC – 8 channels that are configurable. 所以, you can also program their gain.
- It supplies voltage in the range of 3.6V to 1.7V
- This module has an interface that has a single pin antenna.
- It has a sensitivity of -95dBm in BLE mode.
- It has a sensitivity of -103dBm over the long-range.
- This Bluetooth 5.0 module features RSSI which has a resolution of 1dB.
- It has a RAM of 256kB and a Flash of 1MB.
- Its security is accelerated by HW.
- It has multiple 128-bit co-processors which include AAR, ECB, CCM, and AES.
- This BLE module features a USB2.0 controller.
- It has around 48 I/O pins.
- Its dimensions are 30.0×20.0x0.8mm.
- It has an internal oscillator of 64MHz which allows for fast wake-up.
- The Tx pin has +8dBm of power.
- It is compatible with nRF24L, nRF52, nRF24AP, and nRF24L series.
- You can program its output from -20dB to +8dBm.
- This offers a quite flexible power management system.
- It supplies voltage in the range of 5,5V to 1.7V
- 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. 所以, you can say that the primary purpose of a Bluetooth module is to instill connectivity in the microcontroller project. 因此, 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, 壓力, 濕度, 等等. 所以, once the sensors in our IoT project collect the data, we need them to send it to us. 以此目的, we use a BLE module which enables the microcontroller to effectively transmit the collected data.
One of the major reasons why we develop and deploy IoT projects through microcontrollers is that we are looking for automation. 所以, automation is the concept where routine tasks are performed automatically through the help of technology. 例如, sounding an alarm whenever there is a fire or emptying a gas container when the pressure is too high. 因此, automation is highly preferable in industrial IoT applications. 然而, we cannot achieve automation without leveraging the capabilities of a BLE module. 因此, 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. 然而, we can only achieve these with the help of a BLE module. 所以, a BLE module makes it possible for us to send relevant commands to the distant electronic objects. 因此, 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
The biggest application of a BLE module is in the field of robotics. 因此, we can control the movement and actions of a robot by using its Bluetooth capabilities. 以此目的, we use Arduino for building the robot and then integrate the Bluetooth module with it. 所以, we can then use a dedicated app to control the way the robot moves. 此外, we can also control what the robot does as long as we are within the Bluetooth range.
Every smart device is enabled with Bluetooth these days. And every device has a unique Bluetooth identifier. 所以, we can harness this capability for the purpose of security applications. 例如, we want to secure the entrance to a certain house. 以此目的, we will build a validator by using Arduino and a BLE module. 所以, we will then install it near the entrance gate. 所以, when a person tries to enter the house, the validator will scan the Bluetooth identifier of that person’s smartphone. 因此, if the identifier is recognized as an authorized person then he will be allowed to enter. 然而, 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. 所以, 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. 所以, we can attach beacons with an important inventory. And a central Bluetooth module will establish secure communication with each beacon. 所以, 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. 所以, 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. 所以, 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. 所以, 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. 所以, 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.
Connecting with RJ25
The BLE Module often has a gray or blue ID. 因此, 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 和 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, 因此, Arduino has its own special libraries. 所以, when you are using the BLE module then you should use the Makeblock-Library-master. 所以, 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. 因此, you can use those to optimize the performance of your code.