Complete Guide on Bluetooth Module

Complete Guide on Bluetooth Module
Qualtrics International

We live in a tangled world that’s for sure. But, lucky for us, the world would have been a whole lot more tangled if we were to always use cables in connecting devices for the communication of data between them. There are billions of IoT (Internet of things) connections in the world. Only so many cables could be buried in underground tunnels or passed overhead. The cost, economic and general maintenance would likely choke us if the tangled cables don’t get to us first. Thanks to Bluetooth technology and Bluetooth module (and some other not-as-cool folks like WIFI, 4G), through the use of Radio frequencies, devices can connect and perform cross-communication data exchange completely wirelessly.

What is a Bluetooth module?

Bluetooth module

Bluetooth BLE module is a technology that acts as an interface that aids the wireless Bluetooth Low energy connection of any two devices and establishes a protocol for the communication of data between the devices. Bluetooth low energy module’s mediated data communication range is usually an average of tens of meters and data is communicated in specified frequency bands.

There are various brands, types, models and classifications of Bluetooth modules. Bluetooth Modules’ diversity in application makes them one of the most widely-accepted Internet of things (IoT) connectivity protocols.

Some of the areas where Bluetooth modules can be applied include:

How can Bluetooth modules be used?

Bluetooth modules had a lot of applications and can be used in a variety of ways and applications. They can be used as light switch controllers, as they can be connected to Micro controllers to switch the light on or off. They can also have other uses and applications like:

Applications

IoT connections

  • Private home connections
  • Industrial processes maintenance
  • Security and sensors.

Personal recreational entertainment

  • In Bluetooth speakers
  • Headphones
  • Gaming consoles

Electrical devices and accessories

  • Televisions and radios
  • Computers
  • Mouse and keyboards

City maintenance and automation

  • Traffic lights automation
  • Accidents notification alarms
  • Automation of mains meters.

Hospitals and Health centers

  • Tracking and the quick dispatch of ambulances
  • Monitoring and tracking of drugs and pharmaceutical products
  • Mobile and smarter control of medical staff and resources.

Buildings Automation and Maintenance

  • Temperature, humidity and other buildings’ internal environmental conditions automation.
  • General maintenance of Buildings
  • Energy and Electricity automation

Vehicles

  • Stereo, and vehicles’ multimedia.
  • Tracking of vehicles.
  • Data communication between vehicles (mostly cars)

Industrial Manufacturing Processes

  • Tracking of manufacturing tools and parts
  • Taking inventory of equipment and resources
  • Sensors and alarms

Circuit Design

Circuit Design

  • Depending on the Bluetooth module’s classification, Bluetooth modules generally have a maximum communication range of about 100m. And, are therefore short-ranged.
  • The Circuit design determines the Bluetooth LE module’s range.
  • Low power Bluetooth modules consume a low amount of energy and power and are therefore ideal for single-battery powered devices or the communication of small data bundles between devices in various IoT connections.

The Bluetooth module circuit supports the 2.4GHz frequency band and has a wide range of applications.

  • An appropriate Micro controller can be used to integrate Bluetooth low energy into any system.

Some of the components of a Bluetooth’s module’s circuit are:

  • Bluetooth module’s motion and humidity sensors. (U2, MPU9250, U3, HDC1080 respectively)
  • BLE main Micro controller. (U1 CYBL10161)
  • A lithium-derived battery
  • Different MHz crystal oscillators.
  • Bypass-capacitors-equipped power pins.

Pin Definition

A typical Bluetooth module has 5-6 pins. Each of which performs different functions.

Examples of some Bluetooth module pins are:

Pin Definition

PinsFunctions
VCC5V is connected to the VCC pin.
GNDUsed for Grounding the module. You connect this pin to ground the module.
TXDWhile connected with the Micro controller’s Unit. TXD serially transmits the information received by the Bluetooth module, out through the TXD pin.
RXDThe serial data RXD receives is then transmitted through a wireless protocol by the Bluetooth module.
KEYUsed to switch between the Bluetooth module AT command and default modes. By setting the KEY pin to a specific value.
StateThe STATE Indicates The State Of Connectivity Of The Bluetooth Module (Whether It Is Paired Or Unpaired).

 

Mounting suggestion Cautions of Bluetooth modules

