loading
Picture of The Talking Breathalyzer
Breathalyzer_02.jpg
Breathalyzer_01.jpg
Breathalyzer_03.jpg
Breathalyzer.jpg
*** Additional info at http://droidalyzer.com/talkingbreathalyzer/ ***

Video of the Talking Breathalyzer in Action:


More detail on the Talking Breathalyzer:




A customizable Breathalyzer that talks and tells you how much you’ve had to drink. It’s also open source and can easily be modified with your own text on the LCD screen and audio MP3 files.

When tethered to a PC with a USB cable, it has additional features including character animations, Breathalyzer Tweets, text to speech, weather and stock read-outs, and a Photobooth feature.

The Talking Breathalyzer is not a professional Breathalyzer and should be used for Amusement Purposes Only.

Part List

Seeeduino or Arduino - $25
Seeed Music Shield - $27.50
Seeed Twig Alcohol Sensor - $7.90
Seeed Twig Serial LCD - $13.90
Seeed Twig Cables - $4.90
2 GB MicroSD card (cards larger than 2GB will not work) - $7
Protoboard
10k Potentiometer
4 Momentary Switches
1 Off/On Switch (for power)
5 10k Resistors
1 Toggle Switch
Enclosure of your Choice
LIPO Battery - $23
LIPO Rider - $9.50
Talking Breathalyzer Software - Free
Head Phones
Mini USB Cable
USB Charger
Solar Panel Optional
Speaker Amp and Speaker Optional

*** A cell phone based version of this project is at http://droidalyzer.com ***
 
Remove these adsRemove these ads by Signing Up

Step 1: Schematic and Assembly

Assemble following the schematic below. The assembly and layout will vary depending on the enclosure you are using. I used Adafruit's Arduino case but note that the Serial LCD used made by Seeedstudio is an older model, the new Serial LCD from Seeed will not fit into this case so you'll either need to find a bigger case or go with an alternative Serial LCD. I had a custom PCB board made but you can just as easily use a generic proto board and simply cut out the shape you need. This video describes the components of the Talking Breathalyzer.


Step 2: Using the Breathalyzer in Portable Mode

Picture of Using the Breathalyzer in Portable Mode
IMG_7490.JPG
The Breathalyzer comes presetup for stand alone mode. In stand alone mode, the Breathalyzer runs on its own battery power without a connection to a PC.

The Breathalyzer has 4 buttons. Button 1 starts the Breathalyzer function by first heating up the alcohol sensor for 20 seconds and then prompting the user to blow. After the user has blown, the Breathalyzer results are announced (LCD screen and Audio) and then the alcohol sensor is powered down and the Breathalyzer goes into an idle state. While in idle, the LCD screen, Arduino microcontroller, and speaker amp will continue to draw power so it’s best to power off the Breathalyzer while not in use to conserve the battery. Buttons 2,3, and 4 are open to be programmed for custom functions.

The toggle switch changes the Breathalyzer back and forth from normal operation to raw data operation. When operating in raw data, the alcohol sensor is heated up and alcohol sensor value is displayed on the LCD screen. Note: Keeping the alcohol sensor heated up in this mode will increase the drain on the battery. Raw data operation is useful if you want to overwrite the default Breathalyzer calibration settings and also to see the alcohol sensor data values.

Turning the knob will change the character that speaks the Breathalyzer results. You’ll hear a different character sound as you turn the knob and the character changes. Stop turning when you’ve got the desired character.


Step 3: Using the Breathalyzer USB Tethered to a PC (PC Mode)

Step 4 describes how to switch the Breathalyzer to PC mode which involves downloading a new Arduino firmware to the Breathalyzer and then USB connect the Breathalyzer to your PC. In PC mode, the Talking Breathalyzer includes additional features:
  • Animated Readouts of Breathalyzer Results with 4 Characters (Spooky, New York Cabbie, Old English, and Pirate), See the Characters here
  • Tweeting of Breathalyzer Results (optional and turned off by default)
  • Weather and Stock Readouts
  • Photobooth Feature
  • Customizable Breathalyzer Audio Responses with Text to Speech or User Supplied MP3s
Video of the Talking Breathalyzer in PC Mode:

Step 4: How to Switch from Portable Mode to PC Mode and Vice Versa

Picture of How to Switch from Portable Mode to PC Mode and Vice Versa
This video describes how to toggle the Breathalyzer from stand alone/portable mode to PC/USB connected mode.

Step 5: Customizing the Breathalyzer in Portable Mode - Arduino Code Walk Through

Picture of Customizing the Breathalyzer in Portable Mode - Arduino Code Walk Through
Breathalyzer.jpg
Breathalyzer_01.jpg
Here's how to customize the Breathalyzer Arduino code when it's running in stand alone/portable mode. These two videos describe the code for the portable mode. The actual code is here.

Breathalyzer Arduino Code Walk Through Part 1 Video:



Breathalyzer Arduino Code Walk Through Part 2 Video:


Step 6: Adding Custom Functions in Portable Mode

Picture of Adding Custom Functions in Portable Mode

In addition to the Breathalyzer function, there are three buttons available (buttons A, B, and C in the schematic) for custom functions.

In the default code, button 2 displays “TIME FOR BEER” on the LCD screen and plays a beer drinking song you supply. To use this feature, rename a beer drinking song of your choice to beer.mp3 and copy to the root directory of the microSD card.

In the default code, button 3 is a “Name that Show” game.  When button 3 is pressed, a TV show theme song plays and then the user has a few seconds to guess the name of the show before it is displayed on the LCD screen. To use this feature, you’ll need to supply your own MP3 sound clips copying them to the root of the microSD card and then editing the show and mp3 names in the code. The theme song MP3s can be as long as you like but it’s recommended to keep them to 15 seconds or less to keep the flow of the game going. Thus, you’ll want to use an audio editor to shorten them.

