MQ3 Alcohol Sensor With Arduino | Sheekar Banerjee

Hackster.ioLearning Hardware Community. Projects× Log inSign up ProjectsProjectsChannelsChannelsNewsContestsEventsVideos ×

Embed the widget on your own site

Add the following snippet to your HTML:

MQ3 Alcohol Sensor with Arduino | Sheekar Banerjee

This project is about the interfacing of MQ3 alcohol sensor. I tried to demonstrate of a Basic Dope Testing system and mechanism.

Read up about this project on Hackster.io

MQ3 Alcohol Sensor with Arduino | Sheekar Banerjee

Sheekar Banerjee2 1,703
  • Overview
  • Things
  • Story
    • Circuit Planning
    • Code
    • Results
    • Range recognition
  • Schematics
  • Code
  • Credits
  • Comments(0)
Sheekar BanerjeeSheekar BanerjeePublished © CC0MQ3 Alcohol Sensor with Arduino | Sheekar Banerjee

This project is about the interfacing of MQ3 alcohol sensor. I tried to demonstrate of a Basic Dope Testing system and mechanism.

IntermediateShowcase (no instructions)1,703MQ3 Alcohol Sensor with Arduino | Sheekar Banerjee

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
  • Buy from Newark
  • Buy from store.arduino.cc
  • Buy from Adafruit
  • Buy from Arduino Store
  • Buy from CPC
Gravity: Analog Alcohol Sensor (MQ3) For Arduino
DFRobot Gravity: Analog Alcohol Sensor (MQ3) For Arduino
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Circuit Planning:

Arduino-----> MQ-3 Alcohol Sensor

5V -----> Vcc

GND -----> GND

Analog (A0) -----> A0

Digital 8 -----> D0

Code:

//the code is entirely created by: SHEEKAR BANERJEE (at December 2017) //Dept. of CSE, IUBAT //AI-ML-IOT Solution Engineer and Researcher const int AOUTpin=0; const int DOUTpin=8; int limit; int value; void setup() { Serial.begin(115200);//sets the baud rate pinMode(DOUTpin, INPUT); } void loop() { value= analogRead(AOUTpin); limit= digitalRead(DOUTpin); Serial.print("Alcohol value: "); Serial.println(value); Serial.print("Limit: "); Serial.print(limit); delay(500);

Results:

Checking the sensor data with my normal breath. Sensor data rapidly went up (600+) when I put the exit-hole of a hand-sanitizer close to the sensor Serial Plotter view of the alcohol sensor data
Video explanation in my native language (Bengali)

Range recognition:

Value --> 0-299 ---> Normal

Value --> 300-400 ---> Mild Alcoholic

Value --> More than 400

I tested the sensor with a hand sanitizer's exit-hole. Because the hand sanitizer contains 70% of alcohol. That was quite a brilliant alternated decision to use hand sanitizer for testing instead of using real alcohol. Because I don't drink!!!

Read more

Schematics

Circuit Diagram of MQ3 Alcohol Sensor

Code

  • Program of MQ3 Alcohol Sensor with Arduino UNO R3

Program of MQ3 Alcohol Sensor with Arduino UNO R3

Arduinoconst int AOUTpin=0;//the AOUT pin of the alcohol sensor goes into analog pin A0 of the arduino const int DOUTpin=8;//the DOUT pin of the alcohol sensor goes into digital pin D8 of the arduino int limit; int value; void setup() { Serial.begin(115200);//sets the baud rate pinMode(DOUTpin, INPUT);//sets the pin as an input to the arduino pinMode(ledPin, OUTPUT);//sets the pin as an output of the arduino } void loop() { value= analogRead(AOUTpin);//reads the analaog value from the alcohol sensor's AOUT pin limit= digitalRead(DOUTpin);//reads the digital value from the alcohol sensor's DOUT pin Serial.print("Alcohol value: "); Serial.println(value);//prints the alcohol value Serial.print("Limit: "); Serial.print(limit);//prints the limit reached as either LOW or HIGH (above or underneath) delay(500); }

Credits

Sheekar Banerjee

Sheekar Banerjee

0 projects • 6 followersA motivated Computer Scientist & Engineer with years of experience over IoT, Robotic Systems, Machine Learning Algorithms and Software.Follow ContactContact

Comments

Related channels and tags
  • DFRobot
  • Home Automation
  • Home Automation
  • Internet of Things
  • Internet of Things
  • embedded
  • human welfare
  • internet of things
  • monitoring
  • smart appliances

Tag » Arduino Mq 3 Alcohol Sensor