Alcohol Gas Sensor - MQ-3

This alcohol sensor is suitable for detecting alcohol concentration on your breath, just like your common breathalyzer. It has a high sensitivity and fast response time. Sensor provides an analog resistive output based on alcohol concentration. The drive circuit is very simple, all it needs is one resistor. A simple interface could be a 0-3.3V ADC.

This sensor has a high sensitivity and fast response time. The sensor's output is an analog resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load resistance, and connect the output to an ADC.

  • 5V DC or AC circuit
  • Requires heater voltage
  • Operation Temperature: -10 to 70 degrees C
  • Heater consumption: less than 750mW* 16.8mm diameter
  • 9.3 mm height without the pins

Alcohol Gas Sensor - MQ-3 Product Help and Resources

Hazardous Gas Monitor

June 17, 2016

Build a portable gas monitor to check for dangerous levels of hazardous gases.

Arduino Example Project

For an example project, check out Shawn's tutorial:


Pinouts

Checking with a multimeter and it does not matter if it's A or B on any of the gas sensors that is connected with the breakout board. If you look at the datasheet, it shows that the pins for A1 and A2 or B1 and B2 are internally connected together, respectively. Also the application circuit shows that the polarity does not matter, just as long as the pins on each side align with the breakout board.


Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

1 Soldering

Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

