Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Arduino Based Alcohol Detector
Just Do Electronics
August 20, 2022
Circuit Diagram :-
Component List :-
1. Arduino Nano
2. 16x2 LCD Display
3. 10k Potentiometer
4. Green LED
5. Red LED
6. MQ-3 Sensor
7. Zero PCB
Code :-
//prateek singh //www.prateeks.in #include
LiquidCrystal lcd(12,11,10,9,8,7); #define sensor A3 #define led 3 #define buz 2 void setup() { Serial.begin(9600); lcd.begin(16,2); lcd.print("Alcohol Detector"); lcd.setCursor(0,1); lcd.print("www.prateeks.in"); delay(2000); pinMode(sensor, INPUT); pinMode(buz, OUTPUT); pinMode(led, OUTPUT); lcd.clear(); } void loop() { float adcValue=0; for(int i=0;i<10;i++) { adcValue+= analogRead(sensor); delay(10); } float v= (adcValue/10) * (5.0/1024.0); float mgL= 0.67 * v; Serial.print("BAC:"); Serial.print(mgL); Serial.print(" mg/L"); lcd.setCursor(0,0); lcd.print("BAC: "); lcd.print(mgL,4); lcd.print(" mg/L "); lcd.setCursor(0,1); if(mgL > 0.3) { lcd.print("Drunk "); Serial.println(" Drunk"); digitalWrite(buz, HIGH); digitalWrite(led, HIGH); } else { lcd.print("Normal "); Serial.println(" Normal"); digitalWrite(buz, LOW); digitalWrite(led, LOW); } delay(100); }
Video :-
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
How To Make RFID & Keypad Based Door Lock
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
Esp32 Cam Based Face Unlock
NRF Based Servo Motor Control
Ultrasonic Sensor as a Counter with Arduino
ESP32 Led Blink With Push Button
How to Make a Conveyor Belt System | Counter Machine
IoT Based Patient Health Monitoring System Using Blynk App
Arduino ebook
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments