“The system adopts ultra-high sensitivity alcohol sensor, ultra-low power consumption single-chip microcomputer system, and the method of automatically detecting the alcohol concentration can prevent the driver from evading the detection to determine whether the driver is driving after drinking. The overall design of the system is shown in Figure 1. The system can be placed on the dashboard of the car. When the driver starts the car, the detection controller is activated. At this time, the engine is locked and the car cannot be started. After the alcohol sensor is heated, the detection controller detects the gas signal detected by the alcohol sensor.
How the system works
The system adopts ultra-high sensitivity alcohol sensor, ultra-low power consumption single-chip microcomputer system, and the method of automatically detecting the alcohol concentration can prevent the driver from evading the detection to determine whether the driver is driving after drinking. The overall design of the system is shown in Figure 1. The system can be placed on the dashboard of the car. When the driver starts the car, the detection controller is activated. At this time, the engine is locked and the car cannot be started. After the alcohol sensor is heated, the detection controller detects the gas signal detected by the alcohol sensor.
Since the alcohol content and the voltage signal generated by the alcohol sensor are in a specific proportional relationship, the alcohol content can be judged based on the voltage signal. After the detected signal is amplified and filtered, it is converted into a digital signal by the built-in 12-bit ADC of the single-chip microcomputer. The signal is processed and judged by the single-chip microcomputer. Assuming that the alcohol content does not exceed the standard, the LCD Display screen displays the current alcohol concentration, and the normal indicator light is on , The control relay does not work, and the car starts;
On the contrary, an audible and visual alarm is carried out, and the control relay cuts off the power supply of the ignition device, and the driver cannot start the car, which fundamentally realizes the control of drunk driving. After the car is started, the controller immediately enters a low power consumption state, and only the alcohol concentration detection circuit works all the time. Once the driver drinks alcohol while driving, the controller immediately returns to its normal working state.
Figure 1 The overall structure of the system
System hardware design
1 Main control circuit design
This controller adopts the MSP430FG4619 in the 16-bit ultra-low power, high-performance MSP430 microcontroller series launched by Texas Instruments. It is only 350μA in active mode, and the maximum leakage current of the port line input is 50nA; its high integration not only greatly reduces the failure rate, but also has obvious advantages in cost, volume, and stability.
The MSP430FG4619 in the alcohol detection control instrument system is used to judge the alcohol content in the gas and control the work of the entire control instrument. The main control circuit of the system is shown in Figure 2, including crystal oscillator circuit, reset circuit and JTAG interface circuit.
Figure 2 Schematic diagram of the main control circuit of the system
2 Alcohol detection circuit
The alcohol detection circuit is composed of a high-precision alcohol sensor, a signal conditioning amplifier circuit, a filter circuit, and a built-in 12-bit ADC in the microcontroller, as shown in Figure 3. The main function is to detect the alcohol content and judge whether it exceeds the limit.
Figure 3 Alcohol detection circuit diagram
The alcohol sensor uses indirectly heated semiconductor alcohol gas sensor MQ3, which has high sensitivity and good selectivity to ethanol vapor, rapid response recovery, long-term life and reliable stability, and the detection range is 10-1000ppm. Especially suitable for the detection of drunk drivers
The front stage of the signal conditioning amplifier circuit is realized by the high-precision operational amplifier MAX4238 produced by Maxim, which has a bias current of 1pA, a bias voltage of 2μV, ultra-low temperature drift, and good performance. The post-amplification is realized by the commonly used OP07C operational amplifier, and the filter chip is realized by the switched capacitor type pin programmable integrated filter MAX266 produced by Maxim, which has better performance than ordinary RC filter circuits.
The A/D conversion adopts the 12-bit ADC that comes with the MSP430FG4619IPZ and the maximum rate is 200KSPS. Its voltage reference can be selected as an internal reference or an external reference, which saves the external ADC chip, greatly simplifies the hardware design, and can meet the accuracy Therefore, it is very suitable for the design of this system.
3 Indicator light and liquid crystal display circuit
The indicator circuit has three indicator lights, red, green, and yellow. The red light is the power indicator light, which is on when it is working; the green light is the detection indicator light, because the alcohol probe needs a certain time to heat to reach the ideal sensitivity. When the heating time is up, the green light is on. It means that concentration detection is possible; the yellow light is an alarm indicator, and the yellow light is off, indicating that you can drive; when the yellow light is on, it means that the alcohol concentration exceeds the standard and you cannot drive. At the same time, the higher the frequency of the yellow light flashes, the higher the alcohol concentration.
The liquid crystal display circuit is used to display the measured alcohol concentration. The liquid crystal display circuit adopts LCM128645ZK, which is a low-power dot matrix LCD, which can work under the condition of 3.3V power supply. The display format is 128 (columns) × 64 (rows), with multi-function commands and internal belts. There is a Chinese character library, which can work both in serial mode and in parallel mode, and it is easy to connect with 16-bit single-chip microcomputer. The connection with the one-chip computer in this system adopts the parallel working mode, as shown in Figure 4.
Figure 4 Keyboard display and indicator circuit diagram
4 Relay control circuit
This circuit is controlled by the single-chip microcomputer P2.4, which is equivalent to a switch, which controls the opening and closing of the ignition device, the turning on and off of the car lights, and the sounding or non-sounding of the horn. It is a very important execution unit in the system. The circuit is simple and will not be given here due to space reasons.
5 Alarm and keyboard circuit
Use the buzzer as an alarm, when the alcohol content exceeds the limit, it will sound the prohibition of driving warning; when it does not exceed the limit, it will emit the warning sound of allowing driving. The buzzer is driven by P1.7.
Because the one-chip computer has enough I/O pins, the keyboard circuit of the system adopts the independent keyboard, as shown in Fig. 4. Working in interrupt mode, the system parameters of the alcohol detection controller can be set, such as the alcohol concentration of the set alarm.
6 Other circuits
The JTAG interface circuit is used to debug the program and upgrade the system software. The power conversion circuit is used to convert the power supply system on the car into the voltage required by the microcontroller and the chips used by the system. The monitoring reset circuit is used to ensure that the single-chip microcomputer is in a good operating state and prevent the program from running away due to interference. It is more reliable than the internal watchdog circuit.
Through the above design, the front end of the system can judge the alcohol content signal detected by the alcohol sensor and generate the corresponding control signal to control the ignition circuit of the car after the single-chip microcomputer judges, so as to realize the effective control of drunk driving.
The software part carries on the modular programming according to the system function. The main program flow chart of the controller is shown in Figure 5.
Figure 5 Flow chart of the main program of the controller
Realize functions such as alcohol content detection, judging whether the alcohol content exceeds the standard, alcohol content display, sound and light alarm, etc. After the system is initialized, the alcohol sensor is heated and automatically enters the measurement state, and then collects the alcohol content voltage signal and compares it with the set accuracy concentration. If it is higher than this concentration, the concentration will be displayed, and an audible and visual alarm will be performed, and at the same time it will be turned off. Ignition circuit, the driver cannot start the car; if the concentration is lower than this, the measured concentration is displayed and the engine is started at the same time.
The vehicle-mounted alcohol detector is designed to prevent traffic accidents. This text introduces the whole design through the elaboration of each circuit function and software workflow. Since this system is installed in a car, it has automatic measurement, high degree of intelligence, and low power consumption. It has a good effect on preventing drunk driving and has a good promotion value in practical applications.