Introduction: The Droidalyzer - an Open Source, Bluetooth Alcohol Detector Accessory for Android Phones
***** Product Version of the Droidalyzer available now from Seeedstudio ******
The Droidalyzer is an open source, Bluetooth alcohol detector accessory for Android Phones. Pair the Bluetooth enabled Droidalyzer to your Android phone and then use it to detect your alcohol level.
The Droidalyzer is not a professional Breathalyzer and is for entertainment purposes (ie, fun). It does not output a blood alcohol content (BAC) reading and rather plays different audio responses relative to alcohol levels with four character voices to choose from. After each alcohol reading, you're prompted with various options such as calling a preset designated driver, calling a taxi, finding nearby friends and places (via Facebook integration), and even a random drunk dial option if you’re feeling adventurous.
• Small form factor, easily fits in your pocket
• Doubles as a phone charger with the included a re-chargeable battery (use a standard USB charger)
• Mouth piece not required to keep things sanitary when sharing the alcohol detector among friends
Android App Features
• Four selectable characters (old english gentleman, pirate, spooky, and mean guy) who speak the alcohol detection results in their own personality
• Verbal alcohol detection responses can also be personalized using Text to Speech
• Support for English, French, Spanish, and Simplified Chinese
• Pre-store designated driver and taxi phone numbers
• Simulation mode that allows you to try the app without the hardware
Altoids Tin - $2
IOIO Board - $50
Seeed Lipo Rider - $10
Seeed Grove Alcohol Sensor - $8
LIPO Battery - $6
Bluetooth Dongle - $5
On/Off Switch - $1
Another IOIO board or a PIC3KIT programmer (required if using Bluetooth to upgrade the IOIO firmware to Bluetooth compatible)
Android Phone - 2.3.3 or above if using Bluetooth. Android 1.6 and above will also work but you'll need to connect the Droidalyzer to your phone with a USB cable as opposed to using Bluetooth.
The key component of this project is the IOIO board (pronounced yoyo) which enables an Android phone to receive data from external sensors (an alcohol sensor in this case). There are a few other methods to interface Android to external sensors including new hardware and an API from Google called ADK but IOIO in my opinion is the most mature and easiest way to go, plus this project needed to communicate over Bluetooth as opposed to a hardwired USB cable which ADK does not support. Ytai Ben-Tsvi, the guy who runs IOIO, has things well documented at IOIO Wiki as well as an active support community for questions and was kind enough to allow us to use IOIO in this project.
Video in HD
A little more nitty gritty detail on how it works
Video in HD
Step 1: Preparing the Components
First thing you'll need to do is upgrade your IOIO to be Bluetooth ready, instructions here
If you're using an Altoids tin for the enclosure, you'll need to de-solder the connectors on the Seeed Grove alochol sensor and Seeed LIPO rider as there won't be enough room with the connectors to mount everything inside the tin.
Step 2: Schematic
Here's the schematic
Pin 40 gets the analog output of the alcohol sensor.
Heating up the alcohol sensor takes up battery life so to conserve the battery, the app will only turn on/heat up the alcohol sensor when it is needed. When pin 1 is LOW, power goes to heat up the alcohol sensor. When pin 1 is HIGH, power is turned off to the alcohol sensor.
The Seeed LiPO Rider takes the 3.3V out from the LiPO battery and outputs the 5VDC that the IOIO needs to run. Plug any standard USB charger into the mini USB port on the Seeed LiPO Rider to charge the battery.
Step 3: Assembly
Wire up everything per the schematic and be sure to leave enough length in the wires such that you can mount all the components in the Altoids tin. Like any project, do a test with your Android phone before final mounting to ensure everything is working as it should. The pictures illustrate the assembly positioning of the components.
Step 4: The Droidalyzer Android App
The Droidalyzer Android app is available on the Android Market from the link and QR code below. The app has a simulation mode so even if you don't have the Droidalyzer hardware, you can still install the app (it's free) and play around to see the functionality knowing of course it won't detect any actual alcohol without the Droidalyzer hardware. You can also see how it works from the screen grabs below.
App Link from Android Market (Free)
Once you've got the app, pair the Droidalyzer to your Android phone. This pairing will only work on Android phones 2.3.3 and above, the bluetooth pairing code is: 4545 and the Droidalyzer will show up as "IOIO" in Bluetooth settings. If you've got a phone below Android 2.3.3 but above 1.6, then you can still do the project but not over Bluetooth and instead will need to use a USB cable to connect the Breathalyzer to the phone. If using a USB cable, then you'll also need to turn on USB debugging. From your phone, go to Settings --> Applications --> Development --> USB debugging (ensure the box is checked).
Note also that not all Android phones support IOIO, a list of supported Android phones can be found here.
After you've got the Droidalyzer paired or USB connected, then launch the app and if all goes well, the top of the screen will read "Breathalyzer Status: Connected".
Note that the Droidalyzer is not a professional breathalyzer and is for entertainment purposes only (i,e, fun) and by no means should be used to determine whether or not one should drive after consuming alcohol. It does not output BAC but rather outputs 4 levels of alcohol consumption: No Alcohol Detected, Almost Sober, Tipsy, and Drunk.
We had quite a few requests for an iPhone app. To develop hardware accessories for Apple even if only just using the Bluetooth stack, one must fill out an application and obtain Apple's approval which I did. Unfortunately, I got a "Apple cannot support you at this time answer" so it's Android only for now.