Introduction: Alcohol Detection Using Linkit One

About: Pooja Baraskar is an Intel Software Innovator,author, speaker and a passionate Software Developer, who is always willing to learn and explore new technologies. Being a programmer, she always have a solution fo…

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.

Step 1: Requirements

LinkItOne microcontroller board.

Grove Alcohol Sensor


USB Cable

Step 2: Grove Alcohol Sensor

Alcohol sensor is semiconductor sensor for alcohol detection. It has good sensitivity and fast response to alcohol, suitable for portable alcohol detector. Grove - Alcohol Sensor is a complete alcohol sensor module for Arduino or Seeeduino. It is built with MQ303A semiconductor alcohol sensor. It has good sensitivity and fast response to alcohol. It is suitable for making Breathalyzer. This Grove implements all the necessary circuitry for MQ303A like power conditioning and heater power supply. This sensor outputs a voltage inversely proportional to the alcohol concentration in air.

Step 3: 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

Step 4: 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.

Step 5: Connections

1) Connect LinkIt One to your computer using a USB A to micro B cable.

2) Connect the Alcohol sensor into the A0 port of Grove Base Shield.

3) In the Arduino IDE, go to the Tools pull-down menu at the top, select Board, and make sure “LinkIt One” is checked.

4) Then pull down the Tools menu again, and select appropriate Serial Port.

5) Connect the Buzzer to 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.

Step 6: Code

int buzzer = 2;

int sensor = A0;

// The setup routine runs once when you press reset

void setup() {

pinMode(buzzer, OUTPUT); // Initialize the digital pin2 as buzzer output

Serial.begin(9600); // Initialize serial communication at 9600 bits per second


// The loop routine runs over and over again forever

void loop() {

var sensorValue = analogRead(sensor); // Read the input on analog pin 0 ('sensor')

Serial.println(sensorValue); // Print out the value on serial monitor

if (sensorValue > 200)


// If sensorValue is greater than 200

digitalWrite(buzzer, HIGH); }

else {

digitalWrite(buzzer, LOW);



Step 7: Important

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. Yet, any new exposure will show instant increase in sensor value.

Alcohol sensor is very sensitive semiconductor device. Handle with care.

Do not expose to organic silicon steam, alkali or corrosive gases.

Do not use freeze or spill water. Maintain proper working voltage.

Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest