How MQ3 Alcohol Sensor Interface with Arduino UNO

4,027 views

Introduction

Have you ever heard about breathalyzer devices? They are the devices that estimate the alcohol taken by a person. Mainly, helps to warn a drunk driver to avoid accidents. Thus, these breathalyzer devices use an Alcohol sensor. Certainly, the MQ3 sensor.

Basically, It’s a metal oxide semiconductor sensor, also promoted as a chemiresistor. Because it works with the change of the resistance. Hence, it senses the alcohol concentration by voltage dividing network. So, In this tutorial, we are going to interface “MQ3 Alcohol Sensor with Arduino UNO”.

How MQ3 Sensor Works?

The tabular sensing part of the sensor is made up of aluminum oxide which has a coating of tin dioxide(SnO2). When this layer of SnO2 is heated at a high temperature, oxygen gets adsorbed at the surface. So, when there is no alcohol, the electrons from the conduction band of SnO2 get attracted towards the oxygen. Thus, this forms the depletion layer below the surface of the SnO2. Hence, worked as a potential barrier that allows no current to flow.

When the layer senses the alcohol, oxygen is reacted with the alcohol, and the density of adsorbed oxygen gets decreased. This reduces the potential barrier and electrons are allowed to release into SnO2. As a result, the current starts to flow in a sensor.

Specification of MQ3 Sensor

  • The operating voltage of the sensor is 5V.
  • It consumes a current of 150 mA.
  • It can detect the concentration of alcohol of about 0.05-10mg/L.
  • The operating temperature range of the sensor is from 14 to 122 degrees Fahrenheit.
  • The sensor requires a load resistance of 220K.

Features of MQ3 Sensor

  • The MQ3 sensor belongs to the semiconductor sensor type.
  • The sensor is compatible and can be interfaced with almost all microcontrollers.
  • it has a low-power standby mode.
  • the module has a great sensitivity for alcohol gas.
  • MQ3 sensor requires the drive circuit.
  • It has an easy SIP header interface.
  • The sensor has a good durability rate.
  • The module sensor is inexpensive and affordable.
MQ3-Alcohol-Ethanol-Smoke-Sensor-Module

Hardware Required

S.noComponentValueQty
1.ArduinoUNO1
2.USB Cable Type A to B1
3.Jumper Wires
4.Alcohol SensorMQ31

Circuit Diagram

Arduino-Wiring-MQ3-Alcohol-Sensor-To-Read-Analog-Output-Circuit

Connection Table

ArduinoMQ3 Alcohol Sensor
5VVCC
GNDGND
D8D0
A0A0

Arduino Code

#define MQ3pin 0

float sensorValue;  //variable to store sensor value

void setup() {
	Serial.begin(9600); // sets the serial port to 9600
	Serial.println("MQ3 warming up!");
	delay(20000); // allow the MQ3 to warm up
}

void loop() {
	sensorValue = analogRead(MQ3pin); // read analog input pin 0

	Serial.print("Sensor Value: ");
	Serial.println(sensorValue);
	
	delay(2000); // wait 2s for next reading
}

Working Explanation

To interface MQ3 Alcohol Sensor with Arduino, follow the above circuit diagram and connect the circuit accordingly. After that, write the above-described code in your Arduino IDE and upload that code in Arduino UNO. Now, open the serial monitor and observe the readings. Hence, you can measure the alcoholic concentration steadily through this device.

Code Explanation

  • First, define the analog Arduino pin that is connected with the output pin of an Arduino. Declare the variable sensorValue to store the values coming from the sensor.
  • In the void setup, Initialize the serial monitor. Print the message that the sensor is warming up by using the command serial. println. Also, provide some delay to the sensor to warm up.
  • In the void loop, read the values coming from the sensor by using function analogRead( ). Prit sensor value bu using Serial.print( ). Provide some delay to get the next reading.

Application and Uses

  • Firstly, in breathalyzers.
  • Further, in portable alcohol detectors.
  • Also, in environmental sensing or monitoring devices.
  • Moreover, In gas level alarms.