1、 Project overview

1.1 INTRODUCTION

A healthy life is inseparable from fresh air. We use AVR MCU to design an air detector to measure air quality anytime and anywhere.

1.2 project background / motivation

Now air pollution is becoming more and more serious. Every citizen should have the right to supervise the pollution of factories and enterprises to protect our environment. We want to design a wireless air detector equipped with gas sensor to detect Co, dust and other components, monitor our pollution sources (of course, it can also be used as an indoor air detector) and make our home better and better.

2、 Demand analysis

2.1 functional requirements

Wireless transceiver, analog-to-digital conversion, LCD display, buzzer alarm.

2.2 performance requirements

The gas detector needs real-time data acquisition and real-time display, and the main frequency shall not be low. Considering other unknown factors (such as strong external interference leading to multiple transmission), one display needs 100 clock cycles. For 12m main frequency, the one display time is only milliseconds, and the real-time performance can be met; In addition, our model is only 2 ~ 4 data inputs, and 512 bytes of memory is enough; Peripherals need LCD, led, keyboard, wireless transceiver module, serial port and other external equipment.

3、 Scheme design

3.1 system function realization principle (text introduction is required in addition to pictures)

Design of air detector based on AVR single chip microcomputer

The small remote control helicopter is equipped with a gas detector to detect the gas and return to the single chip microcomputer for processing. You can press the key to display the gas content value. If a gas exceeds the standard, the corresponding LED light is on and the buzzer rings.

3.2 hardware platform selection and resource allocation

Gas sensors (2 ~ 4) collect the content of external polluted gas in time-sharing, a / D conversion and time-sharing transmission to AVR single chip microcomputer for processing, and then transmit it through wireless transmitting module, receive it by wireless receiving module, and send it to another AVR single chip microcomputer for processing and displaying the gas content. If the gas content exceeds the standard, the buzzer rings and the corresponding LED flashes.

3.3 system software architecture

3.4 system software process (text introduction is required in addition to pictures)

Design of air detector based on AVR single chip microcomputer

As shown in the figure above, the program starts to initialize. The single chip microcomputer on the remote control helicopter starts to collect time-sharing, then a \ D conversion, time-sharing transmission to the AVR single chip microcomputer for processing and storage, coding and sending to another single chip microcomputer for error detection. If there is an error, Send a retransmission signal and retransmit it again. If there is no error, send a confirmation signal, The transmission register is cleared, new data is loaded again, and waiting for transmission.

After receiving, it is sent to AVR single chip microcomputer for processing and LCD display. If a gas exceeds the standard, the LED light of the corresponding gas is on and the buzzer rings.

3.5 expected results of the system

It can detect the polluted gas with a wide range. It can not only detect the pollution of the external environment, but also detect the indoor gas condition, so as to avoid accidents such as gas poisoning.

The gas detector device can carry out gas measurement in real time, and can pause or refresh the display data as needed.

Source: eefocus

Leave a Reply

Your email address will not be published. Required fields are marked *