Sheekar Banerjee
Published © CC0

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.

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

Things used in this project

Story

Read more

Schematics

Circuit Diagram of MQ3 Alcohol Sensor

Code

Program of MQ3 Alcohol Sensor with Arduino UNO R3

Arduino
const 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 followers
A motivated Computer Scientist & Engineer with years of experience over IoT, Robotic Systems, Machine Learning Algorithms and Software.

Comments