Mounting suggestion Cautions of Bluetooth modules

Follow to the letter the under-listed points––describing the above perfect diagrammatic representation/suggestion of Bluetooth module mounting.

  • While you’re mounting the Bluetooth module main board’s *1 area components, make sure to avoid placing metal components ––metal chassis and signal line–– in the areas shaded with blue (in the diagram above).
  • The Bluetooth module mainboard accommodates *1 space.
  • Routing is unaccommodated on the (*2 area). Avoid placing coppers on any of its layers.
  • For the (*3 area), if you use shorter than the 30mm recommended length of GND pattern length, your Bluetooth module is in danger of serious damage.
  • In your search for your Bluetooth module’s optimal range, extend the module’s antenna to stretch 3mm past the Module’s mainboard edge, or any ground plane edge. Though, for you to make use of Ground planes you usually need up to a 5mm module’s antenna extension.
  • You need to see to the proper Bluetooth module main board GND and module pins connection.
  • In maintaining this connection:
    • GND vias must be arranged very close to GND pads.
    • While flooding the un-utilized top layer PCB with copper, make sure to link the copper flood to the inner GND plane by intermittently fitting in GND vias.
    • In a situation where the under-module copper layer is flooded by the GND, immediately connect it to direct the flow to the inner GND plane through the use of GND vias.
  • Always check and double-check that your Bluetooth Module is not connected to the middle of the module’s mainboard. This can seriously compromise the module’s data communication range and performance.
  • In the Bluetooth module’s mainboard layout, take care to;
    • Limit the amount of signal line run below the module as often as you can.
    • Cut out the usage of a ground plane anywhere under the antenna.
    • If you’re experienced enough, carve out the under-antenna module’s mainboard part.

Bluetooth modules can also be mounted through:

Bluetooth modules can also be mounted through

Suggestions in placing Resins and non-metallic parts

Mounting suggestion Cautions of Bluetooth modules

Bluetooth Modules metal parts placement

  • In order not to affect the Module antenna’s tuning, you should place the metal parts at an optimal minimum distance (40mmtop/bottom, 30mm left/right) to the antenna.
  • With your host application, you have to intermittently estimate the corroding effect on the antenna performance of the metal parts installed close around the antenna. (It’s a given that the Metals will always corrode the antenna performance).
  • Installing metal parts any distance under 20mm from the antenna will significantly affect the Antenna’s communication efficiency.
  • On installation, gauge the effect of various factors (enclosure height, material types; metal, plastic) on the Bluetooth Module antenna’s range.

Introduction to Bluetooth Technology

Energy classification of Bluetooth

Bluetooth technology is classified into two major groups. Each of which is further split into sub-groups. The two primary Bluetooth technology classes are:

    • Classic Bluetooth technology
    • Low-energy Bluetooth technology (BLE)

The Classic Bluetooth technology vs ble

The Classic Bluetooth technology

The Classic Bluetooth technology wirelessly connects devices and provides a channel for high-data-rate communication. The quality of data communicated through the Classic Bluetooth technology is usually high but, its data transmission consumes a high amount of energy and power. It also doesn’t have as wide a range of applications as the Bluetooth low energy technology.

The Low energy Bluetooth technology

The BLE (Bluetooth low energy) technology is a technology that connects any two devices and supports data communications with low energy consumption. The range of BLE could peak at over 100m depending on the type of BLE technology. Though, the BLE transmission speed is considerably slower than the high-speed communication of the Classic Bluetooth technology.

BLE technology is also usually used in ultra-low-power BLE modules.

NB: Modern Devices such as phones, needs to be able to communicate with both Low energy and Classic Bluetooth technology. For this purpose, Bluetooth Smart and Bluetooth Smart Ready authentication flags are used.

Bluetooth Frequency and Frequency Bands

Bluetooth technology Frequency and Frequency Bands have the following features:

  • Bluetooth technology wireless connection data communication is short-ranged.
  • Has a 2.4GHz operating frequency band.
  • Classic Bluetooth technology has 79 frequency range channels. (With a 1MHz band interval)
  • Bluetooth technology has a 2.400 GHz to 2.4835 GHz frequency range
  • Has a +4 dBm and -90dBm common-average data communication rate and sensitivity.
  • The modulation coefficient in BLE (also known as Bluetooth 4.0) is 0.4-0.55 with 40 frequency channels and a 2MHz band interval.

