principle and system block diagram
This system mainly includes telephone automatic off-hook and on-hook circuits, DTMF signal transceiver circuits, voice prompt circuits, alarm circuits, keyboard display circuits, human signal detection circuits, encoding circuits, wireless transmission circuits, and single-chip microcomputer control circuits as the main core. The system structure block diagram is shown in Figure 1. We set the alarm part as the main working part of this system, that is, real-time monitoring of the safety situation in the room. It is manifested as the main loop in the software. When there is a ringing signal or a set signal, it will interrupt to perform the corresponding operation. Here we need a sensor that is sensitive to human infrared radiation and resistant to interference (such as small animals, etc.). For this reason, we use a passive pyroelectric infrared detector and cover its radiation surface with a special Fresnel filter to significantly control environmental interference. The function of the setting part is to store the number to be dialed when an alarm is triggered and set the owner's identity authentication password. For the simplicity of the system, an LCD screen is used for display.
Figure 1 System structure block diagram
When the infrared human body detection circuit detects human intrusion, the encoding circuit encodes the address of the detection probe, and sends the address of the probe that detects human intrusion to the wireless receiving circuit through the wireless transmitting circuit. After decoding by the CPU, the LED displays the alarm address, and at the same time, an audible and visual alarm is issued or a pre-set phone number is called to the director to alarm.
Signal detection circuit
The signal detection circuit is mainly composed of the pyroelectric infrared detection probe SD02 and the BISS0001 signal processing circuit.
The signal detection circuit is shown in Figure 2. The pyroelectric infrared sensor composed of a filter lens and an impedance matching field effect tube detects infrared radiation from the human body in a non-contact manner and converts it into an electrical signal. After the pre-amplification of the operational amplifier N1 in BISS0001 and the second-stage amplification of the operational amplifier N2, the DC potential is raised to the built-in voltage Um and sent to the bidirectional amplitude detector composed of comparators N4 and N5 to detect the effective trigger signal Us. Since the built-in voltage UH≈0.7UDD and UL≈0.3UDD, when UDD=5V, the noise interference of ±1V can be effectively suppressed. N3 is a conditional comparator. When the input voltage Uc is less than the built-in voltage UR (≈0.2UDD), N3 outputs a low level to block Us from being delivered to the next level. When Uc>UR, N3 outputs a high level to open the AND gate N7. At this time, if the leading edge of the trigger signal Us arrives, the delay timer can be started, and Uo output is a high level. The selection of the comparator's domain value is very important. If the domain value is too low, it is easy to report a false alarm, and if it is too high, the sensitivity is low.
Figure 2 Signal detection circuit
In the timing cycle Tx, the output terminal 2 of BISS0001 is high, then the transistor VT1 is saturated and turned on, and its collector is low, sending this signal to the encoding and wireless transmission circuit composed of the single-chip microcomputer and the wireless transmission circuit, and connecting it to the P0.0 port of the single-chip microcomputer used for encoding. The single-chip microcomputer encodes the probe and transmits it wirelessly; at the end of Tx, BISS0001 enters the blocking cycle Ti, its output terminal becomes low level, the transistor is cut off, and its collector is high level. Pin 1 (A terminal) of BISS0001 is connected to the power supply, so that the signal detection circuit is in repeated triggering. The Tx timing interval can be determined by the resistor and capacitor connected to pins 3 and 4 of BISS0001. The elevation angle of the signal detection probe can be adjusted within the range of 120°, and the actual detection distance can be adjusted by changing the elevation angle. We can adjust it through actual tests, or adjust the adjustable resistor RP in the signal detection circuit to adjust the detection distance of the probe. The detection distance of this design circuit is 30m.
Coding circuit and wireless transceiver module
The coding circuit and wireless transmission circuit are composed of a single-chip microcomputer and a transceiver integrated chip nRF401. The circuit has few peripheral components and a simple circuit.
This design uses the nRF401 wireless data transmission chip newly launched by Nordic Company of Norway, which integrates transmission and reception. It is a real single-chip UHF wireless transceiver chip designed for the 433MHz ISM frequency band and adopts FSK modulation and demodulation technology. The transmission distance can reach 3000m when a high-gain antenna is used.
The coding and wireless transceiver circuit is shown in Figure 3. The PWR_UP of the RF chip is controlled through the P2.0 port of AT89C51. When it is "1", it means entering the normal working mode, and when it is "0", it means entering the standby mode; P2.2 is connected to the CS of the RF chip to control the transmission and reception frequency. When it is "1", it means the working frequency is 434.32MHz. When it is "0", it means the working frequency is 433.92MHz. P2.1 controls the TXEN terminal of the RF chip, so that "1" indicates entering the transmit mode, and "0" indicates entering the receive mode.
Figure 3 Interface between wireless transmitter and receiver circuit
MT8880 and AT89C51 and voice circuit
The DTMF signal transmission/reception circuit uses the MT8880 chip, a dedicated integrated circuit launched by MITEL for processing DTNF signals. It not only has the automatic dialing function of receiving and sending DTMF signals, but also can detect signal tones such as dial tone, ringback tone and busy tone on the telephone trunk line. It is suitable for interfacing with a single-chip microcomputer, and the peripheral circuit is simple.
There are 5 registers inside the MT8880, namely the receiving data register, the sending data register, the transceiver control registers CRA and CRB, and the transceiver status register. In this design, only the sending data register, the transceiver control registers CRA and CRB are used to send DTMF signals to realize the automatic dialing function. The data in the sending data register determines the frequency of the dual audio signal to be sent, so data can only be written to the sending data register. The two transceiver control registers occupy the same address, so whether to operate CRB is determined by the value of the register selection bit in CRA.
ISDl420 voice chip adopts direct analog storage technology, and the recording and playback sound quality is excellent, and there is a certain reverberation effect; its peripheral components are simple, and only simple resistors and capacitors are needed to form a simple recording and playback circuit; no backup power supply is required, the information storage time is long, and no special programmer and voice developer are required; it has a strong address selection ability, and the memory can be divided into 160 segments for management, forming a minimum recording and playback time of 125ms. In this design, because four segments of alarm prompt voice are required, each segment of voice is set to 5s when designing the voice segmentation method, and its starting address is 00000000B, 00101000B, 01010000B, and 01111000B respectively.
The data ports A3, A4, A5, and A6 of ISD1402 are connected to the PB0, PB1, PB2, and PB3 ports of the microcontroller port expansion chip 8255 respectively. A0, A1, A2, and A7 are grounded. PLAYL is connected to the PB5 pin of 8255. SP couples the voice signal through capacitor C14 and sends it to the telephone interface circuit. When the switch SB1 is pressed, the recording indicator LED lights up and starts recording at the same time. When there is an alarm, the microcontroller controls the DTMF signal sending/receiving circuit to automatically dial a phone call. After the call is connected, the microcontroller sends the instructions for which recording to play and the playback instructions to ISD1420 according to the signals sent by different detectors. ISD1420 sends the voice signal to the telephone interface circuit. After waiting for the playback to be completed, the microcontroller sends a hang-up command and the alarm is completed.
The D0~D3 ports of MT8880 are connected to the PA0~PA3 ports of 8255 respectively, CLK2 is connected to the PA4 port, R/W is connected to the PA5 port, RSO is connected to the PA6 port, CS is connected to the PA7 port, and IRQ is connected to the T0 port of the main control circuit processor 89C51 to record the number of various pulses. The signal from the voice circuit is sent to the telephone line through R44. Relay K is used to control the on-hook and off-hook operation. The B pole of the transistor is connected to the P1.2 port of the main control circuit processor 89C51. When P1.2 is "1", V2 is turned on, relay K is closed, and the phone is connected. When P1.2 is "0", V2 is turned off and the phone is on-hook.
The P0 port of the main control circuit processor 89C51 is connected to the D0~D7 ports of 8255 and the D0~D7 ports of 74HC373 respectively, the Q0 and Q1 of 74HC373 are connected to the A0 and A1 of 8255 respectively, the P2.5, P2.6 and P2.7 of 89C51 are connected to the A, B and C ports of 74HC138 respectively, and the YO of 74HC138 is connected to the CS terminal of 8255.
Software Design
1 Signal Tone Recognition Method
After the system detects the alarm signal, it simulates picking up the phone. In order to identify whether the telephone system is in a dialable state after simulating picking up the phone, whether the phone is connected after dialing the number, and whether the other party picks up the phone to answer the call, the system must identify the signal tone. In order to identify the signal tone, the characteristics of various signal tones must be known. The characteristics of various signal tones are as follows.
● Dial tone: 450±25Hz continuous buzzer.
● Busy tone: 450 ±25Hz buzzer with 0.35s off and 0.35s on, with a tone segment period of 0.7s.
● Ringback tone: 450±25Hz buzzer with 4s off and 1s on, with a tone segment period of 5s.
These telephone signals are all analog signals, but the microcontroller cannot recognize analog signals, so the analog signals must be converted into pulse signals first, and then recognized based on the number of pulses in the pulse signal. The formula for calculating the number of pulses of these telephone audio signals is N=tm/T. Among them, N is the number of pulses per tone segment period; T is the audio period of the telephone audio signal, in seconds; tm is the conduction time of the signal tone segment period, in seconds.
In actual use, it is mainly necessary to identify dial tone, busy tone and ringback tone. Analysis of the characteristics of these three signals shows that the number of pulses is different within a certain counting time. In this design, 2s counting is used to determine the dial tone, and 2.8s (i.e. 4 busy tone cycles) is used to determine whether it is a busy tone. Then 1s is used as a counting unit, and the accumulated pulse number after five counts is used to determine whether the other party answers the call. If yes, the corresponding alarm prompt voice is played; otherwise, 1s is counted again, and then the number of pulses in the last 5s is calculated to determine again whether the other party picks up the phone. Repeat this process. If no one answers the call after the waiting time has expired, the phone is hung up. Due to interference and some other factors, it is inevitable that there will be misjudgments and missed alarms. Therefore, if at least one of all pre-set calls is dialed, it is dialed only once. If all are dialed or no one answers, all pre-stored calls are redialed, so that the probability of missed alarms is very low and can be ignored.
2 Software Flowchart and Dial-up Program
The flowchart of the automatic dial-up program is shown in Figure 4.
Figure 4 Dialing subroutine flow chart
3 Points to note during programming
First, the DTMF generator of MT8880 is the main body of the sending part. It generates all 16 standard dual-tone signals with low distortion and high precision. These frequencies are generated by the frequency division of the 3.579545MHz crystal oscillator. The circuit consists of a digital frequency synthesizer, a row/column programmable divider, and a switched capacitor D/A converter. The row and column single-tone sine waves are mixed and filtered to generate dual-tone signals. The encoded data is written into the MT8880 sending register through the DTMF codec table to generate separate flow and fhigh. Once the encoding is wrong, the dialing will fail. Therefore, be very careful during the programming process.
Secondly, after picking up the phone, you should delay for a period of time before judging the off-hook tone. Because this system uses a mechanical relay to achieve automatic off-hook, the response time of the relay should be considered. Finally, after
dialing a phone number, you cannot dial the next phone number immediately. The shortest effective time of hanging up should be guaranteed to ensure that the previous phone number has been hung up, otherwise there will be no dial tone when dialing the next phone number.
Conclusion
The system uses software to implement encoding and decoding, and the transmission method uses bidirectional transmission. If an alarm occurs, a data string is sent to the host, which consists of the following parts: 4-bit address code, 8-bit data code, 1 start bit, and 1 parity bit. After receiving the data, the host first checks it. If the data is wrong, it requires the previous data to be resent until it is correct. After receiving the correct data information, the next task is to check the address code. If the address code is the same as the address set by the host, it indicates that the data may be sent from a device outside the system. No decoding is performed. Data with the same address as the host setting is received for decoding.
Previous article:Geotechnical Engineering Stress Monitoring Based on Sensor Network and GPRS Network
Next article:Coal mine roof pressure monitoring system based on wireless sensor network
- Popular Resources
- Popular amplifiers
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Collection of popular MCU data downloads
- DC Motor Control Circuit Collection
- [Me and Yatli] + First acquaintance
- TI's new automotive linear LED driver TPS92613-Q1 with enhanced heat dissipation
- Do you need to persist?
- What are the common reasons for LED errors?
- Need help choosing safer lithium batteries?
- STM32H743IIT6 core board schematic diagram
- C8051F full series routine code
- TI Blog - Tips for Debugging Audio Amplifiers