This project uses the wireless transmission module NRF905 to improve and reorganize isolated systems such as single infrared anti-theft alarm, gas (CO) leak detection alarm, and fire detection alarm. Through the control of the single-chip microcomputer, a comprehensive and all-round home security system is formed. This design is mainly divided into a residential area detection system and a community property monitoring system. In the design of the residential area detection system, the human infrared sensing module is used to detect whether someone breaks into the room without authorization, the carbon monoxide sensor is used to detect whether there is a combustible gas leak in the room, and the flame sensor is used to detect whether there is a flame in the room. The power module supplies power to the single-chip microcomputer and the wireless transmission module, and the wireless transmission module is used to send the collected data to the community property management system. In the design of the community property management system, the clock module is used to display the current time in real time, the LCD is used to display the basic information and alarm status of the community owners, the power module is used to supply power to the single-chip microcomputer and the wireless receiving module, the wireless receiving module is used to receive the data sent by the wireless transmission module, and the LED light and buzzer are used to automatically alarm when an abnormal situation occurs. The community property management personnel will quickly deal with it according to the specific situation.
The STC12C5410AD series MCU is a single clock/machine cycle MCU that can use a low-frequency crystal oscillator to significantly reduce electromagnetic interference (EMI). It is a new generation of 8051 MCU with high speed, low power consumption and super strong anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8~12 times faster, and the internal integrated MAX810 dedicated reset circuit. 4-channel PWM, 8-channel high-speed 10-bit A/D conversion, for motor control, strong interference occasions.
The STC12C5410AD microcontroller includes a central processing unit (CPU), program memory (Flash), data memory (SRAM), timer/counter, UART serial port, I/O interface, high-speed A/D conversion, SPI interface, PCA, watchdog, on-chip R/C oscillator, and external crystal oscillator circuit. It can be said that the STC12C5410AD microcontroller contains almost all the unit modules required for data acquisition and control, and can be called a system on chip (SOC), which can easily form a typical measurement and control system.
HC-SR501 is an automatic control module based on infrared technology. It adopts the LHI778 probe design imported from Germany. It has high sensitivity, strong reliability, and ultra-low voltage working mode. It is widely used in various automatic sensing electrical equipment, especially automatic control products powered by dry batteries. The sensing module adopts a dual-element probe. The window of the probe is rectangular. The dual elements (A and B) are located at the two ends of the longer direction. When the human body walks from left to right or from right to left, there is a difference in the time and distance of the infrared spectrum reaching the dual element. The larger the difference, the more sensitive the sensing.
When a person walks into its sensing range, the human infrared sensor outputs an analog signal. Since the signal is weak, it must be conditioned or amplified by an operational amplifier before being transmitted to the microcontroller to meet the A/D converter's requirements for input analog amplitude and polarity. After the LM339 comparator, when the output voltage is greater than 3.3V, it outputs a low level, and when the output voltage is less than 3.3V, it outputs a high level.
The flame sensor can detect infrared light with a wavelength of 700 nanometers to 1000 nanometers, with a detection angle of 60 degrees. The sensitivity is maximum when the infrared light wavelength is around 880 nanometers. The far-infrared flame probe converts the intensity change of external infrared light into the change of current, which is reflected as the change of value in the range of 0 to 255 through the A/D converter. The stronger the external infrared light, the smaller the value; otherwise, the larger the value.
In the flame sensor module, 1-AOUT is analog signal output, 2-DOUT is digital signal output, 3-GND is external ground, and 4-VCC is 5V working voltage. The DOUT digital signal output is directly connected to the microcontroller IO interface P2.7, and the microcontroller is used to detect high and low levels to detect whether there is a flame in the environment. When the infrared transmitting tube detects a flame, the signal indicator light turns on, and the module digital interface DOUT outputs a low level.
The gas-sensitive material used in the MQ-7 gas sensor is tin dioxide (SnO2) with low conductivity in clean air. The high and low temperature cycle detection method is used to detect carbon monoxide at low temperature (1.5V heating). The conductivity of the sensor increases with the increase of carbon monoxide gas concentration in the air, and the high temperature (5.0V heating) cleans the stray gas adsorbed at low temperature. A simple circuit can be used to convert the change in conductivity into an output signal corresponding to the gas concentration.
The packaged gas-sensitive element has 6 pins, 4 of which are used for signal output and 2 for providing heating current. The working voltage is 5V. Before use, the power supply should be preheated for at least 2 minutes. VCC is a 5V working voltage, DOUT is a digital switch output interface (0 and 1), AOUT is an analog output interface, GND is an external GND, and the digital output DOUT can be directly connected to the microcontroller. The microcontroller is used to detect high and low levels to detect the CO concentration in the environment. When there is no CO gas or the gas concentration does not exceed the set threshold, the digital interface DOUT outputs a high level. When the CO gas concentration exceeds the set threshold, the signal indicator light is on and the module digital interface DOUT outputs a low level.
NRF905 has four working modes, including two active RX/TX modes and two power saving modes, where the active modes include ShockBurst RX and ShockBurst TX. The working mode of NRF905 is set by the settings of TRX_CE, TX_EN, and PWR_UP.
In ShockBurstTM transceiver mode, the first-in-first-out stack area on the chip is used. Data is sent from the microcontroller at a low speed, but transmitted at a high speed. This can save energy as much as possible. Therefore, a low-speed microcontroller can also obtain a high RF data transmission rate. All high-speed signal processing related to the RF protocol is performed on the chip. This approach has three major advantages: maximum energy saving; low system cost (low-speed microprocessors can also perform high-speed RF transmission); short data stay time in the air and high anti-interference. ShockBurstTM technology also reduces the average operating current of the entire system. In ShockBurstTM transceiver mode, NRF905 automatically processes the header and CRC check code. When receiving data, the header and CRC check code are automatically removed. When sending data, the header and CRC check code are automatically added. When the sending process is completed, the DR pin notifies the microprocessor that the data transmission is completed.
Data detection program design: After the system is powered on, the system is initialized first, and then enters an infinite loop process. The sensor in the system detects whether there is an alarm to be sent. If not, it returns to continue to judge; if there is, the collected data is pre-processed into a level signal, and the household owner information stored in the CPU in advance is sent to the host through the RF chip NRF905, finally realizing the remote alarm function.
Data supervision program design: First, the system is initialized, the time module provides a precise time for the host system, and then NRF905 is in the state of receiving signals. When a signal is received, it means there is an alarm, and the alarm module and display module are started.
Wireless transmission (NRF905) subroutine design: The RF chip and the microcontroller are connected through SPI (serial peripheral interface) to form a wireless transmission module. Various sensors detect environmental parameters in real time. When the system starts working, the microcontroller and the RF chip are initialized, and the RF chip switches from idle mode to ShockBurst TX transmission mode.
When the RF chip detects a data request to be received, the RF chip switches from idle mode to ShockBurst RX receiving mode
Previous article:Production of flow meter based on 51 single chip microcomputer (process + program)
Next article:Design of multifunctional electronic password lock system based on single chip microcomputer
Recommended ReadingLatest update time:2024-11-15 11:24
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- 【GD32L233C-START Review】5. USB custom HID device lighting
- USB Type-C and USB Power Delivery Power Path Design Considerations
- xds510 simulator transfer
- TVS Tube
- C6000 timer application (I)
- How to detect whether two points in a circuit are short-circuited to each other?
- How to handle different tasks at the same time in the time slice polling method
- Simple voice-controlled light circuit schematic and PCB wiring method
- Looking for a chip that can be used with 485 and 232
- CC2540 beginners learning how to use buttons