Since May 1, 2011, the Criminal Law Amendment (8) and the revised Road Traffic Safety Law have been officially implemented, and drunk driving will be investigated for criminal responsibility. With the real implementation of drunk driving being sentenced to criminal detention with dangerous driving crimes, the media and the community are paying more attention to the problem of drunk driving. Various countries have a wide variety of instruments for alcohol testing, but because they are not installed inside the car, they can only be spot-checked by the traffic police hand-held instruments, making the drunk driving inspection implementation narrow and unable to actively eliminate this dangerous driving behavior. It is impossible to completely eliminate traffic accidents caused by drunk driving.
This article refers to the address: http://
Therefore, we hope to design a car anti-drunk driving safety system. The design of this car anti-drunk driving control system is divided into two parts, in which the alcohol concentration detection judgment part is installed near the car steering wheel for the driver to breath test; the second part is the alcohol concentration exceeding the standard. Control the ignition section, which is connected to the car igniter to control the ignition and alarm circuits. This will enable a full range of active bans on drunk driving.
1 system design
The working principle of the design is that when the driver starts the car, the indicator light prompts the user device to start, prompting the driver to first exhale the alcohol sensor, and the gas is processed by the sensor, the detection amplification and the AD conversion, and then input to the main control.
It is judged in the chip that if the threshold voltage is exceeded, the buzzer sounds to start the stepping motor, which means that the car engine cannot be ignited, and the voice alarm circuit will start an alarm. Conversely, if the test alcohol content does not exceed the standard, the display indicates that the alcohol concentration is normal and the car can start firing normally. Figure 1 shows the overall block diagram of the system.
2 hardware circuit design
The core control module of the system is MSP430F149 of TI Company of USA. The highlight of this chip is low power consumption, rich on-chip peripheral modules, stable system operation, and conform to the modern environmental protection concept; especially the chip comes with 10-bit and 12-bit ADC conversion. Easy to use, fully meet the actual requirements of driving in real life.
1) Alcohol concentration collection
The alcohol concentration sensor input terminal uses the alcohol concentration sensor MQK2 device. It uses a sensitive sintered body formed by sintered semiconductors, which ensures long-term stability of its operation; high sensitivity and good selectivity to ethanol vapor, high signal-to-noise ratio and low power consumption; these characteristics are in line with drivers. Self-test drunk driving operation needs.
MQK2 is mainly composed of gas sensor and resistance wire. VH is connected to 5 V heating voltage, which can heat the resistance wire to 270-300 Â°C; Vc is connected to the working voltage (range 5-24 V); the external voltage of this system is +5 V, The sampling resistor RL=2 kÎ©, so that the resistance change of the MQK2 sensor can be converted into the change of the output voltage through the circuit of Fig. 2, so that it can be converted into a digital quantity by the A/D device inside the MSP430F149 for processing by the single chip microcomputer.
Considering the alcohol concentration, the sensor converts the non-electricity into electricity. The sensor outputs a voltage of 0 to 3.3 V and the pressure is stable. Since the voltage range of the alcohol sensor is 3 to 5 V, the output value of the alcohol sensor cannot be directly directly. Give the microcontroller. It can be seen from the literature that the alcohol content is linearly proportional to the voltage signal generated after the detection of the alcohol sensor, so it is possible to convert to the voltage range of the single-chip microcomputer by using a universal proportional circuit. In this design circuit, a sliding varistor is used instead of the alcohol sensor, and the analog input of the sensor can be directly sent to the single-chip microcomputer by the change of the voltage input of the sliding varistor, thereby obtaining a one-to-one correspondence between the alcohol concentration and the voltage.
2) Motor drive and alarm module
When the alcohol content exceeds the standard, use a buzzer and an 8550 triode to drive the driver to drunk. The indicator light is an LED connected to the microcontroller, plus a 1 ~ 2 kÎ© resistor current limit. When the drunk driving, the output port of the single chip P6.7 is set to 1, and the 8550 triode amplifies the current of the single chip to drive the buzzer. When it is used normally, use the output port p5.0 to set 1, and then add a current limiting resistor to prevent the current from being too high and burn out the diode.
Here, a stepping motor is used instead of the ignition of the actual car. The rotation of the stepping motor means that the engine of the car is started, and vice versa, the car cannot be started. Since the output current of the MCU cannot drive the motor, the drive module is required to drive the motor. Based on theoretical analysis and actual situation, the stepper motor and LN298 are selected as the hardware circuit.
In summary, the system uses the LCD12864 display module to provide a human-computer interaction interface, the ADC conversion module performs analog-to-digital signal conversion; the data processing module is used to display the detection information on the 12864 screen, and corresponds to the input analog quantity; the motor drive and The alarm module is responsible for when the input analog quantity is too high, the alarm prompts the user, and displays information about the alcohol content; or when the input analog quantity is not marked, the user is prompted to fire normally.
3) Main components
In summary of the hardware description, the main components and parameters used in this design are shown in Table 1.
3 software design
The system main program flow chart and compilation success are shown in Figures 3 and 4. After the system is powered on, it is necessary to initialize the modules to determine whether to emit sound and light alarms, and send the calculated alcohol concentration value to LCD12864 for display.
4 physical debugging circuit
As shown in Figure 5, the whole circuit consists of two parts: MSP430F149 system board hardware resources (LCD12864 display, buzzer, LED, etc.) and a motor drive module circuit (LN298 drive module and DC motor).
When the MCU is powered on, the 12864 display shows welcome (as shown in the left figure of Figure 6). When the alcohol content is higher than the set value, the drunk driving information is displayed in Figure 6, and the motor is disabled, which means the ignition device of the generator. Being still. If it is judged that the alcohol content is normal, it indicates that it is safe to drive the car (as shown in the right figure of Figure 6).
The software and hardware circuit design of the system for the vehicle anti-drunk driving safety control system, and the joint debugging of the hardware and hardware based on the 32-bit low-power main control chip MSP430 as the core chip, proved the feasibility of the design circuit. And correctness. The hardware circuit is simple and low in cost, and the software design is modular and easy to debug, and has certain expansion and application value. However, the car drunken driving system is closely related to people's subjective initiative. How to intelligently identify whether the gas received by the alcohol sensor is called by the driver himself, further research is needed.
Portable Battery Pack,Wireless Battery Pack,Rechargeable Battery Pack,Nintendo Switch Battery Pack
Zhejiang Xinghai Energy Technology Co.,Ltd , https://www.headwayli-battery.com