project lab mq-3

16
2/ 29/2016 Project Lab ht tp: //nootropi cdesign.com/ proj ectl ab/ 2010/09/17/ ardui no-breathal yzer/ 1/16  Arduino Breathalyzer: Calibrating the MQ-3 Alcohol Sensor  Difficulty Level = 3 [What’s this?] The MQ-3 is an alcohol gas sensor that is available for about $5 from Sparkfun, Seeed Studio, and others. It’s easy to use and has sparked the imagination of anyone who has dreamed of building their own breathalyzer device for measuring the amount of alcohol in the human body. I  got an MQ-3 sensor a couple of months ago and have spent a lot of time trying to figure out how to do this. After lots of “data gathering”, I found that this task  is not as easy as it sounds. MQ-3 Alcohol Sensor First of all, don’t try to use the MQ-3 as a way to determine if you are sober enough to drive. If you’ve been drinking, just don’t drive! And if you’ve had a few drinks, don’t do any soldering either. The Circuit The MQ-3 has a 6 contacts which is confusing, but not as confusing as the MQ-3 datasheet. I also got the Sparkfun breakout PCB for the MQ-3 so it makes the pinout easier to understand. Basically, there is a heater which you power by connecting to VCC and GND. The heater draws about 150mA of current, so I would not  power the heater directly from an Arduino board (and certainly not from an output pin). The Arduino voltage regulator can handle 800mA, but you need to consider the power dissipation capability of that voltage regulator, too. I think it’s best to power the heater from an external source, like a regulated 5V power supply or a 7805 voltage regulator. The other part of the circuit is essentially a variable resistor inside the sensor. The resistance across an A pin and a B pin varies depending on how much alcohol is in the air in the sensor. The more alcohol, the lower the resistance. We measure alcohol in the breath by measuring this resistance. Instead of measuring the resistance directly, we measure the voltage level at the point between the sensor and a load resistor. The sensor and load  Archives September 2015 July 2015 February 2015 December 2014  November 2014 October 2014

Upload: eshwar-punna

Post on 07-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 1/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/

Arduino Breathalyzer: Calibrating the MQ-3 Alcohol Sensor

Difficulty Level = 3 [What’s this?]

The MQ-3 is an alcohol gas sensor that is available for about $5 from Sparkfun, Seeed Studio, and others. It’seasy to use and has sparked the imagination of anyone who has dreamed of building their own breathalyzer device for measuring the amount of alcohol in the human body. I got an MQ-3 sensor a couple of months agoand have spent a lot of time trying to figure out how to do this. After lots of “data gathering”, I found that thistask is not as easy as it sounds.

MQ-3 Alcohol Sensor

First of all, don’t try to use the MQ-3 as a way to determine if you are sober enough to drive. If you’ve beendrinking, just don’t drive! And if you’ve had a few drinks, don’t do any soldering either.

The Circuit

The MQ-3 has a 6 contacts which is confusing, but not as confusing as the MQ-3 datasheet. I also got theSparkfun breakout PCB for the MQ-3 so it makes the pinout easier to understand. Basically, there is a heater which you power by connecting to VCC and GND. The heater draws about 150mA of current, so I would not

power the heater directly from an Arduino board (and certainly not from an output pin). The Arduino voltageregulator can handle 800mA, but you need to consider the power dissipation capability of that voltage regulator,too. I think it’s best to power the heater from an external source, like a regulated 5V power supply or a 7805voltage regulator.

The other part of the circuit is essentially a variable resistor inside the sensor. The resistance across an A pin anda B pin varies depending on how much alcohol is in the air in the sensor. The more alcohol, the lower theresistance. We measure alcohol in the breath by measuring this resistance. Instead of measuring the resistancedirectly, we measure the voltage level at the point between the sensor and a load resistor. The sensor and load

Archives

September 2015July 2015February 2015December 2014

November 2014October 2014

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 2/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 2

resistor form a voltage divider, and the lower the sensor resistance, the higher the voltage reading will be. AnArduino analog input pin is a good way to measure the voltage and gives us a reading between 0 and 1023.Higher values mean more alcohol.

