How to calibrate alcohol sensor MQ-3B?

Hello anyone know how I should calibrate my alcohol sensor. Im trying to make a breathalyzer but don't know how I should calibrate it. What I have read is that i should get a value around 120 as normal, but after letting it stay a few hours to warm up it is still at around 240. Keep in mind that my sensor is directly connected to the arduino uno with a supply of 5V.

My code:

///Arduino Sample Code
void setup()
{
 Serial.begin(9600); //Set serial baud rate to 9600 bps
 pinMode(1,OUTPUT);
 digitalWrite(1, HIGH);
}
void loop()
{
int val;
val=analogRead(0);//Read Gas value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(1000);
}

My sensor: https://se.farnell.com/en-SE/dfrobot/sen0128/analogue-alcohol-sensor-arduino/dp/3517899

The MQ series of sensors must first be "burned in" for up to 72 hours before they can be used (check the data sheet).

The value of any particular reading does not mean anything until the sensor is calibrated. After burn-in, expose the sensor to at least two different sets of gases with know alcohol concentration and work out the offset and scale factor. Adafruit has an excellent general tutorial for calibrating sensors.

Keep in mind that the sensor responds to several different gases, and cannot distinguish one from another.

The data sheet does not say anything special...

That is not a manufacturer's data sheet. This is

Note the "preheat time" requirement of "over 24 hours".

So I should let it stay on for 24 hours with 5V??

24 to 72 hours.

Great blog on how to use those sensors: https://web.archive.org/web/20180513090020/http://www.maskau.dk/projects/electronic-nose

1 Like

A little research shows that Breath Alcohol Content (BrAC) is about 1/2 the Blood Alcohol Content (BAC). A typical BAC limit is 0.8 mg/l (milligrams per liter). To calibrate for that, put 0.4 milligrams of ethanol into a one-liter bottle and wait for it to fully evaporate.

1 Like

Where did you find that study could you please link it?

1 Like

Hi, @jose_7
Welcome to the Forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, component names and pin labels.

Please include how you are powering the Sensor and the Arduino?

What model Arduino are you using?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Okay I have now let the sensor heat up for about 50 hours. To calibrate it should I just take two different drinks with known alcohol percentage and measure it? What is offset and scale factor? Johnwasser said that I should put 0.4 mg alcohol in a one liter bottle and wait for it to evaporate and then measure will that work to?

Hi, @jose_7

Can you please answer post #11?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

Your sensor measures alcohol content in air. It will not measure alcohol content in water. I don't think you can use alcoholic beverages to calibrate it.

If your local police have a system for measuring BAC you could ask them if you could calibrate your device against theirs.

One calibration point could be dry air: zero percent alcohol. The other calibration point could be X% saturated alcohol, which you can prepare as described earlier by johnwasser.

That procedure is called "two point calibration" in the literature. Did you study the Adafruit sensor calibration tutorial?

Where can i find this adafruit sensor calibration tutorial?

1 Like


The 5V is an external supply and arduino GND is connected to same GND as the external supply. The Arduino Uno is also connected to the computer with an USB cable.
image

Sorry for my awful sketch. This is what I think the circuit will be but I haven't connected it yet. I'm not so sure if I should use voltage divider I'm just following the manafactures sheet(Fig 2) and it looks like RL is a voltage divider correct me if I'm wrong.

EDIT:
Im going to connect the sensor directly and use no voltage divider

Connect the sensor as shown in the DFRobot product guide, which you posted in post #3.

gotcha

Hi,
Thanks for the diagram.

Labelling is very important.

Tom.. :smiley: :+1: :coffee: :australia:

1 Like