Automatic BLE Communication with Multiple Sensors
IoT technology encompasses a network of physical devices embedded with sensors and connectivity capabilities, enabling seamless interactions. Bluetooth Low Energy (BLE) technology optimizes power efficiency for various applications like sensor data collection and health tracking. The ESP32 microcontroller is a versatile choice for IoT projects, facilitating information transmission from multiple sensors to a central component. The project aims to transmit data in a broadcast topology using hexadecimal protocols. Leveraging cloud and cellular communication, the setup involves BLE interactions, UART connections, and data formatting for efficient operations.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Automatic BLE Communication with Multiple External Sensors
IoT Technology The Internet of Things (IoT) refers to a network of physical devices, vehicles, appliances, and other objects that are embedded with sensors, software, and connectivity capabilities, enabling them to communicate and interact with each other and with humans
BLE - Bluetooth Low Energy BLE (Bluetooth Low Energy) is designed to provide many of the same features as traditional Bluetooth technology but with a focus on low power consumption. Compared to Bluetooth, BLE sacrifices some data transfer speed to achieve significantly lower power consumption, making it ideal for applications that require long battery life. BLE is not designed for transferring large files or streaming high-bandwidth data. Instead, it excels at transferring small amounts of data intermittently, making it suitable for applications such as sensor data collection, health and fitness tracking, proximity detection, and simple control commands. One of the key advantages of BLE is its ability to enable communication between small IoT devices with limited power capabilities, such as sensors and tags. These devices can operate on small batteries or even energy harvesting methods, allowing for long-lasting and efficient operation.
ESP32 The ESP32 is a popular microcontroller board that is widely used in the Internet of Things (IoT) and embedded systems projects. It is based on the ESP32 chip, which combines Wi-Fi and Bluetooth connectivity along with a powerful dual-core processor. After the research we have done we will notice that ESP32 is the best component among the components for our project, considering its dual-core which allows it to have a better performance level and execution time, and considering its low price. Although it also has disadvantages such as high power consumption but considering the goals of the project this feature is negligible compared to the rest. These are the two pins through which we will use the UART: 17 - TX (data transfer) 16 - RX (receiving information)
The project and goals: Information transmission in broadcast topology from multiple sensors located in the field within a certain radius into the ESP32 Master component. The Master receives the information and his role is to pass it on to the OriginIOT component on UART using a protocol that transmits raw information in hexadecimal form.
Cloud Cellular communication Sensor BLE communication ESP32 Master ESP32 UART3 Sensor OriginIOT sensors data in original form UART1 Debugger printing data by format (protocol) UART2 Company s protocol Sensor
black box Cloud Cellular communication Sensor BLE communication ESP32 Master ESP32 UART3 Sensor OriginIOT sensors data in original form UART1 Debugger printing data by format (protocol) UART2 Company s protocol Sensor
Sensor Tera Term BLE communication ESP32 Master ESP32 UART3 Sensor sensors data in original form UART1 Debugger printing data by format (protocol) Sensor
The project and goals: UART1 - his rule is to be used as a debugger for the ESP Master, by printing relevant information such as - name of the current function, printing the data with identifying characteristics of the component. UART3 - his rule is to transmit the original sensor's value in hexadecimal form. it transmitting in a protocol that we are building.
about the process: version 1.0: creating a generic Master that connects to only one slave, and fits any kind of sensor. we built 4 kinds of sensor-slave codes: LM35, MPU6050, BMP180, B103 (Joystick) version 2.0: the Master can connect to 2 Slaves, with UUIDs that we gave in advance, and transmit the data to the IoT. version 3.0: -creating a Scanning function that handles different cases such as lastDevice, characFromCloud,rssiRangeTaking -creating a Server class - h file and cpp file -creating an array that contains a few devices - for all the connected devices
Set up Functions Flow: If object num < MAX connections true false Stop scan scanning If found device Checking if the device was already connected: If so - go to the place, he was and make a connection. If not - increase the array by 1 and insert the device in the last place true false keep scan Loop () run on the array and for each existing object (connected = true) send it to the method: Read_value () if do connect true false Local print Marks the slave's first time in the read value function And the link to the data is created uart print to the iot
Process Summary: we made a generic base code architecture for data collecting from multiple sensors. We mostly focused on the algorithm of connecting sensors dynamically to the ESP Master by selected conditions and receiving the data during BLE. also, we made the TX from the ESP Master to the OriginIOT by UART.
future steps: -RX from cloud to ESP Master -transmitting data via I2C and other protocols -holding a table on RTC memory - the memory that can retain data even when the device is not powered on for configuration settings and system state