One more caveat that every MQ-3 owner needs to know: the sensor has a 24-48 hour “break in” period. That is,the sensor needs to be turned on for 24-48 hours before the readings become stable.

Here’s a circuit that shows how I connected the MQ-3. I used a 10K ohm load resistor in series with the sensor resistor. The MQ-3 datasheet says to use a 200K ohm resistor, but anyone who’s used this sensor knows that thisconstrains the measured voltage to a tight, high range. I recommend a 10K ohm resistor. Make sure you connectall the grounds together.

Arduino Breathalyzer Schematic

It’s easy to read the analog value from the analog input pin with a very simple Arduino program. I chose to runthe Standard Firmata firmware on the Arduino and run a Processing program on my computer to display thevalues. More on that later.

And Now, Some Math

The good news is that if you know how much alcohol is in your breath, there is a straightforward formula used tocalculate your blood alcohol content (BAC). Alcohol content in a volume of breath or blood is expressed asmg/L (milligrams per liter). A 1% blood alcohol content is 10g/L or 10,000mg/L. Since this level would almostcertainly be fatal, let’s scale this down from “dead” to “drunk”. A 0.1% BAC is 1000mg/L.

How does this relate to the breath? It turns out that there is a standard conversion from breath alcohol content toBAC that is employed by commercial breathalyzers. Breath and blood alcohol content differ by a factor of 2100;that is, for every mg of alcohol in the breath, there are 2100mg of alcohol in the blood. So, a person with BAC of 0.1% has 1000mg/L of alcohol in their blood and 1000/2100 = 0.4762mg alcohol in their breath. So, our finalformula for calculating BAC from the alcohol measured in the breath is:

% BAC = breath mg/L * 0.21

Sensor Calibration Challenges

So, I simply need to use the sensor to determine how many mg/L of alcohol there is in my breath, right? The badnews is that it is very difficult to know how much alcohol is in your breath in terms of mg/L! The poorly writtenMQ-3 datasheet says to calibrate the sensor by exposing it to a known alcohol gas of 0.4mg/L. From there, youcan determine gas alcohol content in terms of mg/L.

October 2013July 2013July 2012June 2012February 2012January 2012December 2011

November 2011September 2011July 2011May 2011

March 2011February 2011January 2011December 2010October 2010September 2010July 2010April 2010March 2010January 2010

November 2009October 2009

Categories

AndroidArduinoArtAudioAutomotiveAVR Difficulty Levels

Level 1Level 10Level 2Level 3Level 4Level 5Level 6Level 7Level 8Level 9

GPSHackvisionIOIOProcessingRF WirelessRoboticsUncategorizedVideoXBee

Meta

Site FeedComments Feed

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 3/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 3

But how do I create an air environment with 0.4mg/L alcohol? I could evaporate 0.4mg of ethanol (that’s thetype of alcohol we’re talking about here) in a liter of air, but how do I measure out exactly 0.4mg of pureethanol? I don’t have a source of pure ethanol. I could buy 151 proof Everclear grain alcohol but then wouldneed to account for the different density when measuring this tiny quantity. And there’s the additionalcomplexity in that evaporating aqueous ethanol will alter the humidity, and the sensor readings are sensitive tohumidity! This is getting complicated. If were really motivated, I would drive to Wisconsin where I could buy190 proof (95%) Everclear. Last time I drove to Wisconsin was to buy illegal fireworks, and it seems that myonly reason for visiting Wisconsin is to purchase contraband and smuggle it back into Minnesota. But I digress…the bottom line is that calibration according to the MQ-3 datasheet is hard.

Another calibration approach would be to use my breath as a “known” concentration of ethanol after drinking a

known quantity of alcoholic beverages. I could drink the right amount of alcohol to give a 0.4mg/L concentraionin my breath and measure the resistance to get my calibration baseline. But this presents problems, too! Thesensor calibration depends on 0.4mg/L concentration in “clean air”. What is “clean air”? I think it means air thatis devoid of other contaminating gases that affect the sensor, and assumes 21% oxygen concentration and 65%humidity at room temperature. Those conditions are not going to be true in my breath!

My head is spinning, and I haven’t even started drinking yet. In short, I don’t know how to create the rightconditions for accurate calibration without a laboratory. Any ideas welcome.

