What is mean by Beacon?
In a general sense, a beacon refers to a visible or audible signal, typically used to attract attention, provide guidance, or convey information. Historically, beacons have been used in various contexts, such as maritime navigation, where lighthouses emit light signals to warn ships of hazards or to mark navigational points.
In the context of modern technology, a beacon often refers to a small wireless device equipped with Bluetooth/WiFi or other similar technology. These beacons emit signals that can be detected by nearby smartphones, tablets, or other devices. This technology enables proximity detection and location-based services, as mentioned earlier.
So, whether it's a physical light beacon guiding ships or a digital wireless beacon guiding mobile devices, the essence remains the same: providing a signal to convey information or aid in navigation or interaction.
BLE (Bluetooth Low Energy) beacon is a small wireless device that transmits signals using Bluetooth Low Energy technology. These signals are detectable by nearby Bluetooth-enabled devices, such as smartphones or tablets.
Applications :
- BLE beacons are commonly used for proximity detection and location-based services. They work by broadcasting a unique identifier, which can be picked up by mobile applications or other devices equipped with Bluetooth technology.
- BLE beacons have various applications, including indoor navigation, proximity marketing, asset tracking, and smart home automation. For example, in a retail setting, BLE beacons can be placed throughout a store to send targeted promotions or notifications to shoppers based on their proximity to certain products or areas.
- In an industrial setting, BLE beacons can be used to track the location of equipment or monitor the movement of goods within a warehouse.
Overall, BLE beacons provide a cost-effective and efficient way to enable location-aware services and applications in various contexts.
How to make wireless beacon as Data Collection Node -
In IoT Environmental monitoring applications such as smart home, we have to use different analog and digital sensors to collect data of various environmental parameters like temperature, humidity, pressure, Air quality etc. Now suppose a scenario where we want to collect temperature and humidity data from Kitchen. What we will require -
- We will require Temperature and humidity sensors (Analog/Digital), then
- We will require a microcontroller, which have capabilities of ADC and Data processing.
- Additionally if "main IoT hubcontroller" is at longer distance from this collection sensor node, we need wired/wireless connection for connecting to main hub.
- If distance is longer then deploying wired connection will become costly and complexity overhead.
Therefore, In such scenario's, we will require a device, a data collection/Sensor node which have features like - ADC, Computing power - MCU and Wireless data broadcasting capability.
What if all above features and capabilities come with single hardware. It will be cherry on the cake. Let me introduce you to the DFRobot's Fermion: BLE Sensor Beacon.
Fermion: BLE Sensor Beacon, is a wireless beacon that broadcasts sensor data via Bluetooth, with built-in 11-bit ADC acquisition and I2C write/read functionality, can be connected to digital or analogue sensors for data acquisition and broadcasting. Sensor data broadcasted by the beacon can be accessed within the beacon's broadcast range using mobile phones, ESP32 and other devices that support BLE reception.
- Fermion: BLE sensor beacons integrate low-power Bluetooth 5.3 technology with self-configurable data formats, such as iBeacon, Eddystone, user-defined, and more.
- The data format of the beacon broadcast, the content of the broadcast, the broadcast interval and so on can be configured through the graphical interface, without the need for any code programming to complete a Bluetooth beacon.
- After the configuration is completed, the device power supply is running as a Bluetooth beacon, which will automatically collect sensor data and broadcast to the outside world according to the configuration information.
Fermion: BLE Sensor Beacon is powered by IN100 InPlay's NanoBeacon SoC.
So, you can see the system block diagram of SoC IN100, it has all the peripherals and features which we are expecting in our 'Wireless IoT Data collection/Sensor Node'. Those are
Features :
Specifications of this module is as following
- Operation VoltageοΌ 1.1 ~3.6V DC
- Operation CurrentοΌ9.1~13.8mA @2.4GHz TX mode-1Mbps
- Standby CurrentοΌ0.625uA @Sleep with 32kHz RC, sleep timer
- Supported sensors: Digital/Analog/I2C sensors
- Input signals: digital/analogue, I2C
- Operating band: 2.4 GHz ISM
- Modulation: GFSK
- Transmit power: +5.0dBm
Which sensors can be connected -
- Analog, Digital and I2C.
- 6 configurable GPIOs
- two independent I2C interfaces to acquire I2C sensor data.
Pinout
Following is the pinout description for beacon module
How to configure Fermion: BLE Sensor Beacon module?
InPlay NanoBeacon Config toolis used to configure the Fermion: BLE Sensor Beacon module.
Setup for configuration of Fermion: BLE Sensor Beacon -
Hardware -
- Any Sensor - Analog/Digital/I2C
- Fermion: BLE Sensor Beacon Module
- 3.3V USB-TTL convertor x1
- Windows/Linux/Mac OS computer x1
- ESP32 or You can use Mobile App to check whether data is getting broadcasted
Software -
Recommended Mobile AppοΌNanoBeacon BLE Scanner(IOS/Android)
Beacon Config ToolοΌNanoBeaconConfigTool
***VERY IMPORTANT -
PLEASE refer DFRobot's WiKi page of Fermion: BLE Sensor Beacon for more detailed information.
This module can be programmed/Configured in two modes.
1. Run in RAM - Supported by analog sensors
2. Permanent "Burn/Program" - One time configuration
==>Mode 1 (Run in RAM) - can be used indefinitely. But the Beacon needs to be completely power off(VCC or coin cell) each time before the second "Run in RAM" test, otherwise the Beacon would not be connected normally. Similarly, If you remove the coin cell after programming, configuration saved in RAM get reset due to power failure. Hence, "Run in RAM" can be used for unlimited times before burning. But once burned, it will be permanent configuration for that module.
Only Non-I2C sensors (Analog/Digital Sensors) can be tested by "Run in RAM"
==>Mode2 is one time programming mode. Once the one sensor specific configuration is burned into module, it can not be configured again for different/other sensors.
I2C sensors do not support the "Run in RAM" testcan only be burned directly, it is recommended to directly use the sensor sample configuration file provided by DFRobot! To use an I2C sensor for which a profile is not provided, please check the Wiki to use it.
PLEASE refer DFRobot's WiKi pageof Fermion: BLE Sensor Beacon for more detailed information.
How to Check Broadcast of BLE Sensor Beacons ?
Once you configured BLE Sensor Beacon, you can use NanoBeacon BLE Scanner (IOS/Android) App for scanning the nearby BLE beacons. You will get output as following for (Smoke Sensor)
In next article, We are going to build one DIY project using this module. Which is about Smart Home - Monitoring System. For that, We have configured
Please refer following video to know about how We configured Fermion: BLE Sensor Beacon for those sensors to broadcast the sensor data via BLE.
How to useFireBeetle 2 ESP32-EtoGet Dataover BLE
Similar toNanoBeacon BLE Scanner Mobile App, we can also use ESP32 or any other MCU board that supports BLE receptionto access/receive the sensor data broadcasted by Fermion: BLE Sensor Beacon.
DFRobot's FireBeetle 2 ESP32-E is specially designed for IoT and feature rich development board -
- It supports WiFi and Bluetooth dual-mode communication
- Main Frequency: 240MHz
- SRAM: 520KB
- Flash: 32Mbit
- Bluetooth Protocol: Bluetooth v4.2 BR/EDR and BLE standard compliant.
Upload the following program(Given in Code Section below) for the ESP32. This program is modified from the BLE_Beacon_Scanner that comes with the ESP32 Core examples(see image of Arduino IDE below), and that code can be modified as needed. So, we have slightly modified the code according to our need.
Experiments with Sensors -
We tried 4 different types of sensors with BLE Sensor Beacon -
1. DFRobot's Analog Ambient Light Sensor
2. DFRobot's Analog Soil Moisture Sensor
3. DFRobot's Fermion : MEMS Smoke sensor
4. DFRobot's SHT40 Temperature and Humidity sensor
- First 3 are analog sensors and the last one SHT40 is I2C sensor.
- We interfaced all these sensors to separate BLE beacon. Circuit diagrams are shared below in Schematics section. as well as on GitHub Repo.
- Then as per instructions given in WiKi page of BLE Sensor Beacon, we configured BLE beacon data acquisition and broadcast parameters using NanoBeaconConfigTool.
- We checked for all Sensor beacons broadcast. By using Mobile AppοΌNanoBeacon BLE Scanner(IOS/Android)
- Then we also used FireBeetle 2 ESP32-Eto receive and check the broadcasted sensor data by all 4 beacons.
- All individual programs for receiving data from each individual BLE Sensor Beacon is given below In Source Codes Section.
- ***Just Remember to correct name of BLE Sensor beacon in code,
- It should be similar to what you given during configuration
- Additionally, for receiving and parsing all BLE Sensors beacons broadcasted data on same ESP32-E, we have also given all-in-one code. Which will give output as following
- All source code, Libraries and Documentation are shared below as well as on GitHub Repo.
Demo
In demo of this Tutorial you will see,
- brief introduction to Fermion : BLE Sensor Beacon module, Features, Specifications, Pinout, Configuration Tools, Circuit Diagrams.
- Detailed stepwise procedure to configure BLE beacon for Ambient light sensor.
- Then, for SHT40 I2C sensor how to load the pre-configured, cfg config files (Given by DFRobot)
- Then ESP32-E code for BLE reception and collecting Beacon broadcasted data to ESP32.
And so on. Lots of things are covered in following demo video.
DIY Project
In our another blog, We have also made one DIY project using this BLE sensor Beacon module.
You can check out its article on hackster here -
Smart Home using Fermion BLE Sensor Beacon Module
Tutorial DocumentationI will share all the documents, codes, schematics, etc. on GitHub.
Suggestions about this Tutorial/Project design, Circuits, code modifications, Optimization, Errors/Bugs findings and queries are most welcomed.Credits
Thank you Hackster, DFRobot and all other peoples, websites and entities who helped me (directly/indirectly) for creating this article.
Comments