Welcome to another Arduino project video! Today we are going to build an Arduino Breathalyzer. It is a device that senses alcohol in the air and prints the value it reads on the display. We use an MQ-3 gas sensor along with an I2C OLED display on an Arduino Mega. It is a very easy project to build, it won’t take us more than 10 minutes. There is a lot to cover so let’s get started!

Intro to the Arduino Breathalyzer Project

What does a breath analyzer do? It measures the alcohol in your breath. Do you have a drink already or no? Let’s find out. It is still warming up. It needs around 15 minutes to warm up so, sit back and let’s wait together for 15 minutes. Okay, I’m kidding. I’ll pause the video now. Okay, 15 minutes later the sensor has warmed up. This sensor here needs at least 15 minutes to warm up. If you touch it, it is warm. It is around 40 °C in order to have correct measurement. Now, what we see in the little display, it is the analog read we take from the Arduino. The MQ3 sensor is an analog device. The blue wire here is taking an analog measurement and all we do is we display this measurement in the display. Now, the value is 128 and it says that we are sober. We had no drinks so far. So, let me unplug the sensor and plug to another wire in order to be easier to test it with some alcohol. Let’s see. I have removed the sensor from the breadboard in order to be easier for me to breath on it and now I’m going to have a sip of beer. Let’s see. As you can see, for a moment it said that I had a beer, let’s do it again. Interesting! Okay. let’s now have a sip of ouzo, a famous strong greek drink and try the sensor. Did you see that? It said, “I smell ouzo”. Let’s do it again. That’s it. It works.

Let’s now see how the MQ3 gas sensor really works. This sensor uses a chemical reaction, in order to detect alcohol vapors in the air. So, it does not detect liquid alcohol but alcohol vapors, and to do that, it uses a chemical reaction that has to take place at a specific temperature. That’s why when we touch the sensor, it’s hot. It is around 30-40 °C So if I place this piece of cotton with some alcohol in it you can see that the measurement rises. You can see that it can detect the alcohol in the cotton piece. If I remove the cotton, because the sensor is saturated with alcohol vapors, it takes some time to calm down to the normal value. Let’s do it again. And if I press the cotton on the sensor you can see that the value increases. I’m using 100% pure alcohol here, and as you can see, the maximum value is around 600 that I’m getting. Let’s now see how to connect the MQ3 sensor module to an Arduino project.

——————–
WHERE TO BUY
——————–

1. MQ3 sensor: https://educ8s.tv/part/MQ3

2. 0.96′ I2C OLED display: https://educ8s.tv/part/OLED096

3. Arduino Mega: https://educ8s.tv/part/ArduinoMega

4. Small Breadboard: https://educ8s.tv/part/SmallBreadboard

5. Wires: https://educ8s.tv/part/Wires

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

[adsense]

First of all, we have to buy an MQ3 module from any store. You can find some links in the description of the video and as you can see, it has 4 pin outputs the first one is GROUND, DOUT, AOUT (analog output) and VCC, So, in order to connect this module to an Arduino we have to connect VCC to 5V on Arduino we have to connect GND to Arduino ground and we have to connect AOUT to an analog pin. Okay. Now, connecting to Arduino. As we’ve said, VCC goes to 5V, GND goes to Arduino GND, and AOUT goes to analog pin 0 (A0), on Arduino. Now, in order to connect the OLED display, we have made a special video on that. Check it out and see how easy it is to connect this display on an Arduino. Let’s now see the power consumption of this project. As you can see right now, the project draws around 180 mA of current. The power consumption is 0.86 W. That’s a lot of power that is coming from this battery pack.

The code of the Project

Let’s now have a quick look at the code of the project. First of all, we have to use two libraries in order to drive the OLED display, but for more details about this, check out our previous video about the OLED display itself. You will find the link in the description of the video. Then, we have to declare how many minutes we want to wait until the sensor has warmed up. 900 seconds is 15 minutes, you can change it for more or less time. Then, we declare the analog pin we are going to connect to, analog pin 0 (A0), and we wait until the sensor has warmed up and then we print the value that we read from the sensor.

It is a very straightforward code. That’s the print alcohol level function that takes one argument the analog value from the sensor itself, and prints a message according to the value. I have made no calibration to the sensor so, all I do is check the value of the analog grid and then print a message accordingly. Of course, this method is not accurate at all, it’s only for educational and fun use and of course, please don’t use it while driving. It is not accurate at all. So, that’s today’s project. It is very easy to build and very low-cost as well project. It is ideal for beginners. The cost of this project is around 3 euros for the sensor, 5 euros for the display and from 2-10 euros for the Arduino. Thank you for watching the video! If you liked it, press Like below, or subscribe to our channel in order to watch our next videos that are going to be very interesting as well. Thank you very much!

——————–
CODE
——————–

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv