Learn how to use the mq 3 alcohol sensor breakout board with an arduino.
Alcohol sensor using arduino code.
With the arduino pin number it is connected to.
The anode of the led connects to digital pin d13 of the arduino int i alco high alco low mapped data 200.
Const int rs 13 en 12 d4 11 d5 10 d6 9 d7 8.
We know mq3 alcohol sensor is suitable for detecting alcohol concentration in air or from the breath this gas sensor interfacing circuit can be used as breathalyzer.
The sensor detects the alcohol consumption by the smell of the breath.
The sensor is an analog as well as a digital sensor which on its analog pin outputs the analog voltage proportional to the alcohol level.
Mq 3 sensor has high sensitivity and fast response time and this sensor provides an analog resistive output based on the alcohol concentration in air or breath.
Sets the baud rate pinmode aoutpin input.
Mq 3 alcohol sensor circuit with arduino shubham gupta embedded engineer const int aoutpin a0.
The code which we need to upload to the arduino so that it can measure alcohol levels is shown below.
As you ll have observed the mq 2 sensor detects vapour from the alcohol which means it s more likely to work on spirits than on beer.
A push button also used here for start taking reading from alcohol sensor connected at digital pin d6 of arduino.
While the judiciary is unlikely to be ordering a bunch of diy arduino nano alcohol detectors building a device like this could certainly prove useful for breaking the ice at parties or make an interesting talking point on a night out.
The circuit is based on arduino pro mini.
The arduino code is written on arduino ide and burnt to the pro mini using the same.
Liquidcrystal lcd rs en d4 d5 d6 d7.
Void setup serial begin 115200.
Buzzer is connected at pin d9.
Here simple arduino alcohol sensor code is written to interface mq 3 gas sensor alcohol with arduino board in this case we used arduino uno board.
The arduino sketch manages to take the reading from the mq 3 sensor digitize and display reading compare reading with a threshold level and operate led as well as servo to indicate a dangerous level of consumption.
The mq 3 alcohol sensor is one of the mq group of gas sensors that are easy to interface with microcontrollers.
Mq 3 alcohol sensor circuit with arduino const int aoutpin 0.
The project is built on arduino pro mini as the device is designed to be a handheld device.
The aout pin of the alcohol sensor goes into analog pin a0 of the arduino const int ledpin 13.
Apart from the mq 3 sensor a servo motor and an led is also interfaced to the controller board to move the dial and indicate a.
Initialize the library by associating any needed lcd interface pin.
Hey friends in this tutorial i will show you how to make a alcohol detector with arduinovisit my website to download codes and circuit diagrams https www.
The mq 3 sensor is used in the project to detect alcohol level.
Alcohol sensor output is also connected at an analog pin of arduino a0.