1. Design of dormitory intelligent alarm system
Abstract: The system uses Lingyang's 16-bit single-chip SPCE061A as the main controller, and uses smoke sensors and human pyroelectric infrared sensors to sense smoke and human infrared signals respectively, and uses the single-chip microcomputer to make alarm actions. This system design is mainly to meet the needs of dormitory automatic alarm. The design goal is to realize voice alarm, time setting and display, light alarm and network alarm and other functions.
1 Design
1.1 Selection of main controller
The 16-bit single-chip microcomputer SPCE061A from Lingyang Company is used as the main controller. Since SPCE061A has built-in 2 KB SRAM and 32 KB memory FLASH, it can meet the requirements of this system for storing passwords and various data, and the CPU clock frequency is as high as 49.152 MHz, which can ensure the rapid response. The built-in voice module further improves the friendliness of the system's human-machine interface.
1.2 Selection of remote monitoring solutions
Wireless communication is adopted. Wireless transceiver module NRF2401 is used for wireless communication. This communication method is not affected by the length of the line, the position of the master and slave stations can be set arbitrarily, and the layout is relatively flexible.
1.3 Selection of Valuables Detection Solution
The width of the door frame is generally 1~2 m. It is more convenient to use a radio frequency transceiver module. The transmitter is attached to the valuables and the receiver is fixed at the door. When the valuables enter or leave, it can be recorded. The circuit structure of the transmitter and the receiver are relatively simple, small in size, and easy to carry.
1.4 System Overall Block Diagram
According to the above design ideas, the overall block diagram of the system is shown in Figure 1. The system consists of two major parts: the host computer and the slave computer. The host computer performs keyboard input, voice prompts, alarms, and records the entry and exit of people and items. The slave computer performs data collection work such as smoke detection, human infrared detection, valuables detection, and personnel entry and exit detection. The slave computer sends the detection signal to the host computer through the wireless transceiver module. The host computer processes the data and takes corresponding actions.
Figure 1 System overall block diagram
2 Theoretical analysis and calculation
2.1 Calculation of object detection circuit
Wireless transmission and reception are used to detect valuables. The communication distance is related to the transmission power, receiving sensitivity and working frequency. The communication frequency is 8MHz and the inductance is 47μH.
2.2 Control Scheme Analysis
According to the requirements of the topic, in order to realize remote monitoring of dormitory security, a master-two-slave mode is used for simulation, in which the master station can search the slave station, display whether the slave station is online in real time, and receive, process, display, record and alarm information, and the slave station obtains and sends information. The master station can display the slave station information in real time, and store the alarm and valuables in and out information in the FLASH of the master station, eliminating the need for external storage chips, which can be easily read and displayed. The human body sensor is used to determine the number of people in the dormitory by counting the number of people entering and leaving the dormitory, and the door is locked. The internal clock of the single-chip microcomputer is used as the time reference, and the time is set through the keyboard to record the alarm time. The voice module inside the single-chip microcomputer is used to realize voice alarm, which is intuitive and practical. This control scheme makes full use of the on-chip resources of the single-chip microcomputer, uses few external devices, and is simple and practical.
2.3 Smoke Detection Module
The MQ-2 smoke sensor is used, which has the advantages of wide detection range, high sensitivity, fast response recovery, excellent stability, long life, etc. It can realize smoke detection with a simple driving circuit. The smoke sensor circuit is shown in Figure 2. When no smoke signal is detected, the comparator outputs a low level; when the sensor detects a smoke signal, the comparator outputs a 5 V high level and the alarm is activated.
Figure 2 Smoke sensor structure
2.4 Human infrared detection module
The passive infrared human body sensor is composed of chip BISS0001, pyroelectric infrared sensor KBS-6B and a few external components. The addition of Fresnel lens greatly increases the detection range and satisfies the human body detection requirements. When someone passes through the pyroelectric sensor, the V. port of BISS0001 outputs a positive pulse and the alarm is activated. The circuit structure is shown in Figure 3.
Figure 3 Structure of pyroelectric infrared sensor
2.5 Personnel entry and exit detection design
Two infrared photoelectric switches are placed front and back to determine whether a person enters or leaves the dormitory by detecting the switch sequence. When someone leaves the dormitory, control signal 1 is set high first, and then control signal 2 is set high. By judging the timing, it can be concluded that the person has gone out. The same applies when someone enters. The detection circuit is shown in Figure 4.
Figure 4 Personnel entry and exit detection circuit diagram
2.6 Valuables Detection Design
In order to meet the requirements of valuables detection, a single tuned loop resonant amplifier is placed in the card, the card is hung on the valuables, the card sends out a radio frequency signal, when it enters or leaves the dormitory, it resonates with the secondary coil, the load voltage changes, and the entry and exit of the person can be recorded by detecting the load. The circuit is shown in Figure 5.
Figure 5 Valuables detection circuit diagram
3 Programming
After the master station system is powered on, it is initialized and requires a password. If the password is entered correctly, fire, valuables, keyboards, etc. can be monitored and corresponding processing can be made according to the monitoring situation. After the slave station is powered on and initialized, it starts to monitor the status of each sensor and send data. The program flow is shown in Figure 6.
Figure 6 Main program flow chart
4 Test Data and Analysis
4.1 Test Instrument
The test instruments and models are shown in Table 1.
4.2 Test methods and test data
The test method and test data are shown in Table 2 and Table 3.
The test data in Table 2 show that the smoke sensor performs well.
The test data shown in Table 3 meets the design requirements.
5 Conclusion
The system has been tested and has achieved various design requirements. The main innovations are the addition of a voice alarm function, which is more practical; the addition of a slave station search function, which can display the working status of each slave station in real time; the addition of an unattended function, which can immediately issue an alarm after detecting human activity during a specific period of time; and the addition of a clock function, which can realize time setting and display.
2. Intelligent street light simulation system based on single chip microcomputer control
1. Implement functions
(1) The branch controller has a clock function that can set and display the time for turning on and off lights, and control the entire branch to turn on and off lights on time.
(2) The branch controller should be able to automatically turn on and off the lights according to changes in ambient light.
(3) The branch controller should be able to automatically adjust the lighting status according to traffic conditions: when the movable object M (a positioning point is marked at the front of the object and the object's position is determined by the positioning point) reaches point S from left to right, light 1 turns on; when the object M reaches point B, light 1 turns off and light 2 turns on; if the object M moves from right to left, the lighting order is the opposite of the above.
(4) The branch controller can independently control the on and off time of each street lamp.
(5) When a street lamp fails (the light does not come on), the branch controller should send out an audible and visual alarm signal and display the address number of the faulty street lamp.
2. Solution Design
This design is mainly based on the STC89C52 single-chip microcomputer. Among them, the branch controller module controls unit controller 1 and unit controller 2 through the single-chip microcomputer, and completes the display and sound and light alarm parts. The light sensor is used to sense the brightness of natural light, and the sensing result is sent to the branch controller, thereby controlling the working status of LED1 and LED2. The unit controller 1 module controls the change process of the movable object M from S to B and then to the direction street light. For example, when the movable object M reaches S, the infrared detects the position of the movable object M and sends a signal to the unit controller 1. While the branch controller is allowed to work, the unit controller 1 turns on the relay, and the relay turns on the power-controlled constant current source, thereby realizing automatic adjustment of the lighting state.
Figure 1 Block diagram of analog circuit control system
2.1 Constant current source solution demonstration
The power regulation of the power supply is realized by program-controlled current shunting. The transformer converts the 220V AC into DC, and the power supply passes through the rectifier bridge to the 7809 chip to obtain a +9V voltage to obtain a constant current source, which is then converted into a corresponding constant current source by the 7805 chip. The power obtained is adjustable at 1W. Its advantages are simple circuits and easy construction. The disadvantages are unreliable and unstable performance. Its composition is shown in Figure 2 below.
Figure 2 Constant current source circuit diagram
2.2 System Software Design
This simulated street light control system uses the branch controller as the core, and compiles software programs to complete the clock function, display the time of turning on the light, and control the branch lights to turn on and off on time. It can also automatically turn on and off the lights according to the changes in ambient light. The branch controller can control the on and off time of each street light. It can also send out sound and light alarms when a street light fails. The main process is shown in Figure 3.
Figure 3 Main program flow chart
S10, S11, S12, S13, S14, S15, S16 in the block diagram are buttons 10, 11, 12, 13, 14, 15, 16 (the button schematic diagram can be found in Appendix 4). S10 and S11 control mode 1, S12 controls mode 2, S13 controls mode 3S, and 14 controls mode 4; S15 controls LED1, and S16 controls LED2.
3 Conclusion
This paper designs a simulated street light control system, which includes 1 branch controller and 2 unit controllers. Both the branch controller and the unit controller of this system use STC89S52 single chip microcomputer.
The specific functions completed by the system include: the branch controller has a clock function, can automatically turn on and off the lights according to the changes in the brightness of the environment, can automatically adjust the lighting status according to the traffic conditions, can independently control the on and off time of the street lights, can alarm for street light failures, and has made a self-made LED constant current drive power supply in the unit controller, and can automatically or manually adjust the output power of the constant current power supply. The branch controller decides whether to turn the street light on or off according to the brightness of the environment; the unit controller will detect the fault of the street light in real time, and if there is a fault, it will promptly feedback the information to the branch controller, and the branch controller will start the alarm; at the same time, the unit controller can also control the output power of the LED constant current source to adjust the brightness of the street light. This function can be further expanded to adjust the brightness of the street light according to the brightness of the environment to save power.
Previous article:Homemade AVR MCU Unlocker
Next article:Digital Clock Designed with Single-Chip Microcomputer AT89C51
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Submit your work --- Childish posture reminder
- EEWORLD University Hall----Live Replay: TI takes you to experience the interconnected and efficient smart home solution
- Array sorting problem
- Robust Design of I2C Serial EEPROM Application System.pdf
- Original 100KWh Solar Photovoltaic Off-Grid Battery Management System
- What are some good ways to reverse check silk screen printing? Welcome to chat and share your experience
- Upgrade the embedded RISC-V compiler
- [HC32F460 Development Board Review] 02. Build the development environment, create a project, and implement the LED flashing function
- Wi-Fi&BLE SoC NANO main control board (WBRU) development board XANWE has not been evaluated yet 02--Understand the product features
- Use MSP430 to connect RTC module (DS2321) to make a digital clock