Bluetooth Frequency and Frequency Bands

Frequency Hopping as a Bluetooth Technology Standard

The Frequency hopping feature of Bluetooth technology in a way is responsible for its short range. It helps Bluetooth transmission to:

  • Change channels (about 1,600 times per second) to avoid interference from other transmission signals in a specific frequency channel.
  • Seamlessly commence re-transmission after hopping to another channel.

Frequency Modulation

Bluetooth technology energy consumption and general design cost can be reduced by the change in the frequency modulation coefficient. As seen in the Low energy Bluetooth technology.

Have your product equipped with the Bluetooth function 

Here’s how you can have your product equipped with Bluetooth function:

  • After selecting the fitting and best wireless standard application for your product, be sure that Bluetooth technology really is the best wireless technology for your product.
  • Choose an appropriate Bluetooth module or the best Bluetooth chip for your product.
  • You can employ the service of an RF design expert if you can’t personally choose the testing equipment.
  • Install the Bluetooth module and configure it into your product.
  • Test and make sure the Module’s antenna is functioning properly.
  • Double-check for any errors or potential hazards waiting to happen before moving on to the pretest procedure (If any is found, go back and fix the error in the above steps 4 and 5).
  • Satisfy the Laboratory regulatory authority requirement by carrying out the pretest procedure of determining the electromagnetic radiation rate.
  • You will then need to present your test result (from step 7 above) to the wireless regulatory authority in your local region. (You might be charged up to $1,000 to 3,000 daily)
  • If you’re unable to obtain a certificate. (Go back to step 3 above).
  • If the certification was successful. Simply complete the integration of Bluetooth function and enjoy.

How do I choose a Bluetooth Module?

Bluetooth Modules are designed to only achieve optimal and full functionality when implanted into an appropriate Bluetooth system. The Bluetooth module’s application microprocessor and Bluetooth chip circuit hardware design, together with the specific parameters included by Bluetooth products’ developers, equip the Bluetooth-module-implanted products with useful speciation for a wonderful wireless Bluetooth experience.

This is why you need to choose the Bluetooth module that best suits your need as there are many different modules. Each with different features such as; transmission distance and rate, frequency channels, etc.  Here are what to consider while choosing a Bluetooth Module:

CONSIDERATIONSDESCRIPTION
Standard and ProtocolsAmong the numerous available Bluetooth standards the three regularly available in the market include:

The enhanced data rate (EDR), Latest low energy (LE) and the Basic Rate (BR).

You should know that these Bluetooth technologies––as the technology world in general––are constantly being improved upon. So keep in mind to also get the latest market-available versions. In addition, they all have specific features (pros and cons) therefore, when selecting a Bluetooth module, it’s advisable to consult an expert (If you’re not one) and determine the module with the Standard and Protocols that best suits your needs.

Note: The Bluetooth Module selected must also be able to support other standards/protocols aside from the manufacturer-embedded standard.

Frequency BandGenerally, in Bluetooth technology, the 79 total frequency channels at 1 MHz Band interval falls between 2.4 GHz and 2.4835 GHz frequency bands. Though, the Bluetooth 4.0 module employs the low-energy Bluetooth technology of low power consumption focus. Resulting in BLE having a 2MHz band interval and 40 frequency channels.

If your needs require you to combine the WIFI-Bluetooth function into a single module, choose a module that has the Wi-Fi frequency Band 802.11b/g/ functioning at Bluetooth’s 2.4GHz frequency band.

You might need to spend more on module design if you require a module equipped with an 802.11a/h/j/n/ac/p WIFI version because it can only be supported by a 5GHz frequency band.

 

Transmission DistanceBluetooth technology data transmission distance is usually short-ranged.

There are three main classifications of Bluetooth modules based on their communication distance in meters.

Class 1: 100 meters maximum distance

Class 2: 10 meters maximum distance

Class 3: 1-meter maximum transmission distance

So, select the Bluetooth module of the class that best suits your need. Although, certain factors also influence the Bluetooth modules transmission distance such as; Module antenna and battery, Material and condition of transmission etc.

Data communication operating Current and Voltage and output powerBluetooth module’s operating current and voltage is a significant determinant in Bluetooth modules’ battery lifespan, charging life Etc.

 

 

 

 