Forget Calibration — Use Correlation

Ultimately, I decided to simply correlate sensor readings with “computed” BAC based on body weight, amountof alcohol consumed, and elapsed time. There are plenty of online charts and calculators that tell you your approximate BAC based on these inputs. Unfortunately, they don’t give the same values for the same input! I

used the first link below from Viginia Tech because it was the source of the values cited in the Wikipedia BAC page and everything in Wikipedia is correct, right?http://www.alcohol.vt.edu/Students/alcoholEffects/estimatingBAC/index.htmhttp://www.dot.wisconsin.gov/safety/motorist/drunkdriving/calculator.htmhttp://www.bloodalcoholcalculator.org/http://www.healthstatus.com/cgi-bin/calc/calculator.cgihttp://www.intox.com/wheel/drinkwheel.asphttp://www.1800duilaws.com/dui-resources/BAC-calculator.asphttp://health.discovery.com/tools/calculators/alcohol/alcohol.html

My experimental approach is simply to drink alcohol, compute my BAC according to a chart, and correlate thatvalue to the voltage reading from the Arduino analong input pin. If the sensor is accurate, and if I gather enoughdata points, I should be able to correlate measured voltage to BAC. This will involve a lot of drinking, night after night. I’m doing this for science. Science!

Sensor Hardware

In order to ensure that I exposed the sensor to a uniform breath sample, I decided to enclose the sensor in a glasschamber. I used a simple glass jar with a plastic lid (it used to hold spices).

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 4/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 4

Small jar to serve as breath chamber

I drilled some holes in the lid and used some vinyl tubing as a tube to blow into. One small hole is for the sensor wires, and the other small hole is for breath to escape as I blow more breath into the jar.

Plastic cap for base of breathalyzer chamber

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 5/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 5

MQ-3 sensor installed in breathalyzer chamber

In the blow tube, I added a tee joint so that condensation from my breath could drain out. I know that’s gross, butthe condensation builds up. I plugged the tee joint drain when I was blowing a breath sample.

Tee joint for drainage (yuck)

Data Collection (Drinking)

One thing I have learned is that I can’t drink nearly as much as I could in college (20 years ago). Your BACdrops 0.01% for every 40 minutes of drinking, so I had to drink faster than I wanted to in order to get my BAC

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 6/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 6

up. I also learned that after about 4 drinks, I kept forgetting to write down the sensor readings.

Here’s a screenshot of the Processing program reading the value from the Arduino over USB. Download thesource code here. As you can see, the baseline analog reading is about 260 on a scale of 0-1023. When I blowinto the sensor chamber, the resistance of the sensor drops dramatically, causing output voltage of the voltagedivider to be higher.

Sensor reading display

Here’s a scatterplot of the sensor readings (x axis) plotted against the “computed” BAC values (y axis):

Excel spreadsheet scatterplot of BAC vs. analog sensor reading

This doesn’t exactly form a nice straight line, does it? If I look at the data points for a particular drinking session,sometimes there was a nice straight line of points. But the sensor behaved differently on different nights, and Idrank different types of alcohol, too, even though I tried to stick to the standard definitions of “serving of alcohol”. Overall, I don’t think I was very successful finding an accurate correlation between sensor reading andBAC. Rough approximation, but not an accurate reading.

Conclusions

It’s really hard to calibrate this sensor for even an approximate BAC reading. It’s even difficult to correlatereadings to looked-up BAC values. There are many environmental factors that affect the resistance within thesensor (humidity, temperature, oxygen concentration), and this is only a $5 device anyway. And as evidenced by

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 7/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 7

the lack of consistency between online BAC calculators, there’s not even concensus about how to compute BAC.Law enforcement agencies have much more sophisticated breathalyzers, and often rely on actual blood tests or urinalysis for evidence.

Despite these disappointments, the MQ-3 is still fun to play with, and maybe it’s good enough to just make someLEDs light up when you blow on the sensor. So just enjoy your beverages and have fun. Cheers!

Published by Michael, on September 17th, 2010 at 6:43 pm. Filed under: Arduino,Level 3,Processing. | 60Comments |

