- Home >> Technical Service >> Bluetooth
Bluetooth infrared alarm device
Design of alarm device based on bluetooth and infrared sensor
Bluetooth technology is a short-distance wireless technology standard that supports devices. In the era of rapid development of Internet of Things technology, mature BLE (Bluetooth low energy) wireless networks have become the protagonists of Internet of Things technology, mainly used in short-distance environments. Data exchange between different devices. This paper uses Bluetooth 4.0BLE combined with PIR human body infrared sensor to design a dangerous location alarm device. The device is composed of a master machine and two slave machines. The slave machine is installed in a dangerous position. It detects whether someone has reached the dangerous position through the human body infrared sensing module. After detection, it generates dangerous information and sends it to the master machine. After receiving the dangerous information, the master machine passes Broadcast voice information to alarm, and then clear the alarm through the key circuit. Through the design, development and experiment of this device, the wireless communication technology based on bluetooth can be learned and practiced.
1. Analysis of Bluetooth protocol
The Bluetooth protocol is a series of communication standards, and Bluetooth devices need to communicate with each other according to this standard. The specific architecture of the Bluetooth protocol mainly includes the Bluetooth host, host controller, link manager, audio module, baseband and link controller, and radio frequency. Among them, the Bluetooth host is also divided into three parts: application program, host control interface and high-level protocol. The specific implementation form of the protocol is the protocol stack. The BLE protocol stack integrates the protocols defined by each layer and realizes it in the form of a function library, which realizes functional processing and is convenient for users to call. Different manufacturers develop their own protocol stacks according to the performance of their own products, and open part of the application layer API (Application Programming Interface) to users for direct calling by users. BLE involves multidisciplinary knowledge such as electronics, communication, and circuits. For beginners, it is difficult to develop using the BLE protocol stack. You can try the following ideas: It simplifies the development of a BLE wireless network without in-depth research on complex The BLE protocol stack starts directly from the application layer and is developed using C language programs; the second pair of data acquisition in Bluetooth-L E low-power Bluetooth only needs to develop sensor functions and read the sensor functions at the application layer. ; The third is to time the data collection cycle, and the timing time is to wake up the BLE work, which can achieve energy-saving processing.
2. Design of alarm device system based on bluetooth and infrared sensor
2.1 System hardware design
This device can be installed in the family, such as balconies, bay windows, doorways and other places that parents think are more dangerous. When children reach these dangerous places, a warning message will be sent to remind the children that the location is dangerous, and at the same time remind the parents that the children have arrived. In dangerous places, children can be avoided, and this device can also be used for people with limited mobility. The design of the system hardware circuit is mainly based on the application of three low-power Bluetooth radio frequency modules developed based on the CC2540 chip, one of which is used as the host, and the other two are used as slaves to form a miniature BLE wireless network. Its main function is to power on the system. After the LCD screen shows that the pairing is successful, the slave machine receives the effective signal of the infrared sensor of the human body and sends it to the host machine. , through the key control circuit to stop the voice playback and release the alarm. Among them, the self-check button circuit is used to detect whether the host is working normally, and whether the alarm is normal. This circuit can also be expanded to add a low-battery indicator circuit to monitor the power of the three Bluetooth modules. When the power is detected to be too low, the indicator will flash or the buzzer will sound an alarm to ensure the normal use of the device.
The model of the human body infrared sensing module used in this device is HC-SR501, which is an automatic control product based on infrared technology. This module has low power consumption, small size, high sensitivity and strong reliability. Used in automatic control products and automatic induction electrical equipment. At the same time, in order to increase the sensing angle range, this module is covered with a circular lens, so that the four sides of the probe can be sensed, and the sensing intensity and sensing range on the left and right sides are larger than the up and down directions. The sensing time and sensing range of the module can be adjusted manually. The specific adjustment methods are as follows: ①Increase the sensing distance: turn the distance potentiometer clockwise to increase the sensing distance, and the distance can be increased to about 7 meters; ②Reduce the sensing distance: turn the distance potentiometer counterclockwise to decrease The sensing distance can be reduced to about 3 meters; ③ lengthen the sensing delay time: turn the delay potentiometer clockwise to lengthen the sensing delay time, which can be extended to about 300S; ④ shorten the sensing delay time: Rotate the delay potentiometer counterclockwise to shorten the induction delay time, which can be shortened to about 0.5S. When in use, the sensor module takes about one minute to initialize after power on. During the initialization process, the module will output 0-3 times at intervals. After initialization, it enters the standby state. If the infrared sensor module senses a person after standby, it will A high level signal will be output, otherwise, a low level signal will be output.
2.2 System software design
The system software of this device is developed based on TI's BLE protocol stack. The BLE protocol stack includes the basic functions stipulated by the BLE protocol. These functions are implemented in the form of functions. In order to facilitate the management of these function sets, the BLE protocol stack is called It is OSAL (Operating System Abstraction Layer). The design of the whole system software is divided into two parts, the host computer and the slave computer.
(1) Host: Start slave discovery after the system initialization is complete, and set periodic connection status detection, and reconnect if the connection status of the slave device is found to be interrupted. When the host receives the alarm message from the slave, it will alarm until the slave sends an alarm clear message or the host presses a button to clear the message.
(2) Slave: The system initialization is completed and a connection is established with the host. If it receives an alarm signal triggered by an infrared sensor, it will send an alarm message to the host and cooperate with the host to complete the recovery after the link is interrupted. To send data from the slave to the host, it needs to call the GATT_Notification function, which will call the function in the protocol stack that is related to the hardware, and finally send the data through the antenna.
Summarize
BLE low energy bluetooth technology has been widely used in many industries. The alarm device based on bluetooth and infrared sensor designed in this paper can be used as a safety guard for children and the elderly. It can be used in families and enterprises middle. With the development and continuous improvement of technology, BLE low energy Bluetooth technology will make our way of life and work more intelligent.
The above are the design details of the alarm device based on Bluetooth and infrared sensors introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
- TOP