در این پروژه به نحوه ساخت حسگر الکل با آردوینو می پردازیم.
سنسور الکلی که ما استفاده خواهیم کرد سنسور MQ-3 است. این حسگر نه تنها به الکل، به ویژه اتانول، که نوعی الکل است که در شراب، آبجو و مشروبات الکلی یافت می شود، حساس است.
این نوع مدار حسگر می تواند به عنوان یک دستگاه تنفس برای بررسی سطح الکل خون فرد استفاده شود. همانطور که هنگام بازدم دی اکسید کربن را بازدم می کنیم، اگر الکل در خون خود داشته باشیم، مقداری الکل را نیز خارج خواهیم کرد. هر دستگاه آلکومتر می تواند این میزان الکل را اندازه گیری کند.
هر چه اتانول در خون شما بیشتر باشد، هوا در هنگام بازدم بیشتر است. این محتوای الکل نشان می دهد که آیا یک فرد مست است و چقدر مست است.
مقدار الکل بازدم شده در هوا متناسب با مقدار الکلی است که در خون فرد یافت می شود. آلکومترها از یک فرمول داخلی برای تخمین میزان الکل خون از محتوای الکل هوای بازدمی استفاده می کنند.
برای کشورهای مختلف، سطح الکل در خون که فرد را بیش از حد مجاز برای رانندگی تعریف می کند، متفاوت است. محدوده بین 0.01 تا 0.10 است. اکثر کشورها محدودیتی در حدود 0.05 دارند. به عنوان مثال، یونان، گرینالند و ایسلند همگی دارای محدودیت 0.05 هستند. کانادا محدودیت بالاتری در 0.08 دارد. در ایالات متحده نیز 0.08 است. این بدان معنی است که اگر قرائت آلکومتر بالاتر از این باشد، فرد می تواند یک DUI دریافت کند.
برای مدار ما، می تواند به عنوان یک آلکومتر عمل کند تا بتوانیم تخمینی از سطح الکل خون یک فرد بدست آوریم.
سلب مسئولیت: برای آزمایش این سنسور نیازی به نوشیدن الکل نیست. دهانشویه مانند لیسترین حاوی الکل است. اگر دهانشویه را برای چند ثانیه غرغره کنید و سپس در حسگر تنفس کنید، قرائت ها باید پرش کرده و ثبت شوند. این تمام چیزی است که برای آزمایش لازم است. من هیچ مسئولیتی در قبال مستی نمی پذیرم.
اجزای مورد نیاز
- سنسور الکل MQ-3
- آردوینو
- رهبری
MQ-3 را می توان بسیار ارزان، فقط چند دلار به دست آورد. یک مکان خوب برای جستجوی آن در ebay است که همیشه حراج هایی در محدوده 2 تا 3 دلار در آنها وجود دارد.
نکته مهم، توصیه می شود سنسور مستقل را تهیه نکنید، بلکه کل برد MQ-3 را تهیه کنید. این به این دلیل است که اگر سنسور مستقل را بخرید، قبل از اینکه بتوانید آن را به آردوینو متصل کنید، باید ساخت کل شماتیک را به پایان برسانید. برای اینکه کار کمتری برای ادغام آن با آردوینو نیاز باشد، توصیه می شود مدار کامل سنسور MQ-3 را خریداری کنید. این را در زیر می توانید ببینید.
اگر برد کامل را بخرید، 4 لید وجود دارد که باید وصل شوند.
4 لید وجود دارد: +5V، AOUT، DOUT و GND.
سرنخ های +5V و GND قدرت سنسور الکل را ایجاد می کند.
2 لید دیگر AOUT (خروجی آنالوگ) و DOUT (خروجی دیجیتال) هستند. نحوه عملکرد سنسور این است که ترمینال AOUT یک خروجی ولتاژ آنالوگ را متناسب با میزان الکلی که سنسور تشخیص می دهد می دهد. هرچه الکل بیشتری تشخیص دهد، ولتاژ آنالوگ آن بیشتر خواهد بود. برعکس، هرچه الکل کمتری تشخیص دهد، ولتاژ آنالوگ کمتری خروجی خواهد داشت. اگر ولتاژ آنالوگ به آستانه معینی برسد، پین دیجیتال DOUT را بالا می فرستد. هنگامی که این پین DOUT بالا رفت، آردوینو این را تشخیص میدهد و LED را روشن میکند و نشان میدهد که آستانه الکل رسیده است و اکنون از حد مجاز فراتر رفته است. نحوه تغییر این سطح آستانه با تنظیم پتانسیومتر برای افزایش یا کاهش سطح است.
شماتیک مدار سنسور الکل MQ-3
مدار حسگر الکلی که ما با حسگر MQ-3 یکپارچه با آردوینو خواهیم ساخت، در زیر نشان داده شده است.
برای جزئیات بیشتر: مدار سنسور الکل MQ-3 ساخته شده با آردوینو
در ادامه، متن انگلیسی این مطلب را میتوانید مشاهده نمایید:
In this project, we will go over how to build an alcohol sensor with an arduino.
The alcohol sensor we will use is the MQ-3 sensor. This is a sensor that is not only sensitive to alcohol, particularly ethanol, which is the type of alcohol which is found in wine, beer, and liquor.
This type of sensor circuit can be used as a breathalyzer to check a person’s blood alcohol level. Just as we exhale carbon dioxide when we breathe out, we also will breathe out some alcohol if we have alcohol in our blood. Any alcometer device can measure this alcohol content.
The more ethanol in your blood, the more there is in the air on exhalation. This alcohol content gives a good indication for if a person is drunk and how drunk they are.
The amount of alcohol exhaled into the air is proportional to the amount of alcohol which will be found in a person’s blood. Alcometers use a built-in formula to estimate blood alcohol content from exhaled air alcohol content.
For different countries, the level of alcohol in the blood that defines a person as over the limit for driving varies. The range ranges from 0.01 to 0.10. Most countries have a limit of about 0.05. For example, Greece, Greenalnd, and Iceland all have limits of 0.05. Canada has a higher limit set at 0.08. In the United States, it is also 0.08. This means that if the alcometer reading measures above this, the person can receive a DUI.
For our circuit, it can function as an alcometer so that we get an estimate of a person’s blood alcohol level.
Disclaimer: You don’t have to drink alcohol in order to test this sensor. Mouthwash, such as Listerine, contains alcohol. If you gargle mouthwash for a few seconds and then breathe into the sensor, the readings should jump and register. This is all that’s needed to test. I take no responsibility for any drunkenness.
Components Needed
- MQ-3 alcohol sensor
- Arduino
- LED
The MQ-3 can be obtained very cheaply, just a few bucks. A good place to look for it is on ebay, which always has auctions on them for the $2-$3 range.
Important, it is recommended that you do not obtain the standalone sensor but the whole MQ-3 board. This is because if you buy the standalone sensor, you will have to finish building the whole schematic before you can connect it to the arduino. So that less work is required for integrating it with the arduino, it is recommended that you buy the complete MQ-3 sensor circuit. This you can see below.
If you buy the complete board, there are 4 leads which need to be connected.
There 4 leads are +5V, AOUT, DOUT, and GND.
The +5V and GND leads establishes power for the alcohol sensor.
The other 2 leads are AOUT (analog output) and DOUT (digital output). How the sensor works is the terminal AOUT gives an analog voltage output in proportion to the amount of alcohol the sensor detects. The more alcohol it detects, the greater the analog voltage it will output. Conversely, the less alcohol it detects, the less analog voltage it will output. If the analog voltage reaches a certain threshold, it will send the digital pin DOUT high. Once this DOUT pin goes high, the arduino will detect this and will trigger the LED to turn on, signaling that the alcohol threshold has been reached and is now over the limit. How you can change this threshold level is by adjusting the potentiometer to either raise or lower the level.
MQ-3 Alcohol Sensor Circuit Schematic
The alcohol sensor circuit we will build with an MQ-3 sensor integrated with an arduino is shown below.
For more detail: MQ-3 Alcohol Sensor Circuit Built with an Arduino