Monthly Archives: October 2011

MQ3 :: A quick project

Still waiting on Arduino to release their official WiFi shield for my C3 project. So my mind began to wounder. And I started an Android app to help post articles to www.talentopoly.com. But got stalled due to waiting on 3rd party API support. So my mind began to wounder.

About two weeks ago I was browsing www.sparkfun.com checking out some of their Sensors and day dreaming about fun things to do with them, and came across this, the $4 MQ-3 Alcohol Gas Sensor. I immediately straightened up in my seat and all my synapses that had been on vacation began firing again.

You see, all my hardware projects so far get to a point of some sort of moderate success, and then get promptly torn down to produce another project. Mainly because their components are expensive and I don’t want to re-buy them all. But also because those projects weren’t something I could easily show someone. With the project now swirling around in my head, it was something I could put together, and keep together. And it would have obviously and meaningful applications to anyone I showed it to.

The project of course, is a Breathalyzer.

And after two nights of putzing around with it, I got it hooked up to a simple circuit, along with a 10 segment LED bar, and have it working.

This past weekend I put it to the test but came up short. Even after 3 beers it was still not able to detect anything. By the end of the night after 10 beers, the highest reading I got was 5 (out of 1023). The effective range of the device it turns out, is MUCH smaller than the absolute range I was reading it in. So the next day I adjusted the AREF (Analog Reference) value to greatly shrink the range I was reading. This boosted the sensitivity 4.5x. It can now readily detect just a single beer on your breath.

In addition to this I added in continuous sampling of the base line readings, and factor them out in order to get more constant and reliable values. My ultimate goal here is to make this as accurate as is possible with the MQ-3 sensor (there are certainly some very real limitations to this sensor), and to make it hand held. With a side goal of making it awesome 😉

This week I ordered a 16×2 character LCD display to display the calculated BAC, and more 10 segment LED bars to increase the resolution of the bar graph. Once that is all tested and working, I want to package this up in an enclosure and make it handheld.

C3: The bad news and the good news

So it’s been a bit since my last update, and that’s because things have stalled.

The bad news is I’ve hit a bit of a wall in terms of long term stability with my existing WiFi module. I’ve addressed issue after issue gradually improving stability of the WiFi stack and my own code. But in the end I just can’t get it to stay alive long enough. Even a few days of stability isn’t good enough for an Alarm Clock that I’d be relying on to get me to work on time. I could pursue the issues further into the WiFi stack, but it would take a fairly big time investment. Since the stack and hardware are no longer supported I’d be investing all of this time into what is essentially dead hardware. If I ever wanted to upgrade or make another one of these clocks, all of this time would be wasted since I couldn’t buy another one of these WiFi modules.

The good news however is there is a ray of hope! Truly excellent news out of Maker fair: Arduino (the company) announced several new Arduino’s (the micro-controller) which is great and all, but most excellently, they announced an official Arduino WiFi shield! The library and hardware will be officially supported going forward! They are due to release some time in October, so my project is stalled until I can get my hands on one of these, but this is truly great news for all of my projects which usually have wireless connectivity at their heart 🙂