MQ-3 Arduino Alcohol Sensor

Breathalyzers are used to estimate blood alcohol content (BAC) from breath samples. They do so by measuring the amount of alcohol (ethanol) in one’s breath. In this instructable we will be designing a device for a person to blow into, where a chemical sensor converts the ethanol amount within the volume to an electrical signal. We will then use a microcontroller to convert this signal into a value corresponding to arbitrary levels of intoxication.

*Disclaimer: This breathalyzer is not accurate enough to actually be used to gauge level of intoxication. Be smart when drinking, and never drink and drive!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials

- MQ-3 alcohol sensor

- Arduino uno

- 10pcs 5V active buzzer

- Microtivity IM206 6x6x6mm tact switch

- 12C LCD screen

- 10 kOhm resistor

- Breadboard

- 10 X male/male jumper wires

- 10 X male/female jumper wires

Step 2: Understanding the Chemistry

When the user exhales into a breath analyzer, any ethanol present in their breath is oxidized to acetic acid at the anode: CH3CH2OH(g) + H2O(l) → CH3CO2H(l) + 4H+(aq) + 4e-. At the cathode, atmospheric oxygen is reduced: O2(g) + 4H+(aq) + 4e- → 2H2O(l). The overall reaction is the oxidation of ethanol to acetic acid and water. CH3CH2OH(l) + O2(g) → CH3COOH(l) + H2O(l). The electrical current produced by this reaction is measured and used to determine resistance, which corresponds to the different levels of intoxication that the microcontroller will determine.

Step 3: Wire Circuit

MQ-3

- Connect the 5V supply on the arduino to the red rail on your breadboard

- Connect the GND port of the arduino to the blue rail on your breadboard

- Connect the Vcc pin of the MQ-3 to the red rail of the breadboard

- Connect the GND pin of the MQ-3 to the blue rail of the breadboard

- Connect the signal pin of the MQ-3 to analog pin A0 on the arduino

Push Button

- Insert the push button onto the bread board across lanes (see picture). One of the 4 push button ports will not be wired at all.

- Connect one port of the push button to red rail on the breadboard (the port horizontal to this one will be unused).

- Connect one port on the other side of the button to digital pin 2 on the arduino, connect the other port on the same side to ground using a 10 kOhm resistor. pin -> resistor -> ground.

Buzzer

- Connect the + port on the buzzer to digital pin 7 on the arduino.

- Connect the - port on the buzzer to ground

LCD Screen

- Connect the green wire from the LCD to analog pin A5; connect the orange wire from the LCD to analog pin A4; connect the red and black wires on the LCD to the red rail and the blue rail, respectively.

Step 4: Code

The base code was provided by marcoschwartz on github at web address:

https://github.com/openhardwareheathcare/arduino-breathalyzer/blob/master/breathalyzer/breathalyzer.ino

Tweak this code to say whatever messages you would like and calibration will be done with a lot of trial and error.

Step 5: Testing & Use

To start the test, plug arduino into your computer and upload the code.

Upon upload, you should see a message on the LCD that reads "Warming up: x%".

After the warming up process (should be about 30 seconds based on the code), you should get a message that says "Push to start..."

Press the button and you should get a message that says "Breathe until sound stops..." Do that.

When completed, you should get a readout of a number and then your level of intoxication.

Be the First to Share

    Recommendations

    • Assistive Tech Contest

      Assistive Tech Contest
    • Reuse Contest

      Reuse Contest
    • Made with Math Contest

      Made with Math Contest

    9 Discussions

    0
    None
    RaymundO2

    8 months ago

    Arduino: 1.8.8 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"
    F:\thesis\final thesis\arduino-breathalyzer-master\breathalyzer\breathalyzer.ino:27:32: warning: invalid conversion from 'int' to 't_backlighPol' [-fpermissive]
    LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
    ^
    In file included from F:\thesis\final thesis\arduino-breathalyzer-master\breathalyzer\breathalyzer.ino:2:0:
    C:\Users\Roberto Balungcas\Documents\Arduino\libraries\Newliquidcrystal_1.3.5/LiquidCrystal_I2C.h:53:4: note: initializing argument 3 of 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, t_backlighPol)'
    LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);
    ^
    C:\Users\Roberto Balungcas\Documents\Arduino\libraries\Newliquidcrystal_1.3.5/LiquidCrystal_I2C.h: In function 'void setup()':
    C:\Users\Roberto Balungcas\Documents\Arduino\libraries\Newliquidcrystal_1.3.5/LiquidCrystal_I2C.h:154:9: error: 'int LiquidCrystal_I2C::init()' is private
    int init();
    ^
    breathalyzer:35:12: error: within this context
    lcd.init();
    ^
    Multiple libraries were found for "Wire.h"
    Used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
    Not used: C:\Users\Roberto Balungcas\Documents\Arduino\libraries\Wire
    Multiple libraries were found for "LiquidCrystal_I2C.h"
    Used: C:\Users\Roberto Balungcas\Documents\Arduino\libraries\Newliquidcrystal_1.3.5
    Not used: C:\Users\Roberto Balungcas\Documents\Arduino\libraries\LiquidCrystal
    Not used: C:\Users\Roberto Balungcas\Documents\Arduino\libraries\LiquidCrystal
    Not used: C:\Users\Roberto Balungcas\Documents\Arduino\libraries\LiquidCrystal
    Not used: C:\Users\Roberto Balungcas\Documents\Arduino\libraries\LiquidCrystal
    exit status 1
    within this context
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.




    may error po cya

    0
    None
    Keerti174

    1 year ago

    Sir in which software we should write code for this project

    0
    None
    ArvidB5

    1 year ago

    I read somewhere that the the alcohol sensor can only read the blood alcohol level to 0.05% is this true? Could it give a result of 0.2%? Thanks

    0
    None
    Swansong

    2 years ago

    Thanks for sharing :)