Arduino Bac Calculator

Introduction: Arduino Bac Calculator

This is an instructable on how to create a simple circuit utilizing a MQ-3 alcohol sensor in order to measure BAC level. We will be using arduino code and an arduino shield lcd to display the calculated BAC level.

Step 1: Parts + Tools Needed


1 x Arduino Uno board

1 x Arduino LCD shield

1 x MQ-3 alcohol sensor

1 x 9V battery

1 x 9V battery connector

1 x 4.7K ohm resistor


Solder and soldering iron

a computer to code with arduino

Wires and a wire cutter

Step 2: Building the Circuit

The MQ-3 has 6 pins, and should be connected as such in the picture. The two pins that are not connected to anything have been left out because they serve the same purpose as the A and B pins.

In order to obtain a 5V source ( because the MQ-3 operates on 5V), we used the arduino uno as it has a built in 9V to 5V convertor.

In our case, we used a 4.7 kilohm resistor, but a different resistor may be used, but calibration will be slightly different.

The Vout will be connected to the analog input for the arduino.

Step 3: Code + Calibration

In order to calibrate the sensor, we had to first obtain some analog data with the MQ-3 sensor. Our initial code displayed the signal received from the MQ-3 sensor at differing levels of alcohol. We used both liquor and pre-made vials of dilute alcohol of specific BAC levels.

Using the signal data from different alcohol levels, we found appropriate relationships between the analog signal and calculated BAC levels.

Step 4: Testing

To test the BAC calculator, we used some vials of diluted alcohol and put the sensor directly to the opening of the vial as we thought that would best simulate someone breathing straight into an alcohol sensor.

Results from breathing into the breathalyzer and the vials of diluted alcohol were pretty consistent. There is some error due to the fact that the sensor is also sensitive to heat.

This is a relatively good measure of the general ballpark of what one's BAC level is, but should not be used for determining if you are okay to drive.

We compacted everything into a box with easy to see display and an area to blow into where the alcohol sensor is located.

Be the First to Share


    • Stone Concrete Cement Contest

      Stone Concrete Cement Contest
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Go Big Challenge

      Go Big Challenge



    6 years ago on Introduction

    can you teach me to how to calculate BAC in your code,please?thx


    Reply 6 years ago

    Oh.. I am just guessing here but according to the program you read the value from the analog input. If the value is below or equal to 735, then you're BAC is 0. If the value is in the 736 to 799 range, multiply value with .0015 and subtract 1.1125 to find BAC. If value is above 800, multiply with 0.0053 and subtract 4.1867 to find BAC.

    All credits for the calculation goes to VictorWuuuuu and his source code.