The role of single chip microcomputer in vehicle alcohol detection system

Publisher:HuanleLatest update time:2011-08-25 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Nowadays, the harm of drunk driving is obvious to society, and the national government has also promulgated relevant punishment regulations to prohibit these behaviors, such as revoking the driver's license for six months, deducting points, imposing fines, etc.

At present, almost all countries use breathalyzers to conduct on-site tests on drivers to determine whether the driver being tested has been drinking. There are many types of police alcohol testers on the market. With the development of technology, the functions are becoming more and more powerful and the sensitivity is getting higher and higher. It can effectively assist traffic police in spot-checking whether drivers have been drinking. However, due to the narrow implementation area of ​​spot checks, it is not possible to control drunk driving well.

This paper proposes an alcohol detection and safety control system. The system is installed on the car and can determine whether the driver is driving under the influence of alcohol without the need for traffic police and other personnel, thereby ensuring the driver's safety and reducing the workload of traffic police and other personnel. At the same time, it can make an independent judgment based on whether the alcohol content is over the standard, and can control the car ignition switch so that the drunk driver cannot start the car. Moreover, the cost of this system is lower than that of a breath alcohol tester, and it is simpler and more reliable to implement and use, and can more generally control the occurrence of drunk driving.

1 Overall design

The system uses the driver's active exhalation method to determine whether the driver is driving under the influence of alcohol. The overall design scheme is shown in Figure 1. The system can be placed on the dashboard of the car. When the driver starts the car, the alarm device will sound to remind the driver to use the alcohol detection and safety control system. At this time, the engine is in a locked state and the car cannot be started. After the alcohol sensor is heated, the green light of the system indicator module lights up to prompt the driver to exhale. In order to prevent the driver from evading detection, a microphone is set as an exhalation judgment device. When the exhalation is confirmed, the microcontroller sends a trigger signal to start detecting the gas signal detected by the alcohol sensor. Since the alcohol content is proportional to the voltage signal generated after the alcohol sensor is detected, the alcohol content can be judged based on the voltage signal. The detection signal passes through the amplification and detection circuits for signal amplification and filtering, and is then converted into a digital signal through the A/D conversion circuit. The signal is processed and judged by the single-chip microcomputer. If the alcohol content does not exceed the standard, the indicator light will light up, the control relay will not work, and the car can be started; otherwise, the exceeding indicator light will light up and the alarm device will sound at the same time, indicating that the car cannot be driven. If the driver starts the car forcibly, the control relay will cut off the power supply of the ignition device, making the car unable to drive, thereby realizing the function of controlling drunk driving.

2 Hardware Design

The hardware design adopts independent structures of the transmitting part and the receiving part, so that the detection and control systems are separated.

2.1 Transmitter

The transmitting part is powered by a battery, with 89C2051 microcontroller as the control core, equipped with QM-J3 gas-sensitive alcohol sensor, breath microphone, 8-bit A/D converter AD0809 and transmitting module F04E. The main function is to detect the alcohol content, determine whether it exceeds the standard, and send a signal to the receiving part. The principle block diagram is shown in Figure 2. This part consists of the following modules:

2.1.1 Alcohol content detection module

The module includes an alcohol sensor, detection, amplifier circuit and A/D conversion circuit. The alcohol probe uses QM-J3 gas sensor, which is an N-type semiconductor with composite metal oxide as the main material. When exhaling, once the element contacts ethanol vapor, its conductivity increases rapidly with the increase of gas concentration, so that the generated voltage signal also increases. After the voltage signal is converted into a digital quantity by the detection, amplifier circuit and A/D conversion circuit, it is sent to the single-chip microcomputer for threshold judgment to detect whether the alcohol content in the driver's exhaled gas exceeds the standard.

2.1.2 Exhalation judgment module

In order to prevent the alcohol sensor from making a wrong judgment due to the driver not exhaling and failing to correctly detect the actual alcohol content in the driver's body, this module is set to determine whether the driver exhales. When the microphone is used to exhale, the microphone will generate a pulse signal. The microcontroller determines that the driver exhales and then detects the signal sent by the alcohol probe.

2.1.3 Indicator module

The module has three indicator lights: red, green and yellow. The red light is the power indicator light, which is on when working; the green light is the exhalation prompt light, and the alcohol probe needs a certain amount of time to heat up to achieve the ideal sensitivity.

When the heating time is up, the green light comes on, indicating that you can exhale; the yellow light indicates that the exhalation is effective. When the yellow light is not on, it means that the exhalation is not sufficient. Only when the yellow light comes on will the microcontroller start to detect the signal sent by the alcohol probe.