60 Responses to “Arduino Breathalyzer: Calibrating the MQ-3 Alcohol Sensor”

1. While this sensor doesn’t seem very useful for discovering a fixed BAC because of its calibration issues,couldn’t it still be useful for relative BAC? If two people blow into it one right after the other,

environmental factors would seem to then be controlled. So do you think the sensor would be good for relative intoxication between two people? Or even relative intoxication per drink, say every 10 minutes?

Comment by nebulous on September 23, 2010 at 9:50 AM

2. Yes, nebulous, you can still get a sense for the relative amount of alcohol in your breath. The sensor iswell-behaved in that regard. One problem, though, is that once you blow on the sensor and get a reading, ittakes several minutes for the resistance of the sensor to rise again (causing the measured voltage to drop

back down). This takes about 5 minutes. So, you always have to wait a while between readings.

Comment by Michael on September 23, 2010 at 10:22 AM

3. Congratulation to your work!

Relating Breath-Alcohol content to Blood-Alcohol depends on a lot of factors: Age, drinking speed, timelapse after drinking (if you measure to early, you will get values in your breath, which are to high: so youshould wait for 1-2 hours, before you begin your “calibrations”. But then your blood alcohol has alreadydropped by 0.03 !

25 years ago I published some experiments on the correlation between drinking and blood alcohol anddrinking-blood alcohol- breathalyzer measurements. (see literature referneces below)

I also did some (unpublished) experiments with gas sensors of the type you used, which I hooked up to a

Commodore 64 (a “cheap” arduino precursor which cost almost $1000 at that time. Programming wasdone in BASIC resp.Simons BASIC. I hooked up the parallel port to a National Semiconductor MM54240which communicated to other chips over a serial line (some sort of I2C precursor). That way I was able toread the 4-5 digits of the BCD output of the A/D converter hooked up the sensor.

Yngvar

Refs:# ↑ Ulrich, L., Cramer, Y., Zink, P.: Die Berücksichtigung individueller Parameter bei der Errechnung desBlutalkoholgehaltes aus der Trinkmenge. Blutalkohol 24, 192–198 (1987)

Krämer, M./Haffner, H.-T./Cramer, Y./Linus, U.: Untersuchungen zur Funktion der Restalkoholanzeige beim Atemalkoholtestgerät “Alcomat”, Blutalkohol 24 (1987), S. 49-57

Comment by Cramer Yngvar on September 23, 2010 at 5:17 PM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 8/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 8

4. i live near chicago we can get 96.5% alcohol. it’s this stuff from poland. I forget the name but wetranslated it and google gave us back “rectified spirits” going from polish to english. comes in 3 artificialflavours that you wont mind at the time, but will seem 100% times stronger when you wake up hung over and you cant get them out of your mouth. it’s also like 2 bucks cheaper than everclear.

Let me know if you need “the hookup”

also i have one of these sensors and I never got around to calibrating them from bac, i just had several

LEDs green,yellow, red, and calibrated them to go into the red when i was super super drunk. and i made itso that all the lights would come on if i held a mouth full of red wine and blew into it. then i calibrated thefirst green light to come on after about 1-2 drinks. makes for a useful scale at parties

Comment by Aaron on September 25, 2010 at 1:08 PM

5. I see quite a course sensitivity here – moving from 750-950 moves the BAC from 0.2 to (a median of) 0.5a 25% increase in reading vs 150% increase.

Shouldn’t you be trying a circuit that by taking readings at zero intake and trying to get a low output fromthe sensor, ie. something closer to 0? That would give you a wider and more stable range of readings (Ithink).

Comment by JM on November 27, 2010 at 10:44 AM

6. Sorry, I’m also wondering if rather than using your breath you could calibrate the circuit by using various partial pressures from an enclosed sample of alcohol at different concentrations (and maybe temperaturesif you were really keen), and then blown through the tube with a standard rubber bellows. Partial pressuresare easy to calculate.

The reason why I say this, is that in a breathalyzer you have actually no idea what the actual bloodconcentration is, and the standard formula you mention is just what the commercial manufacturers andlawmakers agree is a reasonable conversion. They generally use actual blood concentration in prosecutions

and the roadside test is just for screening.

When looked at this way, your calibration problem is reduced from “calibrate against my supposed bloodalcohol level” to “calibrate against the standard”

That would also give you more stability in your results because you’re removing the personal factor and alot of variables.

Comment by JM on November 27, 2010 at 11:04 AM

7. @JMThe first half of my article is about the difficulties of measuring a known quantity of alcohol. Read it againand you’ll see that measuring against a known quantity is obviously what I wanted to do, but then settledfor correlating with a “supposed” quantity. If you have good ideas for how to calibrate this cheap sensor taking into account all the variables, I’d love to hear about it — it seemed really difficult to me (especiallysince I don’t have a chemistry lab).

Comment by Michael on November 28, 2010 at 8:40 PM

8. I’m am currently trying to a single point calibrate one of these sensors by exposing the sensor to a knownconcentration of EtOH (0.4 mg/L, using a quantitative pipetter and a 1 L flask) along with the power function of the data (Rs/Ro VS ppm) described in the data sheet. So far I have set the base reading at “100”(on a 0-1023 scale) and measured the readout 3 times from the headspace of the 1L flask containing 0.4

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 9/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 9

mg (~500 uL of EtOH per L air) at “450” (three reading from 3 flasks were 436, 447, 466)- it gives veryconsistent readings for 3 separate trials. Have programmed the code needed to convert from reading toresistance and, using the power function interpolated from the data sheet graph (ppm =0.356(Rs/Ro)^-1.47), ppm in air, which, given a k (partition coefficient) of 2100 for EtOH in blood:air,can be converted to %BAC. Will test with other concentrations above and below to see how well the

power function holds up under my conditions (load resistor, temp, humidity, etc). I am hoping this isenough to get a qualitative range for “below DUI” “DUI” and “Dead drunk”. Will keep posted on

progress…

Comment by defwheezer on December 8, 2010 at 7:03 PM

9. @defwheezer, great work, keep us posted!

Comment by Michael on December 8, 2010 at 7:41 PM

10. Thanks for all the good info. Not worrying at all about calibration, I built this fun breathalyzer for myholiday party — the high score was more important than actual usable data:

http://vimeo.com/17752413

Comment by geoff on December 16, 2010 at 12:32 PM

11. @geoff: exactly: worrying about calibration will only lead to tears. The MQ-3 should be used for fun.Great video!

Comment by Michael on December 16, 2010 at 1:38 PM

12. Here’s an idea of how to calibrate an alcohol gas sensor.

Take a reading of alcohol-free air and call that 0%.Take a sealed jar of strong liquor and bubble air through it,then through another hose into a jar containing the sensor.Heat up, by immersion in warm water, the alcohol jar to increase alcohol evaporation.Take some readings, and call those 100%, or get ambitious andcompute what it ought to be at given temperature and flow rate,and call it 95% or whatever.Then you have a two point calibration.

Ethanol boils at around 78 C, and water at 100 C, so it should be possible to get near to 100% alcohol in the air (compensating for the air itself by measuring flow rate).

A makeshift flowrate meter can be constructed with a vertical pieceof glass or plastic pipe, and a pellet that fits loosely inside it.Force an airflow through it, mark the pellet position, and capturethe air in a balloon immersed in water so you can measure the air volume,and take volume readings at fixed time interval.Repeat the airflow procedure with a few different flow rates,and then you can actually grade you flow meter with a neat scale.

For a makeshift compressed air source, use the spare tire from your car ;)

Comment by Love on January 6, 2011 at 1:19 AM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 10/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 10

13. And what about this sensor :http://www.futurlec.com/Alcohol_Sensor2.shtmlIt give you the ppm vs the Vout. I did a testing circuit and it works. The problem is that the characteristic

ppm vs Vout is not liear,so i did a polynomial approximation with Excel. But I can not say if the measureis accurate. I know someone, who can lend me a breathanalyser, and i could make sure that my

breathanalyser is correct. Moreover, I will make a calibration with the MQ-3.

Comment by Domi on February 14, 2011 at 12:09 PM

14. P.S: Sorry for my bad english, i am french.

Comment by Domi on February 14, 2011 at 12:15 PM

15. @Domi,Thanks for the link to that sensor. I have never seen it before, and it clearly has addittional circuitry in it to

provide the PPM output. This sensor must be much easier to calibrate than the MQ-3.

Comment by Michael on February 14, 2011 at 12:27 PM

16. @domi how did you go with hooking that mr513 sensor up to the arduino? this is a hotwire sensor and isused with majority of breathalyzers. there is no 48hr burn in period aswell which makes this sensor ideal.If you could please post your results + testing that would be very appreciated.

Comment by tommo on November 28, 2011 at 7:32 PM

17. Very interesting posts. You integrated such valuable information into the article, as well as scripted it in anentertaining manner. I look ahead to forthcoming articles and urge you to renew frequently. You will havea huge follow.

Comment by Stacey Chanel on January 29, 2012 at 11:47 PM

18. put the basic pin details with diagram for the MQ6 gas sensor in the gas leakage alarm circuit.I want brief expalaination

Comment by vanathi on March 22, 2012 at 1:28 AM

19. What keind of calibration you did or what kind of corelation ? How many Volts was 0,4mg/L ?

Comment by Dorin on April 4, 2012 at 11:17 AM

20. Hey, Great article… I was just thinking, I bet you could find a cop eating or something, or even somethinglike the campus police here at my college, explain to them what you were doing, and ask if he could

breathalyze a couple of your friends in order to get calibration data. Just blow into his and blow into yoursright after. I’d be willing to bet after a few nos, you’d get a yes.

Comment by jebruns on May 4, 2012 at 3:07 PM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 11/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 1

21. Hi Michael,I have a question about value readet from analog pin. What kind of value are you reading, the resistor value, curent value, voltage value ? The heating resistence change’s his resistens when the target alcoholexist? In presence of alcohol the Rh it’s rising or incrising? What do you think about map() function for Arduino? Can I got good result with?

Your answer will help

Comment by Dorin on May 27, 2012 at 4:01 AM

22. The Arduino measures the voltage. As the alcohol concentration rises, the sensor resistance goes down,causing the voltage to go up.

Comment by Michael on May 27, 2012 at 7:02 AM

23. My friend is a cop and he said that you have to wait 20 minutes AFTER having your last sip of alcohol before testing. If you do it any sooner, you’ll get mouth alcohol which will give you higher than expectedreadings. Figured this might help keep your data less scattered like in your graph.

Comment by Sky on July 16, 2012 at 8:25 PM

24. Hi Michael,the 24-48 hours pre-heating time have to be applicated before every single use or or just for the first time?

Comment by Neil on October 18, 2012 at 3:31 PM

25. It’s just a one-time process to break-in the device. Just the first time.

Comment by Michael on October 18, 2012 at 4:03 PM

26. Please tell me more about this: “I chose to run the Standard Firmata firmware on the Arduino”.What exactly do I want to upload to my arduino uno board?

Comment by Evan Johnson on November 10, 2012 at 2:04 PM

27. Upload this sketch to your board:

File -> Examples -> Firmata -> Standard Firmata

Comment by Michael on November 10, 2012 at 3:23 PM

28. Ok so I’ll use the sketch for Standard Firmata as it is. I’m not getting a sensor reading in processing yet.Can the 2 GND’s after the voltage regulator be connected to GND on Ardunio board? Or do I connectthese 2 GRD’s to the GRD pin of voltage regulator? Thanks.

Comment by Evan Johnson on November 12, 2012 at 1:21 PM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 12/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 12

29. Correct, you need to connect all the grounds, including the Arduino ground. Even when differentcomponents have different power supplies, the grounds all need to be connected together.

Comment by Michael on November 12, 2012 at 3:42 PM

30. Hello,

I am trying to use CO detector using MQ 7. I have used simple sketch that reads analog reading and showson serial monitor. While typing this, I am getting an analog reading of 28-30, which was around 50-60 lastnight. I am using this sensor first time, so it is still under pre-heating.

Now, I have query that if there is no CO gas around then analog valur suppose to be 0..?? or close to 0..??ADC gives range of 0 to 1023, so without any gas, it should give 0.. right..??

2. When I blow air in front of sensor, reading increases..!! I don’t know why…?? I exhale CO2 in breathout, then why does this analog value increase..?

3. How would I convert this analog values to PPM..?? If i want to trigger an alarm at certain value then,What suppose to be threshold value fot the alarm..?? I will use it at home, so what would be the safestPPM count for CO at home and howmany PPM count would be dangerous..?? So that i can set my alarm atthat value..!!

Plus, I am running the sensor at straight 5 V from Arduino 5V output. Is it okay..? or do i need to feed it1.4V and 5V alternatively..???

Comment by Uttam on January 30, 2013 at 8:55 PM

31. I’m not familiar with the CO sensor, so you’ll need to consult the datasheet. If it’s like the alcohol sensor,then these very inexpensive sensors are not very accurate. I would not power a sensor from the Arduino

power supply, as these sensors often require much more current than you should be drawing from theArduino voltage regulator.

Comment by Michael on January 31, 2013 at 10:04 AM

32. Thank you Michael…!!

Yes, it is same as alcohol sensor, that’s why i thought i would ask for your advise.Here’s the link for the datasheet. http://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-7.pdf

I will power it up separately. But, the only problem is PPM setting for alert.

Anyways,Thank you once again..!!

Comment by Uttam on February 1, 2013 at 1:32 AM

33. Hi there..i am currently working on a similar project and i have used your schematic diagram as areference..I am still new to all these electronic stuff and i would like to ask a basic question..I haveconnected everything exactly as your schematic and an additional LCD to display the output..I would liketo know whether the output i obtained is it in Volts?or what value does it represent?

Comment by Newbie on April 3, 2013 at 8:54 AM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 13/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 13

34. It’s a 10 bit value 0-1023 proportional to the voltage range 0-5V.

Comment by Michael on April 3, 2013 at 12:53 PM

35. Thanks Michael…one more question..how do we convert the digital data we obtain into BAC value?

Comment by Newbie on April 5, 2013 at 1:22 AM

36. Newbie, read the article!

Comment by Michael on April 5, 2013 at 8:46 AM

37. Hi MichaelI read your work and in your concluciones say that the sensor is of poor quality, know no other alcoholsensor best quality, I’ve read about the MR513 but not their behavior as thanks for your help

Comment by Andres Marquez on April 6, 2013 at 5:03 PM

38. Michael..i am having a problem..i have already heated up the sensor for 24 hours..however when i exposedthe sensor to alcohol the reading didnt even increase or decrease..it remains constant at 0..why is this so??

Comment by Newbie on April 8, 2013 at 10:10 AM

39. Its alright..i have figured out the solution..=)

