Arduino Alcohol Detector with MQ-3 Sensor and Engine Lock
Build a breath lock for a car: a three-second breath test keeps the peak alcohol reading, starts the engine relay only for a clean breath and locks the car out after a failed test.

Your project challenge
Show Press START. When START is pressed, show Blow now and read A0 for 3 seconds, keeping the highest reading. Under 400: show PASS and switch the engine relay on until the next START. 400 or more: show LOCKED, beep 3 times and ignore START for 6 seconds. Show Peak and the number on row 2.
Components you’ll use
- Arduino Uno
- Alcohol Sensor (MQ-3)
- Pushbutton
- Relay Module
- Piezo Buzzer
- LCD 16x2 Display
What you’ll build
A breath lock for a car. The driver presses START and blows into an alcohol sensor. A clean breath starts the engine; alcohol locks it. Real cars can be fitted with one, called an alcohol interlock. This is a learning project, not a breath tester the police would use.
How it works
The MQ-3 sensor warms a tiny plate that reacts to alcohol vapour. More alcohol gives a higher voltage on AO, so analogRead(A0) gives a bigger number. Use the sensor’s slider to blow alcohol at it. The relay is the ignition switch: LOW on IN switches the engine on.
The key idea
A breath rises and falls. Read A0 again and again for three seconds and keep the highest number, the peak. Decide only when the time is up. A locked car ignores START for six seconds.
⚠ Watch out
One reading at the end misses a short puff. Never switch the engine on during the test.
Make it yours: print every test result to Serial with the time, like a logbook.
The editor has the wiring guide, the code and the simulator.
Build this project