In Bluetooth technology, power is directly proportional to transmission range.

Power ClassificationMaximum Power (dBm)Power Control Requirement
120Compulsory
24Not Compulsory
30Not Compulsory

 

In addition to the above-listed power standards, the module you select must also be in conformation with your local government spectrum regulatory authority power requirements.

 

Micro-controllerThe Micro controller can be likened to the Bluetooth module’s brainbox. It controls and directs basically all the processes of a Bluetooth module including hardware optimization, data communication, data processing and more. Therefore, while choosing Bluetooth modules, take note of the; Price, power consumption, memory capacity, processing speed, and dimensions. And, select the module with the micro-controller parameters that best suit your need.
Operating systemSelecting Bluetooth modules that support multiple operating systems, such as Android, Mac, Linux, etc., allow you to use on different smart devices, optimize the Bluetooth module setup and configuration process.
Transmission rateDifferent Bluetooth technology and hence, Bluetooth module’s energy classification has different transmission rate.

BLE (Bluetooth low energy) is not optimal for high rate data communication because the technology design focus is on minimizing power consumption rate and a high data transmission rate is usually accompanied by large power consumption.

ModulationData Rate
Basic RateGFSK1 MB/s
Enhanced Data Rate
π/4-DQPSK

8DPSK

2 MB/s

3 MB/s

Low Energy  GFSK1 MB/s

 

Antennas and interfacesAntennas can be either fixed to the Bluetooth module chip or could be external. Chip-fixed antennas though, are more compact in size (*5* 2.5mm) and can be applied to a wider range of usage, in addition to the convenience it provides. Also, another classification of antennas is on the basis of their signal transfer direction.

Omnidirectional antenna: Transmits signals 360 degrees (in all directions) therefore, has more range.

Unidirectional/ directional antenna: Only transmit data in a specific direction.

Therefore, select the Bluetooth with the antenna speciation that best suits your need.

And, ensure the antenna and modules are properly certified by your local spectrum regulatory authority.

Optimal Operating Temperature.Bluetooth modules’ common and general optimal operating temperature is between the Ranges of -400C to 850C. Though, there are certain modules equipped with protective insulation and cooling systems which allows them to function optimally at extreme temperature ends.

The RF Performance Tests for Bluetooth Module

Arguably, the biggest mistake you could make as someone planning to integrate Bluetooth into your product––or any device–– will be to presume that, you purchasing ready-made Bluetooth modules automatically eliminates the need for an RF engineer. Even though recent years had seen Bluetooth Modules manufacturers carrying out very extensive RF tests on their Modules before releasing them for sale. These tests are, of course, carried out by RF experts.

Be that may, as there is no standard indication to determine which RF test has been done––or if any has been done––. So, you’d be wise to have a personal RF expert of your own. To carry out RF performance for Bluetooth module in all your Internet of things connections. RF performance tests help diagnose and inspects the connectivity, transmission quality and other important parameters of Bluetooth modules.

Some common RF performance Tests include Test for:

  • Modulation Characteristics
  • Carrier Frequency’s offset and Drift
  • In-Band Spurious Emissions
  • Bluetooth module’s output Power
  • Bandwidth size
  • Frequency Range
  • Module’s Power Density
  • Out-of-Band Spurious Emissions
  • Receiver Tests

Modulation characteristics

Modulation characteristics test uses the frequency deviation of special data pattern values (highest and average) to determine if the modal function of the Bluetooth’s Module transmitting signal is functioning properly. This is done by placing focus on the FSK modulation quality inspection.

Carrier frequencys offset and drift

Carrier frequency’s offset and drift test is carried out with either hopping, fixed or direct-mode transmitting frequency to determine the transmitting frequency stability by confirming if the transmitter’s transmitting signal carrier frequency is being controlled within the specified range.

In-band spurious emissions

In-band spurious emissions are conducted to determine if the Bluetooth transmitting frequency’s band hosted spectrum spurious signal is functioning in the range dictated by the standard.

Bluetooth modules output power

Bluetooth devices are classified, based on power limit into three groups. The output power test is simply to determine the peak of the Bluetooth Module’s power and also the average output power. To conduct the output power test. Note:

  • Fixed frequency must be set as the data communication mode.
  • For output power test, transmit PRBS signals.
  • The duration of the test signals should include the preamble and a burst.

