
Alcohol Measurement with the MQ-3 Sensor
Beginner25 minA project that measures alcohol vapour in the air with an MQ-3 gas sensor and writes the analog value and the threshold state to the Serial Monitor every half second. The analog value (0-1023) rises as the alcohol concentration goes up; the Limit value shows whether the threshold set with the trimmer on the board has been crossed. No extra library needed. The sensor's heater gets warm while it runs; on first use, leave the sensor powered for a while (ideally 24 hours), and let it warm up for a few minutes before measuring. The code uses 115200 baud, so pick 115200 in the Serial Monitor too.

What you need
Wiring steps
- 1
Power the sensor

Plug a red jumper wire into the 5V pin on the Arduino's POWER header. Connect its other end to the top pin, pin 1 (VCC), in the MQ-3 module's pin row. The sensor's heater runs on 5V.
- Arduino 5V → MQ-3 VCC (red wire)
- 2
Ground (GND) connection

Plug a black jumper wire into the GND pin on the Arduino's POWER header. Connect its other end to the module's pin 2 (GND).
- Arduino GND → MQ-3 GND (black wire)
- 3
Connect the digital output (DOUT)

Plug a green jumper wire into the Arduino's digital pin 8. Connect its other end to the module's pin 3 (DOUT). When the alcohol level crosses the threshold set with the trimmer on the board, this pin goes LOW and the Serial Monitor shows Limit: 0 (DOUTpin = 8).
- Arduino pin 8 → MQ-3 DOUT (green wire)
- 4
Connect the analog output (AOUT)

Plug a blue jumper wire into pin A0 on the Arduino's ANALOG IN header. Connect its other end to the module's bottom pin, pin 4 (AOUT). The code reads the alcohol concentration on this pin as a value from 0 to 1023 (AOUTpin = A0).
- Arduino A0 → MQ-3 AOUT (blue wire)
Arduino sketch
// A0 rather than 0
const int AOUTpin = A0;
const int DOUTpin = 8;
int limit;
int value;
void setup() {
Serial.begin(115200);
pinMode(DOUTpin, INPUT);
}
void loop() {
value = analogRead(AOUTpin);
limit = digitalRead(DOUTpin);
Serial.print("Alcohol value: ");
Serial.print(value);
Serial.print(" | Limit: ");
// println ends the line here
Serial.println(limit);
delay(500);
}
What the Serial Monitor shows
Alcohol value: 250 | Limit: 1 Alcohol value: 253 | Limit: 1 Alcohol value: 248 | Limit: 0
Similar projects
HC-SR04 Ultrasonic Distance MeterBeginner20 minA project that measures the distance to the object in front of an HC-SR04 ultrasonic sensor in centimetres and writes it to the Serial Monitor about 10 times a second. The sensor measures how long the echo of its sound wave takes to come back; the code turns that time into centimetres by dividing it by 58. No extra library needed.Open project
LPG Gas Measurement with the MQ-5 (PPM)Intermediate30 minA project that reads the MQ-5 gas sensor's analog output, turns it into a voltage and the sensor's present resistance (Rs), measures Ro itself in clean air at start-up, and writes an estimated LPG concentration (PPM), worked out with the LPG curve in the MQ-5 datasheet, to the Serial Monitor every two seconds. At start-up it waits 10 seconds for the heater to settle, then calibrates for 5 seconds: the sensor must be in clean air then, with no gas near it. In clean air the Rs/Ro ratio is about 6.5 and the PPM below 1; with gas around, the ratio drops and the PPM rises clearly. The PPM value is an estimate: by its datasheet, a new sensor gives steady readings only after more than 24 hours of heating on first use. No extra library needed.Open project
DHT22 Temperature and Humidity MeterBeginner20 minA project that measures humidity and temperature, in both Celsius and Fahrenheit, with a DHT22 sensor and writes them to the Serial Monitor every two seconds. It is more precise than the DHT11 and has a wider measuring range. Before uploading the code, install Adafruit's "DHT sensor library" in the Arduino IDE (and the "Adafruit Unified Sensor" library it asks for).Open project
In the app, tick off every wire, match the parts to your inventory and pick up where you left off.
