Alcohol Sensor with Arduino

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.

Parts Used in This Guide

Buy

Buy

Buy

Step 1  Connect the 5V line from the Arduino to the Module.

  • Connect the 5V line from the Arduino to the Module.

Step 2  Connect the Ground line from the Arduino to the Module.

  • Connect the Ground line from the Arduino to the Module.

Step 3  Connect Analogue 0 to the Module.

  • Connect Analogue 0 to the Module.

Step 4  Upload the code.


              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.

Step 5  Open the Serial Plotter.

  • In the Arduino IDE go Tools → Serial Plotter.

Step 6  Demonstation of the Alcohol Sensor.

  • Here we have used the Serial Plotter to view the results as a graph.