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.
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
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- AD620 Instrumentation Amplifier Instructions for Use
- Say goodbye to quartz? One of the main characters in next week's TI live broadcast, CC2652RB, is a wireless MCU that does not require an external crystal oscillator
- How to calculate the input impedance of this full-bridge rectifier?
- Introduction to resistor selection experience
- Design of receiving circuit for radio remote control transmitter
- 【Portable Environmental Status Detector】Use of GPIO port
- How to Layout a Circuit Board for an Op Amp
- Research on Charging Method of Lead-acid Battery
- The main factors that can affect UWB indoor positioning
- MicroPython deepsleep mode