13-Alcohol concentration detection alarm system based on 51 single chip microcomputer

Publisher:闪耀星空Latest update time:2021-09-22 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Specific implementation functions

It consists of STC89C51 microcontroller + MQ-3 alcohol sensor + ADC0832 module + LCD1602 module + alarm module + power supply.


Specific functions:


1. LCD1602 displays alcohol concentration in real time;


2. You can press buttons to set the alarm value and realize sound and light alarm; three buttons: set button, plus button, minus button.


3. When the concentration does not exceed the threshold, the green light flashes; when it exceeds the threshold, the red light flashes and the buzzer alarms.

design background

In recent years, more and more people in my country have their own private cars, and traffic accidents caused by drunk driving have also occurred frequently. For this reason, my country has included drunk driving in the scope of criminal law, so it is necessary to design an intelligent instrument that can detect the alcohol content in the driver's body. This course design studies an air alcohol concentration monitor that mainly uses gas sensors and single-chip A/D converters to detect the alcohol concentration of the driver's exhaled gas and has sound and light alarm functions. It can detect the alcohol concentration value in the air environment, and can set different thresholds according to different environments, and sound and light alarms for thresholds that are exceeded to indicate hazards.


This topic is divided into two parts: hardware design and software design. The hardware part uses the MQ3 gas sensor to measure the alcohol concentration in the air and convert it into a voltage signal. After being converted into a digital signal by the A/D converter, it is transmitted to the single-chip microcomputer system. The single-chip microcomputer and its corresponding peripheral circuits process the signal to display the alcohol concentration value and the over-threshold sound and light alarm. The program adopts a modular design concept, and the functions of each subroutine are relatively independent, which is convenient for debugging and modification. The hardware circuit can be roughly divided into a single-chip microcomputer small system circuit, an A/D conversion circuit, an sound and light alarm circuit, an LCD liquid crystal display circuit, and a button circuit. The design and principle of each circuit will be introduced in detail in the hardware circuit design section.


Software and hardware design

The hardware of this system consists of a single-chip minimum system, an MQ-3 alcohol sensor, an ADC0832 module, an LCD1602 module, an alarm module, and a power supply, as shown in the figure.


When designing, we consider that the alcohol concentration is converted from non-electrical quantity to electrical quantity by the sensor, and the sensor outputs a voltage value of 0-5V and the voltage value is stable, with little external interference, etc. Therefore, the sensor output voltage value can be directly converted by the A/D converter to obtain data and sent to the microcontroller for processing. In addition, it is also necessary to connect to the LCD display, keyboard setting, alarm circuit, etc.

Schematic

The schematic diagram of this system was designed using Altium Designer19, as shown in the figure.

program

This design uses KEIL5 software to implement program design, as shown in the figure.

Simulation Implementation

This design uses protues8.7 software to implement simulation design, as shown in the figure.

Reference address:13-Alcohol concentration detection alarm system based on 51 single chip microcomputer

Previous article:14-Perpetual calendar alarm clock and temperature compensation based on 51 single chip microcomputer
Next article:12-Design of temperature control thermostat based on 51 single chip microcomputer

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号