|
ARDUINO_NANO |
x 1 | |
|
LED-TH-5mm_R |
x 6 | |
|
1Kohm R_AXIAL-0.4 |
x 6 | |
|
Zocalo 30 pin |
x 1 | |
|
BUZZER-12MM-NS |
x 1 | |
|
HDR-M-2.54_1x1 |
x 6 | |
|
PCB |
x 1 |
Alcoholimeter with MQ3 sensor and arduino nano (Includes printed circuit)
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
http://rogerbit.com/wprb/wp-content/uploads/2020/11/Gerber_ALCOHOLIMETRO.zip
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
}
Alcoholimeter with MQ3 sensor and arduino nano (Includes printed circuit)
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(1)
- Jeffery Thompson Mar 25,2024
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by CarlosVolt Tutoriales
- Infrared stepper motor control with speed control More info and updates https://rogerbit.com/wprb/2024/09/motor-paso-a-paso-x-infrarrojo/In this proje...
- Uploading BME280 Sensor Data to ThingSpeak Using ESP32 In this tutorial, we will show you how to connect a BME280 sensor to an ESP32 to read temperature, h...
- Water pump control for irrigation via telegram and esp32 Water Pump Control by Telegram and ESP32 is an automated system that allows you to remotely control ...
- Air conditioning on/off control via telegram and esp32 In this tutorial we will see how to control an air conditioner, with an esp32 and the telegram appli...
- 35 watt stereo amplifier In this video we will see how to build an audio amplifier, with the TDA7377 integrated circuit, and ...
- Laser alarm with RFID module More info and updates in https://rogerbit.com/wprb/2024/08/alarma-laser-rfid/In this project, we bui...
- Control lights by voice commands and keys In this tutorial we will see how to create a device to control lights by voice commands, with a modu...
- Stepper motor control x bluetooth and app In this tutorial we will see a circuit, which controls a stepper motor, with an application made in ...
- DFplayermini x bluetooth mp3 player control More info and updates in https://rogerbit.com/wprb/2022/12/dfplayermini-x-bluetooth/In this tutorial...
- Robot with WiFi control and servos driven by ESP32 More info and updates in https://rogerbit.com/wprb/2023/07/robot-wifi/A robot controlled by Wi-Fi, s...
- How to make a water level meter with uln2803 In this tutorial we will see how to make a water level meter circuit with the built-in uln2803.The p...
- Color Detector with Arduino and OLED display In this tutorial we will show you how to build a color detector using the TCS3200 sensor and an SH11...
- DTMF decoder for handy with arduino, control over several kilometers In this tutorial we will see how to make a circuit to connect to our handy, in this case a Baofeng U...
- Turn on light from thindspeak with esp32 In this tutorial, we will show you how to control lights over the Internet using an ESP32 and the Th...
- MP3 player control with webserver using ESP32 WIFI In this tutorial, you will learn how to build a web server using the ESP32 to control the YX5300 mod...
- Time clock with fingerprint IoT module, uploading data to thingspeak More info in and updates in https://rogerbit.com/wprb/2022/07/reloj-de-control-fingerprint/In this t...
- Make your own logic tip (includes printed circuit board) In this video tutorial we will see how to make a logic tip, on a printed circuit, with the integrate...
- Coil or inductor meter with Arduino and OLED display More info and updates in https://rogerbit.com/wprb/2022/06/medidor-inductores/In this tutorial we wi...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
127 0 0 -
DIY Laser Power Meter with Arduino
184 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
167 0 2 -