Bandwidth test

The bandwidth test is also known as the 20 dB bandwidth test. It is a test to determine if the transmitting signals’ radiation frequency is lower than the peak value at 20 dB, therefore, making it to be not easily susceptible to interference and hence, in compliance with the standard requirement.

Frequency range

  • A frequency range test is performed to ascertain that the transmitting signal on the frequency band is maintained within the limit of a particular range.
  • The frequency Range test is conducted in two concurrent processes with the use of a fixed frequency.
  • The low band (2399 MHz to 2405 MHz) and high band (2475 MHz to 2485 MHz) spectral are both tested.
  • The range is then estimated from the Low and high bands frequencies (fL and fH respectively) with the formulae (fH-fL)

Power density test

The power density test determines if the Bluetooth module’s highest transmittable maximum output power falls within the standard requirement range.

Hardware

Bluetooth modules’ hardware, like the Hardware of the Bluetooth nrf5832 module, makes it a very flexible Bluetooth module that uses and consumes very low power. This BLE module has a size of not more than 10mm by 10mm, it is also one of the nrf52 modules and its hardware specifications are as follows:

  • It is a Nordic Semiconductor that uses the nRF52832 SoC solution (Nordic nRF52832 module)
  • Its Bluetooth range is 2Mbps, with CSA#2, Advertising Extensions
  • It has a 512kB Flash with 64kB RAM capabilities
  • It has a size and dimension of 10.0×10.0×2.0mm
  • Highly flexible multi-protocol module ideally suited for Bluetooth® Low Energy, Bluetooth® mesh, ANT+ and 2.4GHz ultra-low-power wireless applications.

Sample Hardware Installation

Bluetooth Module Hardware is easily set up. Here are few steps to follow in the Hardware Installation:

Circuit connection

  • If the Bluetooth module is manufactured with a voltage regulator equipped breakout board then, you can power the module from 3.6 to 6V.
  • The Data pins logic voltage level nevertheless, determines the optimal Receive Pin operating voltage (usually 3.3V).
  • Take precaution against burning the module by ensuring you connect the Arduino 5V output Transmit pin (TX) to the Module’s 3.3V output Receive pin (RX) with the line between them, through a voltage divider.
  • The Bluetooth Module’s 3.3V signal also makes it acceptable as a high logic that you can directly connect to the Arduino 5V T
  • The 5V Bluetooth module Arduino connection is finally completed.

Sample source code

During the installation process, it is necessary to establish a communication between the Arduino and some certain components and devices.

Here’s a simple source code that shows the communication between the Arduino board and a smartphone:

Sample source code

How this was achieved:

  • The LED target connection pin and smartphone data storage variable first needs to be defined.
  • In the setup section, with a 38400 baud rate (Module’s default baud rate) serial communication, set the LED pin low in order to define it as an output.
  • In the loop section, check for the availability of unread but readable serial port data with the available()function.
  • The above procedure (3) set any statement sent into the Bluetooth module as ‘true’
  • With the read()function, read the available data and transfer it into the ‘state’ variable.
  • Functions ‘0’ and println(), respectively, turns off the LED  and sends back the string “LED: OFF” to the smartphone through the serial port.
  • Re-execute the above two lines (commands) by resetting the “state” variable to 0. (Note: The “LED: ON” string will be sent to the smartphone if the received character is 1; and the LED will turn back on).
  • Upload the ready code by unplugging the RX and TX lines.

Advantages

  • Bluetooth and the use of Bluetooth devices will help to avoid interference from other devices which are wireless.
  • It has a wider and much better range than that of devices that use infrared technology.
  • Devices with Bluetooth capabilities and Bluetooth devices, in general, are very easily available and are not expensive.
  • The Bluetooth technology is widely used and adopted in many other devices for easy cross-communication between them.
  • Bluetooth can also be used to transfer documents and files in different formats.
  • It uses very low power.
  • The problem of line-of-sight that affects infrared technology is not applicable to Bluetooth. It can easily connect with other devices regardless of physical obstacles, as long as it is within its range.

How does it work?