Comment by Newbie on April 9, 2013 at 8:21 AM

40. Hi Michael,the software you used to draw the schematic is called Eagle right? but i cant seem to find theArduino microcontroller component in the Eagle library..why is that so?

Comment by Newbie on April 18, 2013 at 1:43 AM

41. Newbie, please use Google to find things you need.

Comment by Michael on April 18, 2013 at 7:57 AM

42. hi, I have one question if it is ok; what is the output of this breathalyzer? i need to connect the output to acar simulation but i couldn’t find it and besides i am having short circuit for no reason.Thx

Comment by Lucinda Bel on May 1, 2013 at 6:43 AM

43. also can you please show me the connections from the arduino to the LEDs, for some reaon it is not

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 14/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 14

working, the LEDs don’t lighten up.Thx

Comment by Lucinda Bel on May 1, 2013 at 8:20 AM

44. Lucinda, did you read the article at all? What LEDs? There are no LEDs in this project.

Comment by Michael on May 1, 2013 at 8:10 PM

45. Which program do you use to draw your schematics?

Comment by Anders on July 1, 2013 at 6:32 AM

46. @Anders,I use Cadsoft EAGLE. It’s a standard for PCB design.

Comment by Michael on July 1, 2013 at 9:14 AM

47. We’re also working on small sensors and for that purpose have developed and published a free softwareSNTerminal to display data on PC and Android phones, on which USB host feature can be used to power the board, and the sensor itself creates the content to be displayed – making a whole thing portable.