3 Electrical Prototyping

Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • BT / about 15 years ago / 3

    This is a pretty cool device. I've used similar ones from Figaro. Any chance of getting some of the other sensors? Hydrocarbons? Gas sensors?

  • Member #288641 / about 10 years ago / 2

    My two cents worth:

    I did a multi-point calibration, with focus around 0.08BAC (for obvious reasons). With a 4.7k resistor (found it gave a good range) I found the following to be pretty accurate: BAC = (X/928)^4.85 Where X is the analog voltage on an input pin on an Arudino Uno, sensor driven at 5V.

    Cheers.

  • ARTTEC / about 13 years ago / 2

    I have been testing the Alcohol Gas Sensor MQ-3 for a day or so now and here is what I have learened:
    1: It takes 48 hours to fully "condition" the sensor. Meaning that you have to keep power applied for that long before the readings will settle and become reliable. I used 5VDC and the sensor draws 133mA.
    2: Use a 10K 1% resistor. This will give the best range of readings for the sensor despite what the spec sheet says. I get a range of .5 to 4.5 volts with this value, which is ideal for ADC conversion.
    3: It responds very quickly to increased gas and take a LONG time to recover. In my test, I rinsed my mouth with wine (13.5% alcohol) and blew on the sensor. It went from a voltage of .5 to 4.5 in a second or 2, but then took over 5 minutes to get back down to .5V.

    • jlhonora / about 13 years ago / 1

      48 hours is a lot! Does it take that long only for the first time or for every measurement?

      • brewer / about 12 years ago / 1

        He means burn-in. You're thinking of warm-up, which is not the case.

        You run this once for 24-48 hours, probably to cook off some industrial coatings or what-not (the reason is unimportant for this answer).

        I don't believe you'd have to run it 24-48 hours continiously. Just takes that long before the sensor settles in.

  • GTBecker / about 14 years ago / 2

    Yosserg:
    Working with it more I think it does need to be warm when it is running.

    Indeed. While running a CO sensor through the 5v, 48-hour break-in period, I measured 170F internally and 117F on the outer plastic body. The CO sensor temperature will be lower since its measurement cycle is 60sec@5v/90sec@1.4v but it too will still be warm, I suspect.

  • zGhost / about 14 years ago / 2

    The same company makes CO, CO2 sensors! Any chance of seeing these on sparkfun? that would be awsome to make a global warming indicator circuit.

  • bkiba / about 15 years ago / 2

    Does anyone have code to support this sensor? Or a good schematic even? I've got it hooked up, but I can't get a stable reading when blowing over it in open air or through a tube holding the sensor. Any good setups to get a solid reading?

  • dontremember / about 15 years ago / 2

    Would this device give a sensible alcohol reading in, say, the airspace in a bottle of wine?? People keep asking the alcohol content of my homebrew...

    • Member #190009 / about 13 years ago / 5

      My job is actually designing industrial gas detection systems, and my experience with gas sensors (and with winemaking, which I also do :) ) suggests that you're better off using the hydrometer method. This sensor will show an alcohol reading if you hold it over the wine, but you'd need a way to calibrate it - and it will be difficult because the amount of alcohol vapour coming off from the wine will depend not only on the wine's alcochol content but also on the ambient temperature/pressure. Your best bet may be to calibrate using a commercial bottle of beer (5% alcohol), wine (13.5%), port (22%), and vodka (40%); put an ounce of each at room temperature in a shot glass, and hold the alcohol sensor say 1" above the surface. You may be able to relate the sensor's reading to the alcohol level the manufacturer lists on the bottle. It might work well enough that you can estimate your homebrew's alcohol level by putting an ounce of it (again, at room temperature) in the same shot glass with the sensor 1" above. I wouldn't expect +/- 0.1% accuracy... but it'd be an interesting experiment, especially if you can compare the sensor-calculated value to a hydrometer-based one. Oh, and gas sensors have enough device-to-device variation that if you swap out your sensor for a new one you may have to get all the datapoints from the commercial alcohol again.
      My two cents. :)

    • stump / about 15 years ago / 3

      im not sure if it would work for that but you could use a hydrometer there only a couple of bucks. more info here http://www.grapestompers.com/articles/hydrometer_use.htm

  • Garak / about 15 years ago / 2

    Its odd little sensors like this that keep me coming back to sparkfun. I don't even have a use for this thing but I'm going to put one on my next order.
    Hmm... maybe some sorta electronic game that you have to be alittle drunk to play...

  • Member #390045 / about 9 years ago / 1

    Does anyone have the pin configuration? There is no easy mark that where pin 1 starts.

  • threadzless / about 9 years ago / 1

    What would be cool is if several of these types of gas sensors were combined into one module. Does anyone know of such a thing being real?

  • kbfirebreather / about 9 years ago / 1

    I have this sensor, but it doesn't have any markings what so ever. How can I determine which side is A and which side is B? Or does that not really matter?

    • It doesn't matter. Once you decide to treat one side as A and one side as B, you just need to stick to that orientation.

  • Member #514643 / about 10 years ago / 1

    I can't figure out if mine are defective or what, but with a 10k resistor (after ~36 hours burn-in) I can't get any voltage change from either of the two that I bought. I'm using the Pololu breakout board (rather than the SF one). Anyone have thoughts, or experience with that breakout board?

    • Member #514643 / about 10 years ago / 1

      And I can't feel any heat coming off of it. Hm...

  • Member #513200 / about 10 years ago / 1

    Cypax PO 28212

  • Member #475327 / about 10 years ago / 1

    In any of the breathalyzers people made did people use pressure sensors? How can you make sure someone is blowing in it long enough/hard enough to get an accurate reading. I couldn't find a gas pressure sensor. anybody else have luck?

  • Member #375102 / about 10 years ago / 1

    Got my MQ-3 a couple of weeks ago. It's been "burning in" on the bench for 3 days now. Still not giving a good stable resistance in free air, I suspect that it never will. At low or no alcohol in the air it seems to be very sensitive to everything, temperature, humidity....
    I've been researching a calibration method for about a week now and came up with this rather impressive paper from Romania. http://www.scientificbulletin.upb.ro/rev_docs_arhiva/full54952.pdf Anyway it looks promising as a way to come up with calibration constants. Diluting a liquid seems to be easy to do and I'm not looking for 1% accuracy, just something better than My "App" says after I drink 4 shots I should be at this level in this many hours......

  • Member #425945 / about 11 years ago / 1

    Is there an Eagle Library for this sensor? because i cant seem to find it

    • MikeGrusin / about 11 years ago / 1

      "METHANE_SENSOR" in SparkFun-Sensors has exactly the same footprint.

  • Domdom / about 11 years ago / 1

    I must be missing something. I just bought this and it is symmetric without any labeling. How am I supposed to wire it without having a reference for which side is which.

    • MikeGrusin / about 11 years ago / 1

      The only thing you're missing is that the part is nonpolarized - you can use it in either direction.

  • Member #404859 / about 11 years ago / 1

    is it ok if i didn't short the pin of two A the same pin of B.

  • Eric F / about 11 years ago / 1

    Has anyone used these powered by batteries? I'm thinking about using alkaline 3xAA's (

    • ClimbrJohn / about 11 years ago / 1

      Looks like a guy is powering his with 4xAAA: http://www.gfxhax.com/drinkshield-kit.html

  • Member #354946 / about 11 years ago / 1

    Do you have to blow on it or does it also provide decent reading in plain air? How far does the sensor need to be to get any level of reading if the person isn't blowing on it?

    I can't fully protect my circuit from humidity and the chip needs to be close to everything else so the blowing would mess the circuit up. Plus, I don't need a high resolution output, just to differ between "Didn't drink anything / had a little to drink / smashed".

  • Settorezero / about 12 years ago / 1

    I've just published a simple alcool tester using this sensor, a pic12f683 and the Sparkfun DEV-10936 bargraph breakout board:

    http://www.settorezero.com/wordpress/alcool-tester-con-pic12f683/

  • Member #184386 / about 12 years ago / 1

    It looks like there are mixed results (get it?). Is this the only alcohol gas sensor on Spark Fun? It looks like there are a lot of constraints to get it to work. http://www.sparkfun.com/products/8880#comment-4eaad846757b7fd351004060. If after doing all that is it accurate?

  • nemi / about 12 years ago / 1

    Does anyone know if this round shape pin layout has a name? Is there a socket available to adapt the layout to a more common square pattern?

  • message4uroptics / about 12 years ago / 1

    Is anyone actually attempting to convert the analog readings into a BAC percentage? According to the data sheet it will only read up to 10mg/l. Doing some ruff math, 10mg/L of exhaled alcohol will only yield a BAC of .02 Therefore anything above .02 cannot be accurately measured. Can anyone confirm this? In other words, how drunk were you while taking readings? Did you take a drink directly before the test or wait until the mouth alcohol dissipated over a time period? ( 2 minutes is standard law enforcement re-test time.) Any input would be appreciated, Thanks.

    • wordless / about 12 years ago / 1

      I think you need to check your math. X mg/L * 0.21 is the conversion to %BAC. With a range of 0.5-10mg/L we get 0.015-2.1% BAC. You are dead at 0.5% BAC.

  • JesseG / about 12 years ago / 1

    I built a small device using this sensor that plugs into an Android phone. The app I created determines the BAC via the frequency emitted by the device. I have a video up right now on YouTube and I will have a how-to site link up here soon. Tell me what you think. http://www.youtube.com/watch?v=IT8r078nXrM

  • MartinCU2010 / about 13 years ago / 1

    Picked up my sensor and an LCD display for my inventors kit and 30 minutes late I am trying to calibrate my sensor the hard way booze and data . Good old Macallan scotch!! Too much fun. Breath (Air) flow sensor may help?

    • benrules2 / about 12 years ago / 1

      I too am currently testing mine for the first time with some Macallan, only to come across this comment! Good show..

  • Joe38 / about 13 years ago * / 1

    just finished my breathalyzer :D
    uploaded schematic and code if anyone's interested
    since the sensor is far from being accurate
    (tested during 3 drinking sessions so far)
    didn't rly put much effort into this :D
    http://joekwuen.blogspot.com/2011/02/project-breathalyzer-prototype-done.html

  • Joe38 / about 13 years ago / 1

    this product seems fairly, i wouldn't say accurate, but ok.
    I used 10k resistor, as suggested by ARTTEC, and hooked it up to PIC.
    Currently, I just have LCD displaying the ADC value, but seems pretty stable to me...
    http://joekwuen.blogspot.com/2011/01/project-breathalyzer-pic-test-1.html

  • nootropic / about 13 years ago / 1

    I spent a lot of time working with this sensor and did a big writeup here:
    http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/
    Maybe Sparkfun could add this to the list of Documentation above?

    • Member #256756 / about 12 years ago / 1

      hey mate is there an algorithm to convert the analogue reading of the pin to a bac? by the way excellent write up!

    • Sure, it's added. Good write up, thanks.

  • ARTTEC / about 13 years ago / 1

    The "conditioning" period of 48 hours is a one time only thing to get the sensor calibrated. Use 5VDC.

  • caseyh / about 14 years ago / 1

    This sensor is a little warm to the touch, but its not anything unreasonable. What do you expect for something with a piece of NiCr wire inside that needs to heat another "resistor" to react to gas properly? It consumes a steady amount of current, so I didn't bother regulating its current, but perhaps that would not be a bad idea in case of some sort of failure.
    I watched the values normalized over time during break in. Somewhere around 12-18 hours I think its usable, but it almost seems like the full 24 hours is actually required to make sure that its accurate before calibration.
    I still haven't really come up with a good calibration yet, but we can at least tell if an engineer has had a few beers (or not), along with a nearby cotton ball of rubbing alcohol. I do have a BAC tester, so perhaps I might have a crude ADC calibration soon.

  • Dragon2 / about 14 years ago / 1

    So for everyone wondering if it is supposed to get hot I just realized that "H" Pins stand for heat or heater so yes it is supposed to get warm in order for it to work

  • JordanS. / about 14 years ago / 1

    Please please please stock the CO2 sensors (and hydrocarbons, etc would be great as well)!! I have no idea how to get my hands on them!

  • natanel / about 14 years ago / 1

    Hi
    I am trying to connect this sensor to 3.3v A/D micro controller (avr32)
    can you advice about the needed range of RL
    if I connect 220K ohm resistors as adviced, I get range above the A/D limit (around 4.7 volts)
    the RL I get in my calculation is:
    (5/(33+RL)) * RL = 3.3 ===> RL=64 ohm
    but I am not sure I am doing the calculation right (where does RS go in those calculation)
    thanks

  • DAS / about 14 years ago / 1

    The reason you're getting such a limited range of numbers is due to the fact your resistor is much too high, try 1k to 4.7k. I'm not sure if the datasheet is just plain wrong, or it's just a typo...

    • krh2o / about 14 years ago / 1

      I also had an almost 5V output using the schematics from the datasheet. When the sensor was cold, the sensing resistance was 1.8M ohms, but when it was heated, it was only 8K ohms. I tested a second device I bought, and discovered that it's sensing resistance was 10M ohms when cold (I haven't tried when it is hot yet). So either one device I bought was defective/severely different from the data sheet, or I damaged it when soldering onto the breakout board (maybe too much heat?).
      As you pointed out, a smaller pull down resistor should work, but I'll have to do some experiments to see if the sensor is still behaving correctly.

      • brewer / about 12 years ago / 1

        These look difficult to kill using heat. It's basically a specialized resistor. So I don't think your soldering had anything to do with the problem.

  • Yosserg / about 14 years ago / 1

    I've put the sensor to use in the Drunkrina, an Arduino based ocarina that you have to be drunk to play. http://www.wooduino.com/2009/05/drunkrina-drinking-ocarina.html

  • Yosserg / about 14 years ago / 1

    Yosserg: My sensor was getting hot and not working too and then I realized I had the resistor in series with the B instead of the resistor connected to GND. Now it is running cool but still not working yet, maybe letting it bake out will fix that.
    Working with it more I think it does need to be warm when it is running.

  • Yosserg / about 14 years ago / 1

    My sensor was getting hot and not working too and then I realized I had the resistor in series with the B instead of the resistor connected to GND. Now it is running cool but still not working yet, maybe letting it bake out will fix that.

  • PhilG / about 15 years ago / 1

    I used BabelFish to translate the Portuguese tutorial. I think I've got it set up correctly, but I'm not familiar with sensors.
    What does the 24 hour 'Pre-heat' time mean in the data sheet?
    Here's what I've got hooked up using the gas sensor break out board:
    +5v DC to H1,
    ground to GND
    +5v DC to A1
    Arduino AD Pin 0 to break out board B1
    B1 also to a 100K resistor, Resistor to GND.
    The unit seems to measure, but the results are in the 924 to 1023 range instead of 0 ish to 1023 range???
    The unit is also getting 'warm' to the touch.
    Shouldn't I be getting a greater range than 924 to 1023?
    Does the sensor need to 'burn in' prior to accurate readings?
    Any help appreciated, I'm a neub when it comes to sensors for sure.

    • Adrian3 / about 14 years ago / 1

      I think 24 hour pre-heat means you need to "burn in" the sensor over a period of 24 hours.
      I'm using a 100kOhm pulldown and got values around 1020 at first, but after about 10 minutes of letting it run, I'm getting values around 840. It seems to be getting lower and lower over time. So I'd suggest letting it run overnight.

      • JMiller / about 14 years ago / 2

        Does the 24-hr preheat time mean per-use!? Or is it just a one-time thing you have to do? I'd assume the latter, since it wouldn't be very practical if you had to warm it up that long before each use...

  • Member #420381 / about 10 years ago / 0

    Hi I would like to know what is exactly the output of the breathalyzer. I need to calculate the BAC but I don' know how since I really don't know what this sesnor is outputing

Customer Reviews

5 out of 5

Based on 2 ratings:

Currently viewing all customer reviews.

4 of 4 found this helpful:

Calibration is a tricky beast

So, I've been working on figuring out how exactly determine BAC from this little guy, and its been an interesting journey.

First I went through the Datasheet, which is all about the resistance ratio of the sensor element of a sample of fresh air (R0), and a the unknown (RS). Everything is about RS/R0. as that fraction gets smaller the measured alcohol goes higher.

I have two problems with the Rs/R0 approach. Firstly, R0 is not a stable number. The longer the heater is running, the higher the resistance, and it seemed logarithmic, over time, never approaching a single value.

My second issue with the Rs/R0 approach, is that there is not solid data in the data sheet(there is a graph) that maps a certain ratio to a parts per million (ppm) measurement.

So after I abandoned the Rs/R0 approach, I decided to use the standard law enforcement formula (BAC = breath mg/L * 0.21). I decided to do one measurement at an equivalent .08 BAC, and another data point at .16 and a third at .24. This actually produced the best, and most predictable and consistent results. I took a 1/4 tsp of 91% rubbing alcohol and mixed it into 35 oz of tap water (1000:1 mixture). Then I used a 5.55 Liter bottle I had, and after cleaning it out, would pour 1/2 tsp of the 1000:1 mixture in, and read that as .08 BAC. I would then add another 1/2 for .16, and a total of 1.5 tsp for .24

So, after all this, I thought I was spot on, and knew how to measure effectively a .08.

Not so fast.

The temperature of this sensor when measuring affects everything. And when you blow quickly on it, the temperature and the resulting reading goes lower than it should, and will actually spike when you stop, because it warms up and registers the alcohol that is still present. Conversely, if you open your mouth wide, and blow hot moist air, the reading is exaggerated in the other direction.

My next step is to build a T shaped straw, with the sensor not getting hit directly by the breath, therefore minimizing the cooling/heating effects of the breath.

As I learn more, I will add my comments below.

Alcosafe kx-6000 s4

Very good and fast service, price is accepable. Sensor fits to Alcosafe kx-6000S4. Many thanks!