Gas Concentration Detection and Alarm System Based on 51 Microcontroller (Proteus Simulation + Program + Design Report + Schematic + Explanation Video)
Simulation software: Proteus 7.8 and above
Program Compiler: Keil 4/Keil 5
Programming Language: C
Design Number: S0096
Main Functions:



The gas concentration detection and alarm system based on the 51 microcontroller uses LCD1602 to display the gas alarm value and the detected gas concentration value.
2. The gas alarm value can be adjusted by pressing a button.
3. When the gas concentration is below the alarm value, the green working indicator light is on. When the gas concentration exceeds the threshold, the buzzer alarms, the ventilation system works, and the red working indicator light is on.
4. The ADC0832 is used to collect the voltage change simulated by the sliding potentiometer as the gas sensor.
It should be noted that the simulated 51 microcontroller chip is compatible; AT89C51 and AT89C52 are specific models of the 51 microcontroller, and the core is the same. In the same schematic, regardless of whether it is STC or AT, the pin functions are the same, the program is compatible, and the chip can be replaced with STC89C52/STC89C51/AT89C52/AT89C51 and other 51 microcontroller chips.

Download Link:



[Tencent Document] S0096 Cloud Disk Link
https://docs.qq.com/doc/DS2V1S2F3b0xiSkNw
The following are the display images of this design data:
Explanation Video:



The explanation video includes simulation operation explanation and code explanation.
Simulation Explanation:



Open the simulation project, double-click the microcontroller in Proteus, select the hex file path, and then start the simulation. After starting the simulation, the LCD1602 displays the current gas concentration, the measured gas concentration is 320ppm, and the alarm value is 400ppm, with the green working indicator light on.

By clicking on the sliding potentiometer’s resistance value, you can adjust the voltage value to simulate the change in gas concentration.

If the detection value exceeds the upper limit of 400ppm, the buzzer alarms, the fan starts ventilation, and the red working indicator light is on.

Program Code



Use Keil4 or Keil5 to compile, the code has comments, and you can understand the meaning of the code in conjunction with the video.

Design Report



7960-word design report, including hardware design, software design, software and hardware block diagram, debugging, conclusion, etc.

With the in-depth development of modern industrial production and scientific research, gas, as an efficient and clean energy carrier and an important chemical raw material, has been widely used in many fields. Especially in the coal energy industry, petrochemical, metallurgy, electronic semiconductor manufacturing, and laboratory environments, the demand for gas is increasing day by day. However, the physical and chemical properties of gas determine that it has a high flammability and explosiveness under certain concentration conditions. Once leaked and reaches a certain concentration ratio, it is easy to cause fire or even explosion accidents. These accidents can not only lead to significant property losses but also threaten the safety and health of personnel.
Therefore, it is crucial to establish an accurate and efficient gas concentration monitoring and early warning system to ensure that the gas in the working environment remains within a safe threshold. This course design is aimed at this practical demand, proposing to use the classic 51 series microcontroller as the control core, combined with the powerful Proteus simulation software for system development and verification. By integrating hardware circuit design and embedded programming technology, we will design a gas alarm system that can detect gas concentration in real-time and accurately and has intelligent early warning functions.
Schematic Diagram



The schematic diagram is drawn using AD and can be used for physical reference. Simulation is different from physical objects, and inexperienced users should not easily attempt physical implementations.

The differences between Proteus simulation and physical products:
1. Operating Environment: Proteus simulation runs on a computer, while the physical product runs on a hardware circuit board.
2. Debugging Method: In Proteus simulation, you can easily perform step-by-step debugging and observe variable changes, while in the physical product, you need to debug through a debugger or serial output.
3. Circuit Connection Method: In Proteus simulation, you can modify circuit connections through software settings, while in the physical product, you need to modify through hardware circuit boards and connecting wires.
4. Operating Speed: Proteus simulation usually runs faster than physical products because simulation is based on computer operation, while physical products have to consider physical limitations and device response times.
5. Function Implementation: In Proteus simulation, you can implement different functions through software settings, while in the physical product, you need to implement according to circuit design and device performance.
Design Data Content List & Download Links



Data design includes simulation, program code, explanation video, functional requirements, design report, software and hardware design block diagrams, etc.
0. Common usage issues and solutions – must read!!!!
1. Program
2. Proteus simulation
3. Functional requirements
4. Software and hardware flowcharts
5. Project proposal
6. Design report
7. Schematic diagram
8. Explanation video
Altium Designer installation and cracking
KEIL + Proteus microcontroller simulation design tutorial
KEIL installation and cracking
MQ-7.pdf
Proteus component search
Proteus installation
Proteus simple usage tutorial
Microcontroller learning materials
Related data sheets
Defense skills
Common descriptions for design reports
Double-click to open and find the Jia Sheng microcontroller 51 STM32 microcontroller course graduation design.url

Method 1: Copy to browser to open
Data download link:
https://docs.qq.com/doc/DS2V1S2F3b0xiSkNw
More resources click the link below:
https://docs.qq.com/sheet/DS0xIa0llTmtNakRW
Method 2: Long press to scan the code



Official WeChat Account
Jia Sheng Microcontroller
Website|www.eemcu.cn