Bluetooth technology and all Bluetooth devices connect and communicate with each other without the aid of wires or cables. It is a wireless connection that makes use of radio waves that are not able to travel a very long distance. Each Bluetooth device contains a chip that emits radio wave signals whenever it is switched on, and other Bluetooth devices can recognize it and connect to it to begin communication and transmission of data, files or others. The connection of several Bluetooth enabled devices forms what is referred to as a piconet and they all can communicate seamlessly provided that they are all within range. Usually, in a connection like this, one device––referred to as the master––controls all other devices connected to it, which are referred to as slaves.

Types of Bluetooth modules

BLE

BLE (Bluetooth low energy) is one of the BLE modules and is a new entry in the range of Bluetooth modules that are compatible with the Arduino board as a BLE Arduino module.

Bluetooth 5 Modules

The Bluetooth 5 modules include the Bluetooth 5.0 module, Bluetooth 5.1 module and Bluetooth 5.2 module and comprises of:

  • The nRF52810 module
  • The nRF52811 module
  • The nRF52832 module
  • The nRF52840 module
  • The nRF52833 module

Bluetooth 5 also serves as a support protocol for the following Tl Bluetooth modules:

cc2642B1 modules, cc2540 modules and cc2652 modules

The Bluetooth 5 module Arduino is also worthy of mention.

Bluetooth 4 module

This includes the Bluetooth 4.0 module, Bluetooth 4.1 module and Bluetooth 4.2 Module and these are a group of high performance and low energy modules and they comprise the BT 900 series, the BL600 series as well as the TiWI-UB1 and TiWI-UB2.

Bluetooth 2 and 3 module

These are only audio and data Bluetooth modules.

Major classifications of Bluetooth module

Class 1: Modules whose distance range is 100 meters and gives an output of 100mW

Class 2: Modules whose distance range is 10 meters and gives an output of 2.5mW

Class 3: Modules whose distance range is 10 centimeters and gives an output of 1mW

Operation modes of Bluetooth

  • Standby mode: This is the first state of the Bluetooth device whereby the device is switched on and is not yet connected. It usually scans to see if it can recognize and pick up any Bluetooth signals around.
  • Inquiry mode: In the process of scanning for signals, in the event that it picks up a recognizable signal, it then sends a signal and gives a list of available connections to be selected for connection. When one is selected, a message or prompt is sent to the device to accept or decline connection with the Bluetooth device.
  • Active mode: When the two devices have been connected, it is now in an active mode and listens for any transmissions.
  • Sniff mode: In this mode, the slave device listens for commands or instructions from the master device.
  • Hold mode
  • Park Mode: They are still connected to the owner, occasionally listening but not participating in traffic.

Bluetooth module interfacing with the Micro controller

In order for easy and seamless Bluetooth communication, a Bluetooth module is usually used with a Micro controller and the most common and widely used Micro controller used is the 8051 controller. First, you need to connect both the TX and the RX pins to their appropriate and respective connections.

After the appropriate connection, here is a small code to try and control LEDs with smartphones. The program will aim to do these things:

  • Initialize the UART communication in the 8051 controller
  • Send and receive information and data from the Bluetooth module

#include <reg51.h>

#include "UART_H_file.h" /* Include UART library */

sbit LED=P1^0;

void main()

{

char Data_in;

UART_Init();        /* Initialize UART */

P1 = 0; /* Clear port initially */

LED = 0; /* Initially LED turn OFF */

while(1)

{

Data_in = UART_RxChar();  /* Receive char serially */

if(Data_in == '1')

{

LED = 1;/* Turn ON LED */

UART_SendString("LED_ON");  /* Send status of LED*/

}

else if(Data_in == '2')

{

LED = 0;/* Turn OFF LED */

UART_SendString("LED_OFF");  /* Send status of LED*/

}

else

UART_SendString("Select proper option");

}

}

Cost of a Bluetooth module

Bluetooth module price like Bluetooth 5.0 modules varies greatly depending on module type, brand and other factors. In order to select the Bluetooth module which best works and is most affordable, here are some factors to consider which might also affect the price:

  • Power and power consumption: This is an important factor in Bluetooth modules as most people would generally want to purchase and make use of those which have the lowest power consumption.
  • Transmission range: The older Bluetooth modules have lower transmission but the newer ones are improved upon.
  • Suppliers: This is important because different suppliers offer different prices for the same item. Some vendors are known to generally offer lower prices than their competitors for the same product, so it would be good to keep that in mind and patronize those who have shown to consistently offer quality products for reduced prices.

