Based on AT89C52 and MQ

Photocoupler

A smoke alarm design based on AT89C52 microcontroller and MQ-2 semiconductor resistance smoke sensor is introduced. The smoke alarm has functions such as sound and light alarm, concentration display and serial communication with the host computer. The utility model has the advantages of simple structure, low price, stable performance and good practical value. This article refers to the address: http://

With the rapid development of society, fires have caused great harm to human production and life. Smoke alarms are used to monitor the concentration of smoke in the environment so that people can detect accidents early and take effective measures to avoid accidents and ensure the safety of industrial production and people's lives.

The smoke detection alarm consists of the following three parts: the smoke signal acquisition circuit, the analog-to-digital conversion circuit and the single-chip control circuit. Its system structure block diagram is shown in Figure 1. The smoke signal acquisition circuit consists of a smoke sensor and an analog amplifier circuit that converts the smoke signal into an analog electrical signal. The analog-to-digital conversion circuit converts the analog signal sent by the smoke detecting circuit into a digital signal and sends it to the single chip microcomputer. The single-chip computer filters the digital signal and compares it with the preset value. If it is greater than, the alarm circuit is activated to sound an alarm, and vice versa. To facilitate monitoring, instrument testers and users can visually observe the flammable smoke concentration values ​​in the environment and send the concentration values ​​to the display. In order to make the alarm device more perfect, a light flash alarm can be added on the basis of the sound alarm, and the changed light signal can attract the user's attention and make up for the limitation of the sound alarm in the noisy environment.

基于AT89C52和MQ0

This design uses the MQ-2 type smoke sensor, which is composed of a tin dioxide semiconductor gas sensing material and belongs to the surface ion type N type semiconductor. When at a temperature of 200 to 300 ° C, the tin dioxide adsorbs oxygen in the air to form an anion of oxygen, which reduces the density of electrons in the semiconductor, thereby increasing the resistance value. When in contact with smoke, if the barrier at the grain boundary is changed by the modulation of the smoke, a change in surface conductivity is caused. Use this to get information about the existence of this smoke.

The MQ-2 smoke sensor is exposed to the same kind of smoke under the best working conditions, and the characteristic of the resistance value Rs as a function of the gas concentration is called the sensitivity characteristic, which is represented by K. K = Rs / Ro, where Ro is the resistance value of the smoke sensor under clean air conditions, and Rs is the resistance value of the smoke sensor in a certain concentration of detection smoke. Although the values ​​of the sensitivity characteristics K of the devices will vary for different smokes, they all follow the same rule: logRs=mlogC+n

Where: m is the sensitivity of the device relative to changes in smoke concentration, also known as smoke separation energy, for smoke, m value is 1/2 to 1/3; C is the concentration of smoke detection. n is related to the detection of smoke, device materials, and varies with the temperature of the test and the presence or absence of sensitizer in the material.

The MQ-2 smoke sensor has six pins, two of which are resistance wires, and the remaining four pins are two input pins and two output pins. The middle two pins are signal output terminals, and the output is analog voltage, ranging from 0 to 1 V. The connection method is shown in Figure 2.

基于AT89C52和MQ1

The sensor requires two voltages to be applied: the heating voltage VH and the test voltage VC. Where VH is used to provide a specific operating temperature for the sensor. VC is used to determine the voltage across the load RL in series with the sensor.

The sensor output signal is generally weak, and needs to be amplified, filtered, and level-adjusted by the pre-circuit to meet the requirements of the input signal of the single-chip microcomputer.

The smoke sensor used in this system is of a resistive type, so only one reference resistor must be connected in series, and then sent to the ADC for acquisition through a similar amplifier circuit. The signal amplification circuit is shown in Figure 3.

基于AT89C52和MQ2

After the amplified signal passes through the address strobe, the ADC0809 chip is input from the IN0 port, and after the chip is initialized, a positive pulse of not less than 100 nm is started at the START end to perform analog-to-digital conversion. When the conversion is completed, the EOC terminal issues a completion signal (high level), and the data is sent to the P0 port of the microcontroller through the latch. ADC0809 and microcontroller interface circuit shown in Figure 4.

基于AT89C52和MQ3

The ADC0809 clock frequency is generally 500 kHz (requires clock frequency not higher than 640 kHz), the clock frequency of the microcontroller is 11.0592 MHz, then the clock frequency of the ALE pin is about 1.84 MHz, the frequency obtained by the D flip-flop twice divided by two. Almost 450 kHz, meeting the frequency requirements of the A/D converter.

When the smoke concentration is at a normal value, the P2.6 port is placed at a high level, and when the smoke concentration reaches or exceeds the warning value, the port is set to a low level, so that the transistor PNP is turned on. At this time, the sound and light alarm circuit is also fully turned on, and the sound and light alarm is started. Its circuit schematic is shown in Figure 5.

基于AT89C52和MQ4

基于AT89C52和MQ5

The smoke alarm designed in this paper has achieved the expected function through simulation. It is suitable for the detection of liquefied gas, butane, propane, methane, alcohol, hydrogen and smoke. It can be used for gas leakage monitoring in homes and factories. High, good stability, low price and simple circuit structure have good practical value.

Continuous Servo Motor

Kassel continuous Servo Motor is ideal for advanced equipment, with higher performance and more reliable R&D technology. For the new design, it is a technological innovation: as a general-purpose servo motor, the rotor is made of strong magnetic material; low-speed jitter is small. Small in size, resistant to high and low temperature, low noise and long service life. Waterproof and dustproof, high efficiency, high torque, optional brake.

Continuous Servo Motor,Continuous Servo,Continuous Rotation Servo,Continuous Rotation Servo Motor

Kassel Machinery (zhejiang) Co., Ltd. , https://www.kasselservo.com

Posted on