2.1.4 Microcontroller

The 89C2051 single-chip microcomputer of the 51 series is selected as the processor to detect the exhalation judgment signal and judge the alcohol content in the gas, and generate the corresponding information code to send to the transmitting device.

2.1.5 Transmitter Module

The mature F04E transmitting module is adopted, which can be directly connected to the single-chip microcomputer, modulate the information code given by the processor and send it wirelessly to the receiving part.

2.2 Receiving part

The receiving part is installed on the car, mainly to judge the received signal code and make corresponding operations. If an error code is received, it returns to continue testing; if an over-limit code is received, an alarm sound is given, the ignition device is disconnected, the car headlights are on, and the horn sounds; if a non-over-limit code is received, a driving prompt sound is given and the ignition device is turned on. The structural block diagram is shown in Figure 3, which can be divided into the following modules:

2.2.1 Receiving device module

Adopt J04H receiving module. When there is no signal, the output of J04H is zero level (no noise interference). It is suitable for the input interface of single-chip microcomputer. J04H adopts strip gold-plated inductor and optimized circuit. No external antenna is required. The receiving sensitivity is high. The gold-plated inductor with a certain hardness is used to adjust the receiving frequency. The receiving circuit performance is more stable than that of the fine-tuning capacitor. J04H has a higher receiving bandwidth. It is matched with F04E and basically does not require debugging. As long as the power supply and lead wire do not have too large distributed parameters, it can be in a normal receiving state. The receiving module receives the signal of the transmitting module and sends the code to the single-chip microcomputer after modulation.

2.2.2 Microcontroller

After receiving the code from the receiving device, it performs different operations according to different codes. It controls the working indicator light, relay, and voice alarm module.

2.2.3 Relay control module

Controlled by a single-chip microcomputer, it is equivalent to a switch, controlling the on and off of the ignition, the lighting of the car lights, and the sounding or not of the horn.

2.2.4 Alarm Voice Module

The buzzer is used as an alarm. When the alcohol content exceeds the standard, a warning tone prohibiting driving is issued; when it does not exceed the standard, a prompt tone allowing driving is issued.

Through the above design, the front end of the system can generate the corresponding control code after the alcohol content signal detected by the alcohol sensor is judged by the single chip microcomputer and sent wirelessly by the sending module. The receiving part of the back end can decode the control code transmitted by the transmitting part and generate the corresponding control signal to control the ignition circuit of the car, thereby realizing effective control of drunk driving.

3 Software Design

The software part is also divided into two parts, transmission and reception, according to the system function settings. Due to space limitations, this article presents its main functions in the form of a flow chart.

The main program flow chart of the transmitter is shown in Figure 4, which realizes the functions of breath recognition, whether the alcohol content exceeds the standard, generating information codes and sending the information codes to the receiving part. Each device has a unique 40-bit binary code number, and the number is placed in the high five bits of the signal code every five bits starting from the low bit, and the last three bits are generated according to the test results. In this way, a set of eight eight-bit information codes with check bits are generated. Since the number of each device is different, this transmitter cannot start the car when used on any other receiver, thus playing the role of an electronic key.

Figure 5 is the main program flow chart of the receiving part. Its function is to receive information, in which the information code is received by receiving 8 information codes at a time. After receiving, it is judged whether the check bits of the 8 information codes are correct. If correct, it is judged whether it exceeds the standard based on the comparison between the last information code and the exceeding code. Otherwise, it returns to receive again. When the check bit is correct and the same as the exceeding code, the exceeding operation is executed, that is, the alarm device sounds and the control relay cuts off the power supply of the ignition device; otherwise, it is compared with the non-exceeding code. If they are the same, the non-exceeding control is executed and the car can be started. If they are not the same, it returns to receive information again.

4 Conclusion

The vehicle alcohol detection and safety control system is designed to prevent traffic accidents. This article introduces the entire design by explaining the functions of each module and the software workflow. Since the transmitting part of this system is very small and separated from the receiving part, it can be carried with you without any complicated operation; at the same time, the receiving part is installed on the car and is not easy to uninstall, so it has a good effect on preventing drunk driving and has a good promotion value in practical applications.

Reference address:The role of single chip microcomputer in vehicle alcohol detection system

Previous article:Design of serial communication interface based on FPGA and single chip microcomputer
Next article:Design and Implementation of 80C51 Virtual Instruction Execution System

Latest Industrial Control 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号