【Application Case】How to implement anti-lost device with Bluetooth BLE
[Copy link]
Overview
With the development of science and technology, more and more smart wearable devices appear in front of us, such as smart bracelets, smart glasses, smart anti-lost devices, etc. The anti-lost device can easily give reminders.
At present, there are several types of anti-lost devices:
- Bluetooth anti-lost device
- GPS anti-lost device
- RFID anti-lost device
- WIFI anti-lost device, etc.
This article mainly explains the Bluetooth anti-lost device.
Figure 1 Bluetooth anti-lost device connected to mobile phone
Smart Bluetooth anti-lost device
Introduction
The so-called SmartBluetooth anti-lost device is a device designed specifically for smartphones using Bluetooth technology. Its working principle is mainly to determine whether the item is still within your safe range by the change in distance . A connection is established between the phone and Bluetooth, and the connection status is automatically detected every 15 seconds .
It is mainly used to prevent the loss of valuables such as mobile phones, wallets, keys, luggage, etc. It can also be used to prevent children or pets from getting lost. Put the Bluetooth on the child, pet, or valuables. Once the Bluetooth is away from the mobile phone beyond a certain range, the mobile phone will sound an alarm.
Main structure
The solutions used vary, but they can be roughly classified into the following parts:
- Bluetooth 4.0 module
- antenna
- buzzer
- Switch, power supply, etc.
Currently, the most widely used and relatively mature products on the market generally adopt Bluetooth 4.0 technology , which has the advantages of low power consumption, two-way anti-loss, and automatic alarm.
Figure 3 The main structure of the Bluetooth anti-lost device
Bluetooth BLE to realize anti-lost device
The core principle of the Bluetooth anti-lost device is to estimate the distance based on the received wireless signal strength ( RSSI) of the Bluetooth device. The calculation formula is:
d is the calculated distance, RSSI is the signal strength,
A is the signal strength when the transmitter and receiver are 1 meter apart.
n is the environmental attenuation factor.
The values are different for different Bluetooth devices. The signal strength of the same device is different under different transmission powers. Moreover, for the same 1 meter, the environment also affects the signal strength. n is the environmental attenuation factor, which is naturally related to the environment. Therefore, under the exact transmission power, A and n are also empirical values for the same device. In addition, Bluetooth anti-lost devices are battery-based, so low power consumption is essential, and this is when BLE has its advantages.
In actual anti-lost products, there are generally the following functions :
1. Anti-lost function: The mobile phone can detect the strength of the wireless signal transmitted by the transmitter, and estimate a rough distance based on the signal strength. At the same time, it can actively request the transmitter to alarm. At the same time, the anti-lost device can also make the mobile phone alarm.
2. When the transmitting device finds that the link established with the mobile phone is disconnected (which means the distance has exceeded the connection range), it will automatically issue some form of warning.
3. Photo function: After setting up on the mobile phone, press the button on the anti-lost device to control the mobile phone to take photos.
4. Voice broadcast: APP can broadcast the current anti-lost device information when needed.
5. Remaining power query: You can get the remaining battery power of the anti-lost device through the current power button of the APP. If the remaining power is too low, the user can be reminded to replace the battery in time.
6. Sleep mode: After setting the sleep mode on the APP, the module stops sending wireless signals and enters a stopped working state, waiting for the user to wake up the anti-lost device again.
|