So you did everything in the tutorial yet it still doesn’t seem to be working right? Here are some useful tips to help you troubleshoot your DrinkShield.
Common Behavior
First off lets start with common behavior of your new DrinkShield. When you first plug in your device all the lights typically light up. This is because the shift registers are typically set to send a HIGH signal for all connections. The sensor that you blow into is called an MQ-3 Sensor and is actually a small heating element. You will find that this sensor gets warm to the touch but should not burn you. That is perfectly normal.
Standalone firmware: When you upload the stand alone version it will flash the player lights approximately 10 times then the ready light will go green. When the device is flashing it is actually taking an air sample to use as it’s baseline. This is for several reasons. The MQ-3 sensor needs to be tuned to your current air quality. In a lot of breathalizers this is done using a variable resistor. We took a software approach because the MQ-3 sensor becomes less sensitive over time and by taking an air sample each time the device is powered on allows us to recalibrate for each use.
DrinkduinoGame firmware: You can not play the Drinkduino Game using the standalone firmware. If you intend to connect the DrinkShield to a computer to play the Drinkduino Game then you need to load up the DrinkDuinoGame firmware. This firmware starts up exactly like the standalone but the player ready light will turn red. The device will not take readings until a player presses the big ready button on the game interface. At that time the light should turn green and wait for a reading.
Not all of my lights are lighting up when I first plug it in
This maybe because you solder the LEDs in backwards or perhaps you have a bad LED. Often it is simply that the shift registers were not sending a HIGH signal in their default state or you have already pushed firmware to the device (Which will set all output of the shift registers to a LOW state).
The lightbar is not registering when I blow into the device
The lights may no be lighting up because of the test you are running as well. The sensor can only detect active alcohol and not alcohol in your blood stream (BAC). If you are drinking to test the device then it is important to take a drink then immediately blow into the device. The player ready light should be green as well. Beer should register at least one green light but probably not much into the yellow. A mixed drink should range between yellow and red. A shot of vodka should reach the top of the red.
Another issue that sometimes happens is that when the device is first used the MQ-3 sensor still has some factory gunk on it. Simply let the heating element warm up for a few minutes to burn off all the stuff. Then unplug and plug the device back in so it can recalibrate.
The DrinkShield is not working with the Drinkduino game
Ensure you have the DrinkduinoGame firmware loaded into the DrinkShield. Also ensure you are passing the proper parameters to the drinkduino commandline. You can override the defaults to pick the proper serial connection (/dev/ttyACM0, etc.) This should be the same serial interface you used to upload the firmware.
The DrinkShield is giving very inconsistent readings or no readings at all
Sometimes this is because of the power being supplied to the arduino. The DrinkShield requires at least 5 volts. While a usb is suppose to deliver 5 volts, some laptops under-perform in this category. Re-test your device by plugging it directly into a walware or supplying a battery pack that can provide of 5 volts. If you are using rechargable batteries, ensure you are providing at least 6 volts.
Also be aware that the readings will stop the moment you stop breathing into the device. This is especially true or the Drinkduino game. This is because it can take a long time (up to a minute or so) for the MQ-3 to settle back down after a reading. To provide immediate feedback of the reading we record the highest reading before the reading started to go back down. So if you start to blow into the device and move your mouth away it will register early. This is also true if you exhale into the device just before you are getting ready to blow (Note: This actually happens a decent amount when drunk)
Advanced troubleshooting
You can use the serial interface and the DrinkduinoGame firmware to manually test results. In the arduino software, push the DrinkduinoGame firmware to the drink shield and then connect via the serial monitor.
See http://www.gfxhax.com/drinkshield/drinkshield-coding/ for a full list of commands
Some useful troubleshooting commands:
- lighttest – type ‘l’ and press enter to test all your lights.
- initialize – type ‘i’ to re-initialize the device
- auto-calibrate – type ‘a’ to cause the device to recalibrate
- To test type ‘r’ (player ready) then blow. You should receive a numeric value of the blow attempt