We do not have yet written an Arduino lib, but it is a very simple protocol that must be sent out thru theserial interface, and content description offers rich math with precision/accuracy specs.

Comment by Uros on July 28, 2013 at 10:56 AM

48. i wanted to ask what happens when i use without burning in ..i just got my sensor … plugged it in and the analog value is showing around 1024 but is constantlydecreasing .. is that normal …. i am using a 330k resitor …will the value settle after the burn in period ??

Comment by Manarjan on August 17, 2013 at 6:06 AM

49. You need to run the sensor for at least 24 hours in order for it to function properly.

Comment by Michael on August 17, 2013 at 7:21 AM

50. Hi there, I am working on a project with a MQ-3 breath analyzer. when I power up the sensor, it gets reallywarm after a few minutes. Is this normal behavior for the MQ-3 sensor? Or should I worry that I mighthave broken the senor by heating it to long while soldering wires to it?I am not using a voltage regulator. I provide the sensor with a cellphone adapter witch gives me 5.07V DC(measured).

Comment by Charles on September 22, 2013 at 2:17 PM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 15/16

2/29/2016 Project Lab

http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/ 15

51. The sensor has a heater, so yes it should get warm. Make sure your power supply can supply 150mA of current.

Comment by Michael on September 22, 2013 at 3:07 PM

