Description
It is a semiconductor-type sensor that is used to detect the presence of Alcohol. It consists of a sensitive material SnO2 for the detection of alcohol. SnO2 has less conductive in clean air as compared to alcohol gas. When the sensor is targeted to alcohol gas the conductivity of SnO2 increases. The increase in conductivity of the sensor is directly proportional to the concentration of alcohol. So the concentration of alcohol can be easily measured using any microcontroller. The MQ3 sensor has a very fast and high sensitivity. You can use this to make an Alcohol detector using Arduino.
An MQ3 sensor has a wide array of applications, such as:
- Vehicle alcohol detector
- Portable alcohol detector
The applicability of an MQ3 sensor is enhanced by the following features:
- Good sensitivity
- Long life
- Economical
- Simple drive circuit
Pin configuration of MQ3 Alcohol sensor
Pin uses
- Pin 1 is the VCC pin. It is used to connect 5v to the module.
- Pin 2 is the GND pin. It is used to connect the ground to the module.
- Pin 3 is the D0 pin. From this pin, you will get digital data logic 1 and 0.
- Pin 4 is the A0 pin. From this pin, you will get analog data of range 0-5 volts.
Features of MQ3 Alcohol sensor
- The operating voltage of the sensor is between 4.7-5 volts DC.
- The current consumption of the sensor is <150mA.
- The operating temperature of the sensor is between -10-50°C.
- It has a low-power standby mode.
- The detecting concentration is between 0.05-10mg/L Alcohol.
- It can also measure Ethanol and smoke.
Components needed
- Arduino UNO
- One MQ3 Alcohol sensor
- Breadboard
- Jumper wires
Pin connection of MQ3 Alcohol sensor with Arduino UNO
- Connect the VCC pin of the sensor to the 5v pin of the Arduino UNO.
- Connect the GND pin of the sensor to the GND pin of the Arduino UNO.
- Connect the A0 pin of the sensor to the A0 pin of the Arduino UNO.
- Connect the D0 pin of the sensor to the D2 pin of the Arduino UNO.
Circuit diagram of MQ3 Alcohol sensor with Arduino UNO
Arduino UNO code for MQ3 Alcohol sensor
const int alcoholA=A0;//Define pin for AO pin of the sensor
const int alcoholD=2;//Define pin for D0 pin of the sensor
void setup() {
Serial.begin(9600);//Set the baud rate for the serial communication
pinMode(alcoholD,INPUT);//Set analog pin as INPUT
pinMode(alcoholA,INPUT);//Set digitl pin as INPUT
}
void loop() {
int alcohol_readD=digitalRead(alcoholD);//Read sensor digital values using digitalRead() function
int alcohol_readA=analogRead(alcoholA);//Read sensor analog values using analogRead() function
Serial.print("Digital Data:");
Serial.println(alcohol_readD);//Print digital values on serial monitor
Serial.print("Analog Data:");
Serial.println(alcohol_readA);//Print analog values on serial monitor
float alcoholValue=map(alcohol_readA,0,1023,4,400);//Convert sensor analog values to the range of 4-400
float alcohoalCon=(alcoholValue/100);//convert the data to mg/l
Serial.print("Alcohol Concentration:");
Serial.print(alcohoalCon);//Print the data on the serial monitor
Serial.println("mg/l");
delay(1000);
}