VOTE NOW!
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Design 1/4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Usability 2/4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Creativity 3/4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Content 4/4


In this tutorial we will see how to make a breathalyzer, simple economical and easy to make. We’ll see the source code, the circuit assembly all step by step. The printed circuit board will be available for free.

What is a breathalyzer?

It is a device to measure the amount of alcohol present in the air breathed by a person, it can also measure the amount of alcohol contained in a liquid or gas.

MQ3 module

This alcohol sensor is suitable for detecting the concentration of alcohol in your breath, just like a commercial breathalyzer. It has a high sensitivity and fast response time. The sensor features a resistive analog output based on alcohol concentration.

Some comments from the MQ3 sensor

This sensor has 4 pins two of which are power, one is an analog output (PIN AD) and the other a digital output (PIN DO), it is finally possible to regulate its sensitivity, by means of a potentiometer that owns the board, they will notice that when you turn on this module and connect a LED it is turned on, since this output is reversed or denied (NOT). This means that in the presence of alcohol in the sensor the LED will be on and if it exceeds the set threshold with the potentiometer it will turn off. This is very useful if we do not want to use any microcontroller, nor Arduino, with this module we can only have a very simple breathalyzer just feeding the module and nothing else.

As soon as we turn on this module, it will start to heat up, we have to wait a few minutes (about 5) for the module to heat up and we have a correct census.

Electronic components

An Arduino nano

The Arduino Nano is a small board, complete and compatible with the test board based on the ATmega328 (Arduino Nano 3.x). It has about the same functionality as the Arduino Duemilanove, but in a different package. It only lacks a DC power connector and works with a Mini-B USB cable instead of a standard one.

MicrocontrollerATmega328ArchitectureAvrOperating voltage5 VFlash memory32 KB of which 2 KB uses the bootloaderSram2 KBClock speed16 MHzAnalog pins IN8Eeprom1 KBDC current by I/O pins40 mA (I/O pins)Input voltage7-12 VDigital I/O Pins22 (6 of which are PWM)PWM output6Energy consumption19 mAPCB size18 x 45 mmWeight7g

Pin diagram

A buzzer

Four female pins

Six 5mm led diodes of different colors

Sensor MQ3

Description

MQ3 Alcohol Concentration Sensor Module

Overview

This sensor detects the concentration of alcohol in the air. It simply connects to an analog input of a microcontroller like Arduino and we can measure the concentration of alcohol.

It has an analog output that indicates the concentration of alcohol in the environment

(the higher the output level, the higher the gas concentration) and also has a digital output that drops to 0 when the alcohol concentration exceeds the preset level.

Ideal article for use with Arduino boards or any microcontroller (PIC, AVR, FREESCALE, etc.)

Specifications

Operating Voltage: 5Vdc Integrated

LM393 amplifier with variable gain by potentiometer.

2 output pins (analog output and TTL level output).

Valid low-level TTL level output, can be connected directly to the microcontroller.

Analog output of 0 x 5 V , the highest voltage equals a higher concentration.

Working conditions: Ambient temperature:-10oC to 65oC, Humidity:-95% RH

Pcb

Download gerber file –> Gerber_ALCOHOLIMETRO

Six 1 Kohm resistors

A socket for Arduino nano

Source

int sensor=0;
void setup(){
Serial.begin(9600);//Configuración de la velocidad del puerto serial de arduino
//Se configuraran los pines 2,3,4,5,6 y 7 como salidas 
//Del pin 2 al 6 van conectados a diodos led con su respectiva resistencia
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);
 pinMode(4, OUTPUT);
 pinMode(5, OUTPUT);
 pinMode(6, OUTPUT);
 pinMode(7, OUTPUT);//Va conectado al Buzzer
 sensor=analogRead(A0);//Se lee el valor de la entrada analógica  A0
while(sensor>100){
  Serial.print("Esperando a que se estabilice el sensor (valor menor a 100): ");//Se imprime su valor por el terminal serial
  sensor=analogRead(A0);//Se lee el valor de la entrada analógica  A0
  Serial.println(sensor);//Se imprime su valor por el terminal serial
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  digitalWrite(6, HIGH);
  delay(500);
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  delay(500); 
 }
}
void loop(){
sensor=analogRead(A0);//Se lee el valor de la entrada analógica  A0
Serial.print("Valor del sensor: ");
Serial.println(sensor);//Se imprime su valor por el terminal serial
//Se compara el valor de la variable sensor si se cumple apagará todos los led
if(sensor<99){
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);


  }
//Se compara el valor de la variable sensor si se cumple encenderá el led en el pin 2
if(sensor>100){
  digitalWrite(2, HIGH);
  digitalWrite(3, LOW);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);


  }
//Se compara el valor de la variable sensor si se cumple encenderá el led en el pin 2 y 3
if(sensor>200){
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);


  }
//Se compara el valor de la variable sensor si se cumple encenderá el led en el pin 2, 3 y 4
if(sensor>300){
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);


  }
//Se compara el valor de la variable sensor si se cumple encenderá el led en el pin 2, 3, 4, y 5
if(sensor>350){
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);


  }
//Se compara el valor de la variable sensor si se cumple encenderá el led en el pin 2, 3 ,4 ,5, 6 y el buzzer
if(sensor>400){
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  digitalWrite(6, HIGH);
  digitalWrite(7, HIGH);//Se actica el buzzer


  }         
delay(100);//peque?o retardo antes de comenzar de vuelta
}


http://rogerbit.com/wprb/wp-content/uploads/2020/11/Gerber_ALCOHOLIMETRO.zip

Jan 14,2021
100 viewsReport item
  • Comments(0)
  • Likes(0)
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
    View More