Introduction: How to Make a Portable Breathalyzer

About: GreenPAK™ is a broad family of cost-effective NVM programmable devices that enable innovators to integrate many system functions into a single custom circuit.

A breathalyzer is a device for estimating blood alcohol content (BAC) from a breath sample. In simple terms, it is a device to test whether a person is intoxicated. The breath alcohol content reading is used in criminal prosecutions; the operator of a vehicle whose reading indicates a BAC over the driving limit can be charged with a criminal offense.

The level of alcohol in the blood that defines a person as over the limit when driving varies by country. BAC legal limits range from 0.01 to 0.10. Most countries have a limit of about 0.05. For example, Greece, Greenland, and Iceland all have limits of 0.05. In the United States, it is 0.08. If the breathalyzer reading is greater than the legal limit, the driver may receive a DUI.

Below we described steps needed to understand how the solution has been programmed to create a portable breathalyzer. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit program to create the portable breathalyzer.

Step 1: Chemistry

When the user exhales into a breath analyzer, any ethanol present in their breath is oxidized to acid at the anode:

CH3CH2OH (g) + H2O (l) → CH3CH2OH (l) + 4H + (aq) + 4e-

At the cathode, atmospheric oxygen is reduced:

O2 (g) + 4H + (aq) + 4e- → 2H2O (l)

The overall reaction is the oxidation of ethanol to acetic acid and water.

CH3CH2OH (l) + O2 (g) → CH3COOH (l) + H2O (l)

The electrical current produced by this reaction is measured by a microprocessor, and displayed as an approximation of overall blood alcohol content (BAC).

Step 2: MQ-3 Alcohol Sensor

This breathalyzer is not meant to be used as a device capable of corroborating prosecution. The MQ-3 is not accurate enough to register exact BAC but is capable enough to analyze the concentration of alcohol in breath for non-judicial applications. The MQ-3 is a low-cost semiconductor sensor which can detect the presence of alcoholic gases at concentrations from 0.05 mg /L to 10 mg / L. The sensitive material used for this sensor is SnO2, whose conductivity is lower when in clean air. Its conductivity increases as the concentration of alcoholic gases increases. This in turn lowers the sensor’s pin-to-pin resistance. Instead of measuring the resistance directly, we measure the voltage level at the point between the sensor and a load resistor. The sensor and load resistor form a voltage divider, and the lower the sensor resistance, the higher the voltage reading will be. It has a high sensitivity to alcohol and has good resistance to disturbances due to smoke, vapor, and gasoline. This module provides both digital and analog outputs.

The sensor has a 24 - 48 hour break-in period. This means that the sensor needs to be turned on for 24 - 48 hours before the readings become stable.

This alcohol sensor is suitable for detecting alcohol concentration on your breath, just like your common breathalyzer. It has high sensitivity and fast response time. The sensor provides an analog resistive output value in the form of voltages, based upon alcohol concentration. Table 1 gives an insight into the voltage ranges of the MQ-3 Sensor.

Step 3: Project Summary

This Instructable will describe how to implement a low-cost portable breathalyzer using a Dialog GreenPAK™ SLG46140V . The GreenPAK will be used with the MQ-3 Alcohol Sensor to measure the concentration of alcohol in the air. The concentration from the alcohol sensor will allow us to deduce the level of alcohol present on a person’s breath.

Humans can exhale ethanol along with carbon dioxide. The higher the ethanol content in the bloodstream, the more it is introduced into the air upon exhalation. This Instructable will use the GreenPAK’s 8-bit ADC to acquire the analog value from the MQ-3 Alcohol Sensor. Analog comparators will be used to detect the obtained analog value with respect to a specific threshold. Five different thresholds are constructed to show the level of intoxication present in a person’s breath. Whenever the value becomes greater than a particular threshold, an LED can be illuminated to indicate the level of intoxication.

Step 4: Circuit Diagram

The circuit diagram for the project is shown in Figure 1.

Step 5: GreenPAK Design

The GreenPAK Design for the project is shown in Figure 2.

This GreenPAK design includes 5 different analog comparator voltage thresholds to indicate different amounts of intoxication present from a person’s breath. The SLG46140 has two analog comparators, and the analog input from PIN6 is given to both ACMP0 and ACMP1 through the PGA, which has a gain of 1x. The thresholds for ACMP0 and ACMP1 are set at 100 mV and 500 mV. The properties of ACMP0 and ACMP1 can be seen in Figure 3. The remaining three levels can be constructed using digital comparator blocks. In order to use these DCMPs we first need to convert the analog value into its equivalent byte, which is then fed to the DCMPs. This can be achieved by using SLG46140’s 8-bit ADC. The analog signal first passes through a Programmable Gain Amplifier (PGA) which then is fed to the ADC. DCMPs then get their analog signal-equivalent byte from the ADC. The configurations for the PGA and the ADC are given in Figure 4.

The threshold for ACMP0 and ACMP1 is set to 100 mV and 500 mV respectively. Whenever the voltage level becomes greater than the given threshold an analog comparator output turns HIGH, resulting in turning on either PIN-10 or PIN-11. The threshold settings for DCMP is a bit complicated and involves setting registers value in the DCMP Properties. The equivalent analog threshold for DCMPs can be easily calculated using Equation 1.

When the analog value crosses the threshold set in the analog comparators and digital comparators, blocks corresponding to a respective PIN will be enabled, thereby showing the range of alcohol present in the breath. The properties for the DCMPs are given in Figure 5. To minimize current consumption, the ADC, DCMP’s, and ACMP’s can be power cycled by using Wake/Sleep mode. For more information about the Wake/Sleep Cycle, please see the AN-1076 Wake / Sleep Timing Generator application note on Dialog’s website.

Step 6: Hardware Setup


In this Instructable, we demonstrated how to implement a low-cost breathalyzer with a Dialog GreenPAK SLG46140V. We used five different thresholds to show the level of alcohol present when a subject exhales. The GreenPAK IC acts as the controller for acquiring the alcohol concentration from the MQ-3 sensor and then delivering the appropriate BAC level indication for the user. The complete implementation is done using only a GreenPAK and MQ-3 Alcohol Sensor, along with a handful of LEDs.