Controlling Arduino with Bluetooth

An Arduino board can be controlled with Bluetooth and here is how to do so. First, you would need:

  • An Arduino board
  • A Bluetooth board
  • A computer or a smartphone with Bluetooth capabilities.

There are three parts of this, which are the android device (smartphone), a Bluetooth module transceiver and an Arduino, all of which are connected in a serial manner. The code which is to be sent to the Arduino is checked and followed according to the instructions and results in order to perform the required functions.

First, you need to properly connect the Arduino board to the Bluetooth module. Since there are not too many connections to be made, the connection between the Arduino and the Bluetooth module is relatively easy. The connection is as follows:

Arduino pins Bluetooth Pins

RX (Pin 0) TX

TX (Pin 1) RX

5V VCC

GND GND

 

After you are done with the connections, the next step is to upload the following code to Arduino using the Arduino IDE software.

char data = 0;                //Variable for storing received data

void setup()

{

Serial.begin(9600);         //Sets the data rate in bits per second (baud) for serial data transmission

pinMode(13, OUTPUT);        //Sets digital pin 13 as output pin

}

void loop()

{

if(Serial.available() > 0)  // Send data only when you receive data:

{

data = Serial.read();      //Read the incoming data and store it into variable data

Serial.print(data);        //Print Value inside data in Serial monitor

Serial.print("\n");        //New line

if(data == '1')            //Checks whether value of data is equal to 1

digitalWrite(13, HIGH);  //If value is 1 then LED turns ON

else if(data == '0')       //Checks whether value of data is equal to 0

digitalWrite(13, LOW);   //If value is 0 then LED turns OFF

}

}

Connecting the Smartphone to the Bluetooth Module and the Arduino

Then you would have to download an android application and pair your device with the Bluetooth module.

Then, you:

  • Turn ON the Bluetooth module by powering the Arduino.
  • Scan your smartphone for available devices.
  • Pair your smartphone with the module by entering the default password 1234 OR 0000.
  • Install the LED application on your Android device.
  • Open the target
  • Click on paired devices
  • Then select your Bluetooth module from the list available.
  • After you connect successfully, click the On and Off button to see if the LED switched on and Off.
  • Then, you can disconnect the Bluetooth module.

Communication between Arduino UNO and PC via Bluetooth

Using a PC or Laptop to control the Arduino through the aid of Bluetooth is very similar to using a mobile phone. At least the first stages are. To communicate with the Arduino with a PC via Bluetooth you:

  • Turn ON the Bluetooth module by powering the Arduino.
  • Scan your laptop/PC for available devices.
  • Pair your PC to the module by entering default password 1234 OR 0000.
  • On your PC check for the appearance of the entity “Standard Serial over Bluetooth link” at the Location; Device Manager, under Ports (COM & LPT).
  • Then, test-run for communication between the PC and Arduino via Bluetooth by turning the Bluetooth Module’s LED light On or Off.

How this was achieved

  • Enable the serial communication through the serial object you created from the included Serial library.
  • Define for the LED status, a specific String variable.
  • Kickoff the serial communication in the setup section that was set in the program’s window size.
  • Try a COM Port Number present in your PC’s manager.
  • You receiving any of the String “LED: OFF” or “LED ON” from the Arduino indicates a serial port buffering and thus, a new line formation.
  • In the loop section, check for the availability of unread but readable serial port data with the Serial. available() function.
  • With the read string until() function read the available data. (which is either “LED: OFF” or “LED: ON”)
  • Configure and customize the graphics (background color, size, etc.) and functions of the program with the constantly repeating main draw() function.
  • Sketch out the two buttons you need with the rect() function.
  • With the text() function, print the led status string and all other needed texts.
  • With the use of the first “if” statement, activate the functionality of the buttons and restrict the “TURN ON” button area in such a way that the Arduino receives the character ‘1’, concurrently turning on the LED at the press of the “TURN ON” button.
  • Configure the button to be highlighted any time it’s pressed.
  • Repeat the “TURN ON” processes for the “TURN OFF” button.
  • Click the Run button to activate the program.
  • The Bluetooth module’s LED lights flashing at 2-seconds intervals indicates a device is paired with the module.