/////********* SHOW THEMES HERE ******************************

prog_char string_65[] PROGMEM = "dallas.mp3"; //show tune

prog_char string_66[] PROGMEM = "DALLAS";     //displays the name of the show on line 1 of the LCD

prog_char string_67[] PROGMEM = "";           //continues to display name of show on line 2 of LCD if needed, leave blank if not needed

prog_char string_68[] PROGMEM = "mvice.mp3"; //show tune

prog_char string_69[] PROGMEM = "MIAMI VICE";     //displays the name of the show on line 1 of the LCD

prog_char string_70[] PROGMEM = "";           //continues to display name of show on line 2 of LCD if needed, leave blank if not needed

prog_char string_71[] PROGMEM = "airwolf.mp3"; //show tune

prog_char string_72[] PROGMEM = "AIRWOLF";     //displays the name of the show on line 1 of the LCD

prog_char string_73[] PROGMEM = "";           //continues to display name of show on line 2 of LCD if needed, leave blank if not needed

 

In the default code, button 4 is a “Name that Movie” game and works in the same manner as button 3. Here also you’ll need to supply your own MP3s copying them to the root of the microSD card and then edit the movie names and mp3s in the code.

/////*********MOVIE QUOTES HERE ******************************

prog_char string_188[] PROGMEM = "2001.mp3"; //movie quote

prog_char string_189[] PROGMEM = "2001 SPACE";     //displays the name of the show on line 1 of the LCD

prog_char string_190[] PROGMEM = "ODDESEY";           //continues to display name of show on line 2 of LCD if needed, leave blank if not needed

prog_char string_191[] PROGMEM = "airplane.mp3"; //show tune

prog_char string_192[] PROGMEM = "AIRPLANE";     //displays the name of the show on line 1 of the LCD

prog_char string_193[] PROGMEM = "";           //continues to display name of show on line 2 of LCD if needed, leave blank if not needed

prog_char string_194[] PROGMEM = "dodgebal.mp3"; //show tune

prog_char string_195[] PROGMEM = "DODGEBALL";     //displays the name of the show on line 1 of the LCD

prog_char string_196[] PROGMEM = "";           //continues to display name of show on line 2 of LCD if needed, leave blank if not needed

 Of course if you know a little Arduino programming, you can modify the code and do whatever you want.

Step 7: The Source Code for PC Mode - Adobe Flash Action Script 3.0

Picture of The Source Code for PC Mode - Adobe Flash Action Script 3.0
pumpkin drunk.jpg

The PC application that powers the Talking Breathalyzer is written in Adobe Flash Action Script 3.0. The diagram below shows how it works: The PC software listens for data coming in from the Arduino via a serial server (serproxy.exe) which is a background process running on the PC.

Here is the source code if you want to make any tweaks on your own. The main program is fairly complex and consists of 8,000+ lines of code but if you know your way around Action Script 3.0, you'll be able to figure it out. You'll need a copy of Adobe Flash Professional CS5 or higher to open and compile the source. Definitely shoot me a note if you add something cool.

Step 8: Software Installation and Manual

Picture of Software Installation and Manual
After you've built the Talking Breathalyzer, you'll need to the Breathalyzer software to get things up and running. This step describes how the install the software for both Portable and PC Modes. Sorry Mac and Linux users,the automated installation program is for Windows users only. The software will work on the Mac and Linux but some additional manual setup steps would be required.

1)  Download the Breathalyzer Software from http://talkingbreathalyzer.com/install.html.

 2)  Launch the setup program and follow the prompts to install the software.

 3)  Insert the USB cable into the Breathalyzer and plug the other end into your PC.

 4)  If you’re on Windows 7, the driver should install automatically. If you’re on Windows XP, you’ll be prompted for the driver. Install the driver from c:\Program Files\Breathalyzer\drivers or c:\Program Files (x86)\ Breathalyzer\drivers if your OS is 64bit.

The driver will install automatically on Windows 7.

 5)  Window XP Users Only: Driver install for XP users.

After installing the driver, you will be prompted to run through the same screens a second time.

Note: The software installation also includes a customized version of the Arduino software. If you are an existing Arduino user, technically you could use your existing Arduino software to modify the code but you’ll need to copy in some extra files and libraries so rather than go through this trouble, it’ll be easier to just use the customized Arduino install included with this installation.

The full manual can be downloaded here http://talkingbreathalyzer.com/manual.html

Step 9: Alternate Case Installation

Here's another Talking Breathalyzer build, same insides just with a bigger case. The extra room makes it easier to get the components in there and also there is a room for an internal amp and speaker.
azmirulazmel10 months ago

can you please email me the circuit diagram for the upper part of the device (switch, potentiometer etc). your help are very much appreciated. azmirulazmel@gmail.com

clink41 year ago

Any way the source code can be posted... Website it references is taken down.

alinke (author)  clink41 year ago
oops, sorry about that, the link has been updated, here it is as well

http://droidalyzer.com/talkingbreathalyzer/
clink4 alinke1 year ago
Thanks for the quick reply!
techboy4112 years ago
AWSOME!
thanks man :)
great job man,but can you link where did you download voices
alinke (author)  bakinkoljach3 years ago
Hi, the voices were done by a professional voice actor, they are included in the software download from http://talkingbreathalyzer.com/software.html. After you run the install, you'll see them in "Your My Documents Director" \breathalyzer-files\Breathalyzer MP3s