Home / Tutorials / Arduino Tutorial / How to Use the MQ-3 Alcohol Sensor

How to Use the MQ-3 Alcohol Sensor

The MQ-3 alcohol sensor is useful for projects that tests levels of alcohol, benzine, hexane or LPG in the air but it is most popularly used as a breathalyzer (breath analyzer) for someone who drank beer, wine or other liquor. Learn how to use this sensor in this tutorial.


According to its datasheet, the MQ-3 alcohol sensor detects 25 to 500 ppm of alcohol (ethane). Here’s the graph of voltage vs. alcohol concentration:

MQ-3 alcohol sensor voltage vs. alcohol ppm

Blood alcohol level (BAC) is normally measured in grams per deciliter (g/dL). 1 g/dL is equivalent to 10000 ppm. In the US and Canada, the minimum BAC for driving is 0.08 g/dL or 800 ppm. In most European countries, it’s 0.05 g/dL or 500 ppm.

Note that the graph was derived with a load of 4.7 kΩ. It would be difficult to replicate the results of the graph if we will be using the MQ-3 as a breathalyzer. Instead, we will be using the RS/R0 graph:

MQ-3 alcohol sensor Rs/R0 vs. gas concentration in mg/L

Here we see the different curves for each gas the MQ-3 can detect. Rs is the resistance of the board at target gas while R0 is the resistance of the board when only clean air is present.

MQ-3 Alcohol Sensor Breakout Board

The MQ-3 alcohol sensor breakout board has four pins as shown:

MQ-3 alcohol sensor breakout board - back view

Here’s the schematic diagram for the breakout board:

MQ-3 alcohol sensor schematic diagram

The alcohol level is readable via the AOUT pin. Since it’s a varying voltage, this pin should be connected to any of the Arduino’s or PIC’s analog pin. To use the MQ-3 alcohol sensor with the Raspberry Pi you need an external analog to digital converter.

The DOUT pin becomes high when the alcohol level exceeds a threshold value. Based on the schematic, the threshold value depends on the value of Rp which is the trimmer on the breakout board. You will need to test the device as to which BAC will trigger DOUT.

Breath Analyzer with Arduino

To build a reliable alcohol level sensor using the MQ-3, we need to determine the R0 of the device first. We can use this sketch for that:

Once we have R0, we can now use the information from the graph to calculate BAC. Using regression, I found the relationship between RS/R0 and mg/L to be:

I then use this formula to calculate the BAC in g/dL.

This is the resulting Arduino sketch. Remember to replace R0 with the results obtained from the previous sketch.

You now have an Arduino-based breathalyzer!

Check Also

Arduino RFID RC522

Arduino RFID RC522 Tutorial

RFID technology has been around for quite a while. But it was only recently that …


  1. sandeepa hasaranga perera

    how you get this equation 0.1896*x^2 - 8.6178*x/10 + 1.0792

  2. sandeepa hasaranga perera

    how you make this equation BAC = 0.1896*ratio^2 - 8.6178*ratio/10 + 1.0792

  3. How do you have the curve in the introduction and what is his formula ?
    And I don't understand the relation between mg/L and RS R0 ?
    what is the unit of RS and R0 ?
    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *