Introduction: Breathanalyser

By Marc Guasch and Genís Revilla

Industrial design engineering in Elisava

Course: academic uses in specific English terminology

Tutor: Jonathan Chacón Perez

Step 1: Project Definition INTRODUCTION

Nowadays, the most of car accidents on the street occurs for reasons that include cases of alcohol consumption. Many families are ruined for that reason. The main vision of this project is to prevent people from drinking and driving and so causing accidents on the road.

So this is a prototype version to stop driving under the influence of alcohol. If a driver has been drinking, the sensor will detect the alcohol level in the driver's breath and if it crosses a set threshold an alert will appear and the driver may decide not to drive.

This alcoholologist is not a professional breathalyzer and should be used for fun purposes only.

Step 2: Problematic

With this product we want to solve the problem that many drivers have once they return from dinner or partying. These drivers often do not know if they have drunk overly to drive a vehicle properly. This portable alcoholometer will allow people to take a test before taking the vehicle, indicating what the alcohol level is and whether it is advisable to take the vehicle or not.

Step 3: Sensors and Components Required

Alcohol sensor is the main requirement. In the alcohol sensor there is a Vcc, Ground, 1 analog and 1 digital read ports are available. The sensor i.e. used here is MQ-4. We have used an LCD screen with an i2c module for easier and faster assembly.

Materials required are:

(1x) Arduino Uno

(1x) MQ5 Gas Sensor

(1x) LCD i2C 20x4

(1x) Breadboard

(2x) Green LED

(1x) Yellow LED

(2x) Red LED

(5x) 10K Resistors

(50x) Jumper wires

(1x) Switch

(1x) 5V Battery

(1x) 3D Case

Step 4: Creating the Case

The casing for the pocket breathalyzer is 3D printed. After downloading the STL file below, you can have it done at any 3d printing facility nearby. The results should resemble the image above.

Step 5: Circuit Assembly With LCD I2C

The most important thing of this step is to know how to connect the LCD screen with our Arduino Uno, the following connections and steps have to be made.

For the correct functioning of this component, it is necessary to install a library in our computer, it is attached below.

The pins of the I2C are:

VCC Pin - the pin that requires to power up the circuit

GND Pin - the pin that required to keep all the component in the circuit grounded.

SDA Pin - this is a data line where the transfer of characters take place.

SCL Pin - this is a clock line synchronizing the transfer of character.

The connections with the arduino are these:

VCC - 5V

GND - GND

SDA - A4

SCL - A5

We attach the installation scheme.

Step 6: LCD Code

First of all the example code that the library of our LCD screen brings is loaded, in this way we can check that our screen works correctly and we can go to the next step.

We attach the code below.

Step 7: Circuit Assembly With MQ5 Gas Sensor

This component does not need an external library for its correct operation. It is only necessary to connect it with our Arduino Uno, once connected, we can run the program attached below and on the serial monitor of our computer we will see the values it detects.

The connections with the Arduino are these:

VCC - 5V

GND - GND

D0 - A8

A0 - A0

We attach the installation scheme.

Note: The sensor becomes very hot after a while, do not touch it!

Step 8: Circuit Assembly With LEDs

We will connect the 5 LEDs that will serve to visually indicate the level of alcohol. These LEDs will be installed easily using resistors.

The connections with the Arduino are these:

LED1 (Green) - D1

LED2 (Green) - D2

LED3 (Yellow) - D3

LED4 (Red) - D4

LED5 (Red) - D5

We attach the installation scheme.

Step 9: Calibrate the Alcohol Sensor

To calibrate the sensor we used cotton moistened with alcohol, since we could not prove it with real subjects. Finally we have decided to use the values that we believe are more real.

Step 10: Final Code

Once all the components work separately, we will create a code that allows them work together.

We will create a code that through some measurement ranges obtained by the MQ5 sensor will show us on the LCD 4 possible drunken states.

"BAJO NIVEL ALCOHOL" value between 50 - 100

"NIVEL MEDIO ALCOHOL" value between 100 - 150

"ALTO NIVEL ALCOHOL" value between 150 - 200

"POLICIA" value >=200

We have created a memory that makes the screen have a higher value.

The LEDs operate independently, they are powered by the data obtained by the MQ5 sensor, just as the screen works with the measuring ranges that will be declared below.

LED1 (Green) - turn ON when the value <=50 (indicates that it is on)

LED2 (Green) - turn ON when the value >50

LED3 (Yellow) - turn ON when the value >100

LED4 (Red) - turn ON when the value >150

LED5 (Red) - turn ON when the value >200

We attach the final code and montage image below.

Step 11: The Button Function

The function of our button is to restart the Arduino and to make another measurement, since our program always saves the highest measurement on the screen. This allows us to make as many measurements as we want.

Our button is directly connected to the power.

Step 12: Putting Everything Together

Once everything is working correctly it is time to add it to the case and close it correctly.

Step 13: Functioning

First of all, we have to connect the cable that will feed our Arduino. When "SOPLA AQUI" appears on the screen, this will indicate that the device is ready to make a measurement. The screen will indicate our alcohol level, the LEDs will indicate the level of alcohol in real time, once we are not blowing, only one will remain lit.

When you want to make a new measurement, press the central button and wait until the screen shows "SOPLA AQUI" and make a new measurement.

Arduino Contest 2017

Participated in the
Arduino Contest 2017