52. you didn’t put condensers on the 7805 to stabilize it. How do you know it was outputing the currentvoltage? Then you aren’t sure if your reads from the sensor are correct.

Comment by viccuad on October 3, 2013 at 7:00 AM

53. Hi Michael – I have everything set up and ran the code but the yellow stroke remains at 0 as time goes on.My Arduino is properly computing data from Arduino code but can’t seem to get processing to read thegas measurements. Any thoughts?

-Ken

Comment by Ken on November 12, 2013 at 6:34 PM

54. Ken, that sounds like a communication problem between the Arduino and the Processing program. Check the serial baud rate to make sure they match. You can also try some simpler Arduino program that justwrites data to the serial port and see if it is read by the Processing program.

Comment by Michael on November 13, 2013 at 7:29 AM

55. Hello, I am looking at the power consumption of this sensor. The heater will draw about 150mA max. MyArduino has a UA78M05 regulator, which can supply 500mA max. Therefore, if I don’t interface with toomany other things, I should be able to power this from my Arduino, right?

Comment by Tristan Novak on February 20, 2014 at 10:47 AM

56. Tristan,Yeah, sounds like it. That’s a very beefy voltage regulator. Not a standard Arduino, then, right?

Comment by Michael on February 21, 2014 at 2:40 PM

