Boozeduino using arduino

Now with more LED.

Arduino mega powered breathalyzer using the MQ-3 sensor.   A relative gauge for judging how intoxicated you are.
This is more of a device to encourage one to drink more. The MQ-3 can’t achieve the accuracy to register exact BAC.
And It behaves weirdly. Sensitive to temperature and humidity. This is purely for fun.
Links Awesome tool for this, made testing MQ-3 analog levels a snap.

My first project, instructable, First everything. I’m a total noob and my main goal was to not burn out any chips. I got an Uno early in January and my girlfriend got me an MQ-3(among other goodies) for Valentines day. I had blinked and breadboarded but hadn’t tried a complete project. Here it goes…

Step 1: Parts & tools


1x Arduino+Mega+2560  $50  Liquidware     *Great Price*
4x 5mmClearBlue Led  $5 Sure electronics
18x 5mmGreenLed  $4 Adafruit
6x 5mmRedled  $4 Adafruit
10x 5mmYellowLed  35cent/each Sparkfun
1x MQ-3 Alcohol Gas Sensor  $5 Sparkfun
1x Drilled PCB for leds   $3 Radioshack
1x Power supply PCB for MQ-3  $2 Radioshack
1x 7805 Voltage Regulator  $2 Radioshack
2x 10uF capacitors
50x 250ohm resistors
1x Project Box  $5 RadioShack
4x #4 Machine Screws  $2 RadioShack
2x 9V Snap Connectors  $3 for 5 Radioshack
1x Really long heat shrink tubing or cord with 4 wire  $2 Local store
1x Cheap microphone housing(Rockband)  $Salvaged
1x Mic holder  $5
1x On/off Switch
1x spool of solder
1x alcohol hand sanitizer
1x pieces of Velcro for mounting
1x tube of adhesive
Lots of wire in multi colors


Solder Iron
Heat Shrinker(Blowdryer or Lighter at worst)
Helping Hands
Usb cable
Arduino IDE 021
Dremel and/or Drill
3/8″ bit
Flathead screwdriver

A lot of stuff for a newbie but if you been at this a little bit, you’ve got most of these things, minus the MQ-3.  You could use any number of other project boxes, more or less LEDs.  This is a real flexible project.

Step 2: The code

@ Code for interfacing Alcohol Gas Sensor MQ-3 with Arduino
@ Code by Daniel Spillere Andrade and Daniel Amato Zabotti
@ [email protected] / [email protected]
@ www.DanielAndrade.netconst int analogPin = 0; // the pin that the sensor wire is attached to
const int ledCount = 32; // the number of LEDs in the bar graph

int ledPins[] = {
// Here we have the number of LEDs to use in the BarGraph   53 is green 22 is red

void setup() {

for (int thisLed = 0; thisLed < ledCount; thisLed++) {
pinMode(ledPins[thisLed], OUTPUT);
void loop() {
//This is the code to light up LED’s
int sensorReading = analogRead(analogPin);

int ledLevel = map(sensorReading, 500, 1023, 0, ledCount);

for (int thisLed = 0; thisLed < ledCount; thisLed++) {

if (thisLed < ledLevel) {
digitalWrite(ledPins[thisLed], HIGH);

else {
digitalWrite(ledPins[thisLed], LOW);
} }}

For more detail: Boozeduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top