Alcohol sensor, MQ-3
An MQ-3 alcohol sensor on an LM393 board. It reads in mg/L, as its datasheet does. It reads high while it warms up. Drag the slider to let gas in.
- 4 pins
- 5 settings
- In 1 project
The Alcohol sensor, MQ-3 in brief
What it is, and every setting the properties panel gives it.
The MQ-3 is the alcohol sensor of the MQ family, the breathalyzer in sensor kits: a heated tin dioxide element on the blue four-pin LM393 board, with pins VCC, GND, DO and AO. The heater needs 5 volts: VCC goes to 5 V on an Uno with AO on A0, and beside an ESP32 to the 5 V (VIN) pin, with a divider on AO before the ADC pin, since AO can rise past 3 volts. Mokxi reads it off the datasheet’s chart in milligrams per liter, not ppm: mg/L = 0.3934 x (Rs/R0)^-1.504, with R0 1 MOhm at 0.4 mg/L, clean air at 60 R0, a 200 k load, and a slider from 0 to 10 mg/L. That load makes clean air only about 17 mV, three or four counts on a 5 V Uno, which is why the built-in breathalyzer calibrates against the 1.1 V internal reference. The board reads high through a 20 second warm-up, and DO pulls low when AO passes the trimmer at 0.3 of the supply. The classic mistake is reading it in ppm; one mg/L is about 530 ppm. Burn-in, humidity, temperature and the heater current are not modeled.
- Family
- Sensors
- Pins
- 4
- gas
- alcohol (or benzine)
- r0
- 1000000
- rl
- 200000
- threshold
- 0.3
- warmup
- 20
4 pins
Named as the editor names them, so a wire lands where you expect it.
How to use the MQ-3 alcohol sensor with an Arduino
Wire VCC to 5 V, GND to GND and AO to A0, as the kit circuit here does, and print analogRead(A0) twice a second. Alcohol vapor lowers the element’s resistance, so the reading climbs as you drag the alcohol level up, after a 20 second warm-up in which it starts high and sinks.
In clean air the MQ-3 is about 60 times its R0 over a 200 k load, which is only about 17 mV, three or four counts on a 5 V Uno. That is too coarse to calibrate against, so the built-in breathalyzer measures clean air against the Uno’s 1.1 V reference with analogReference(INTERNAL), then switches back and lets the MQUnifiedsensor library work out milligrams per liter.
Its chart, and the part’s slider, are in mg/L, not ppm. One mg/L of ethanol vapor is about 530 ppm, so a ppm formula borrowed from an MQ-2 sketch is off by a long way.
The heater needs 5 V, so beside an ESP32 power VCC from the 5 V (VIN) pin and put a divider on AO before the ADC pin: a strong whiff takes AO past 3 V.
What is true about the Alcohol sensor, MQ-3, here
In its help article’s own words: what the simulation gets right, and where it stops.
Not modeled
The MQ-7's and MQ-9's heater cycle. Their sheets run the heater at 5 V for 60 s, then 1.4 V (MQ-7) or 1.5 V (MQ-9) for 90 s, and read CO at the end of the low phase; the CO line is that phase's. The blue boards have no circuit for the cycle and hold the heater at 5 V, where the real element does not follow its CO line at all. This model reads the CO line all the time, and the part's description says so. The cycle is not simulated yet.
CO2 on the MQ-135. The chart's CO2 line runs from 10 to 200 ppm, but the air
already holds about 420 ppm, which the sensor reads as part of clean air. The slider is
CO2 above that, which is how the library's CO2 example takes it (it adds 400). The
MQ-135 cannot tell CO2 from ammonia, alcohol or a breath; one gas at a time is
modeled, the one in gas.
Everything the MQ-2 page lists: the 24 to 48 hour burn-in the sheets ask for, the heater's current, humidity and temperature, mixtures of gases.
From MQ gas sensors: MQ-3 to MQ-137, in full.
See the Alcohol sensor, MQ-3 in a project
One built-in project uses it. It opens in the editor, already wired.
The boards it is shown on
This board has a built-in project with the Alcohol sensor, MQ-3 in it.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Alcohol sensor, MQ-3
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.