57. hello, I can not successfully run the code in processing, this error message appears: “could not find arduino port”

and this line of code shown: throw new RuntimeException (“could not find Arduino port”); ”I hope you can help me, thanks!

Comment by eliaz on May 14, 2014 at 5:08 PM

58. I have yet to try out the Arduino but came on this article while doing some research on the resistors. Haveyou tried implementing a temperature fan, or possibly heater to keep it at a regulated temperature?

Comment by Colton on August 5, 2014 at 9:31 AM

8/20/2019 Project Lab MQ-3

http://slidepdf.com/reader/full/project-lab-mq-3 16/16

2/29/2016 Project Lab

59. The MQ3 database provides you the resistance vs alcohol content relationship, well the slope too.With that data You can calibrate the sensor.

Comment by Balaganesh Arasiah on February 21, 2015 at 5:13 AM

60. I’d be really interested to build a wearable breathalyser using this device with a lilypad. A badge on your

punk jacket, or watch etc. However seems we’re getting a bum steer from the technology vendors. Despitesparkfuns claim for the product here: https://www.sparkfun.com/products/8880 the associated mq3datasheet linked on the page quotes a detection range of 25ppm – 500ppm. 25 ppm = 25000 ug/L. over 10xthe upper limit of the expected range for a breath sample. There’s no way this device could be used toreliably detect alcohol on human breath. It was designed for detecting dangerous levels in ambient air – maybe for people working in factories or liquor production.

Comment by Simon on January 9, 2016 at 10:58 PM

Leave a Reply

Name

Mail (will not be published)

Website

CAPTCHA Code *

Submit Comment

© 2016 nootropic design | Site Admin | Powered by Wordpress 4.3.3