Alcohol Sensor with Arduino
Learn to make your own breathalyzer
Written By: Cherie Tan
Difficulty
Easy
Steps
6
An Alcohol Sensor detects alcohol concentration in the air. It is not unlike a standard alcohol breathalyser.
In this guide, we will learn to hook it up to an Arduino, give it a test and view the results using the serial plotter found in the Arduino IDE. If you are under the age of 18, you will need to enlist Mum or Dad to help with "acquiring the data.".
By completing this guide, you will have gained some understanding of how to use an alcohol sensor. You could go on to build your very own alcohol detection system.
Connect the 5V line from the Arduino to the Module.
Connect the Ground line from the Arduino to the Module.
int gas_ain = A0; //Alcohol Sensor AnalogPin to Arduino A0 int led_pin = 13; //use Arduino integrated LED which connected to D13 int ad_value; void setup() { pinMode(led_pin, OUTPUT); pinMode(gas_ain, INPUT); Serial.begin(115200); delay(2000); } void loop() { ad_value = analogRead(gas_ain); Serial.println(ad_value); delay(200); }
Grab this code and upload it in the Arduino IDE
Open the serial monitor
Now grab a beer! ....or better a whisky! When you breathe alcohol over this sensor, you should get a spike in the reading.