A breathalyzer is a device for estimating blood alcohol content (BAC) from a breath sample. Breath analyzers do not directly measure blood alcohol content or concentration, which requires the analysis of a blood sample. Instead, they estimate BAC indirectly by measuring the amount of alcohol in one's breath.
Let us create a simple breathalyzer with LinkIt One microcontroller. The new IoT board LinkIt ONE co-designed by Mediatek and Seed Studios is an open-source, high-performance board for prototyping Wearables and IoT devices. It is a small board based on SoC that comes with onboard Wi-Fi, GSM, and GPRS that makes it a powerful board for connected devices.
Here are some more LinkIt one article which will help you to get familiar with it.
Requirements
Figure 1: Requirements
- LinkItOne microcontroller board.
- Grove Alcohol Sensor
- Buzzer
- USB Cable
Grove Alcohol Sensor
Figure 2: Alcohol Sensor Board
Figure 3: Alcohol Sensor
Alcohol sensor is a semiconductor sensor for alcohol detection and it is built with an MQ303A semiconductor alcohol sensor. Grove alcohol sensor has a grove interfacing which is suitable for Arduino or Seeeduino. You can also use this with Raspberry Pi2 if you are using a GrovePi. This sensor has good sensitivity and fast response to alcohol hence you can make your own portable alcohol detector with this. This sensor outputs a voltage inversely proportional to the alcohol concentration in air.
Specifications
- Power requirements: 5 VDC @ ~120 mA (heater on)
- Detection Gas: Alcohol
- Concentration: 20-1000ppm Alcohol
- Interface: 1 TTL compatible input (SEL), 1 TTL compatible output (DAT)
- Dimension: 40×20×12mm
Features
- Input Voltage: 5V Working
- Current: 120mA
- Detectable Concentration: 20-1000ppm
- Grove Compatible connector
- Highly sensitive to alcohol.
- Fast response and resumes quickly after alcohol exposure.
- Long life.
- Compact form factor.
Connections
Figure 4: See Connections
- Connect LinkIt One to your computer using a USB A to micro B cable.
- Connect the Alcohol sensor into the A0 port of Grove Base Shield.
- In the Arduino IDE, go to the Tools pull-down menu at the top, select Board, and make sure “LinkIt One” is checked.
- Then pull down the Tools menu again, and select appropriate Serial Port.
- Connect the Buzzer to the D2 port of Grove Base Shield.
If you have multiple serial ports to choose from and aren’t sure which to choose, try unplugging the board from your computer and plugging the board back again to see which port gets added.
Code
- int buzzer = 2;
- int sensor = A0;
-
- void setup()
- {
- pinMode(buzzer, OUTPUT);
- Serial.begin(9600);
- }
-
- void loop()
- {
- var sensorValue = analogRead(sensor);
- Serial.println(sensorValue);
- if (sensorValue > 650)
- {
-
- digitalWrite(buzzer, HIGH);
- }
- else
- {
- digitalWrite(buzzer, LOW);
- }
- }
The Grove Alcohol sensor is very sensitive in detecting alcohol. I tested this breathalyzer by bringing an empty alcohol bottle near to this and instantly the Buzzer started playing. You can also make the same using the MQ3 sensor with the
Pololu carrier board but you have to do little soldering and breadboarding with that.
Important
-
An alcohol sensor is a very sensitive semiconductor device, you should take proper care while handling this.
-
The value varies between 500 - 905. Hence any value above 650 indicates alcohol vapor in the vicinity.
-
Once exposed to alcohol vapor, it takes some time for the sensor value to decrease completely.
-
Do not expose to organic silicon steam, alkali or corrosive gases.
-
Do not use freeze or spill water. Maintain proper working voltage.