Which module has the highest range?

module has the highest range

The Nordic nRF5232 module which is one of the Nordic Nrf52 modules, and Nordic Bluetooth module in general has a range of about 1120 meters -1140 meters among all the Bluetooth 5 modules and has the longest range for now. But in the future, as technology develops, there will undoubtedly be modules with a wider range.

Resetting Bluetooth module on connected apple devices

This is not a difficult process and can be done in less than five minutes. It also does not require advanced knowledge and any beginner can do it. This can be done in easy steps:

  • Enable the Bluetooth icon which is displayed on the menu bar
  • Click the launch icon, then click systems preferences and select Bluetooth
  • After that, move the mouse to the ‘show Bluetooth in menu’ and click on the checkbox
  • Press and hold the shift button, together with the option key and then click the Bluetooth symbol on the corner of the menu bar.
  • Locate the Debug submenu that appears and hover the mouse cursor over it.

If there is a problem with the connected Bluetooth device, you can completely reset the Bluetooth module from the debug menu. This will erase the Bluetooth configuration, reset the Bluetooth hardware, and disconnect any connected Bluetooth devices.

If you want to solve the problem of connecting to an Apple device, try the second menu.

Global Bluetooth modules market

The Bluetooth modules market is still growing and is worth over $800 million as recently as 2020 and is still expected to grow and reach over 1.2 billion dollars in the year 2026. The market is divided into different categories:

By modules

According to modules, the market can be divided into three namely;

  • The Bluetooth Low Energy (BLE) modules market provides low-power Bluetooth modules, ultra-low-power BLE modules, as well as smallest BLE modules.
  • The Dual-mode Bluetooth module market
  • Classic Bluetooth Modules market

By Region/Geographical location

The market is segmented according to regions into:

  • North America, which includes the USA and Canada
  • Europe which includes UK, Germany, France, Italy, Spain

The Asia Pacific, which includes China, India, Japan, South Korea

  • Latin America, which includes Brazil, Argentina, and Mexico
  • The Middle East and Africa consisting of countries in the Middle East and Africa.

Bluetooth mesh module

Bluetooth mesh module

Bluetooth mesh module is a kind of Bluetooth module that is more network-wise extensive than the BLE (Bluetooth Low Energy). Its technology enables communication through Bluetooth between a loT of inter-connected devices and is an upgrade upon former modules. It is designed in a way that it is extremely reliable and that data and information sent through it always gets to its intended destination without fail, compounded by its impressive security. Nordic offers a range of series like the nRF52 series, alongside development kits––such as the Bluetooth 5.1 development kit–– for the Bluetooth mesh module.

Bluetooth mesh can be used across a wide range of markets and is used in the Internet of Things which requires quite a large number of devices connected to communicate with one another. The Bluetooth mesh module also operates on Bluetooth Low Energy and can be improved upon and upgraded, depending on the type and size of available memory in the chip.

Some of the advantages of the Bluetooth mesh module include:

  • Solutions on an industrial and commercial level in building automation.
  • Inter-operability between devices as a result of its full-stack implementation, inter-operability tools and processes, as well as an approach specific for interoperability and communication.
  • A very well known, trusted and reliable technology that meets specific basic needs and offers significant value and capabilities to products.

If you are interested in building a Bluetooth mesh networking product, you need compatible hardware and software. Bluetooth mesh networks require an underlying Bluetooth LE 4.X or 5.0 stack, which supports GAP broadcaster and observer roles to notify and scan notification packets.

To use the Bluetooth Mesh Networking Protocol on Bluetooth LE, it is recommended to use the SDK from the Bluetooth Module Provider, which contains the Bluetooth Mesh Networking Protocol and the corresponding API.

The Bluetooth mesh module consists of the following layers:

  • Bearer layer: This layer defines an abstraction for the underlying BLE specification towards the upper These abstractions are called carriers and represent information carriers that are used to bring information into the network.
  • Network layer: This layer is responsible for relay and security between all levels.
  • Transport layer: This layer handles the breaking down and transportation of messages from one point or one device to the other
  • Access layer: It ensures that the messages get to their intended destinations and can be accessed.
  • Foundation model layer

In your quest to selecting your best Bluetooth modules, you can contact us to help you.

 

Written by ——
Share this post