System principle and system block diagram
This system mainly includes automatic telephone 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 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, which is manifested as the main loop in the software. When there is a ringing signal or a setting signal, it will interrupt to perform the corresponding operation. Here we need a sensor that is sensitive to human infrared radiation and anti-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 the interference of the environment. The function of the setting part is to store the number to be dialed when the alarm is triggered and set the owner's identity authentication password. For the simplicity of the system, an LCD screen is used for display.
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 the 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.
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.
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.
2 Software Flowchart and Dial-up Program
The flowchart of the automatic dial-up program is shown in Figure 4.
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:Design and simulation of direct spread spectrum communication terminal based on software radio
Next article:Design and simulation of direct spread spectrum communication terminal based on software radio
- Popular Resources
- Popular amplifiers
- 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
- TIOBE Index for July 2021
- MOS tube smokes directly
- How to solve the motor efficiency and temperature rise problems caused by motor controllers
- Getting Started with the MSP432P401R Clock
- Fudan Micro MCU product introduction and selection table
- Three-phase Vienna topology technology detailed introduction
- [TI millimeter wave radar evaluation] IWR1443BOOST unboxing test
- 1kHz, 0dB test signal
- [RISC-V MCU CH32V103 Review] -- Advancing Wiki -- Opening
- How is the precise measurement of the Wheatstone bridge demonstrated?