Dec 102014
 

by Christopher G. Lewis

The final results of creative projects often differ greatly from the original concepts. It’s certainly true for my EMAC 6372 final project, the “Carbon Monoxide Sensing Hat.”

noise hoodie

It only required forcing existing tech into a hoodie.

 

 

The first concept I tried to develop focused on noise pollution and frustrated me completely. It was a creative and technical non-starter with only one positive, NO ARDUINO CODING. I stubbornly persisted with it because my fearful dread of code outweighed the logistics of a proper concept I actually felt strongly about.

 

 

 

During the third week of November, still mentally bankrupt over my first idea, I realized the anniversary of the day I started smoking was Wednesday the 19th. Had it really been 20 years since Nov. 19, 1994? How many cigarettes is that? What do my lungs look like? How much money spent?

Let’s see… 1 – 2 packs per day at approximately $5 per pack ($1/pack in 1994, but as much as $10 in recent years) I’ll guess $7.50 per day spent for this calculation (about 1.5 packs/day).

$7.50 x 365 = $2,737.50, $2,737.50 x 20 years =

$54,750

I need to quit, but I’ve tried just about everything with limited to no success. I know cigarettes are bad. It says so right on the pack.

 

For health reasons, I typically only smoke the ones that complicate pregnancy

For health reasons, I typically only smoke the ones that complicate pregnancy

Then inspiration struck. I found my final project concept.

“The Black-Lung Canary CO Sensing Hat”

GasCap on a wire bust of myself I made years ago

GasCap on a wire bust of myself I made years ago

GasCap setting off CO alarm LEDs

GasCap setting off CO alarm LEDs

 

 

 

 

 

 

 

 

 

 

 

 

The name “Black-Lung Canary” references the small birds miners once used to detect deadly gasses underground. The hat functions similarly to the bird, but hats don’t die. Among the thousands of other chemicals in cigarette smoke, carbon monoxide (CO) is a proven killer. It’s the same gas released from a car’s tailpipe.

Parallax, Inc. produces an Arduino compatible gas sensing kit. The board comes with two sensors, the MQ-7 (Carbon Monoxide) and the MQ-4 (Methane).

http://www.parallax.com/product/27983

http://www.parallax.com/product/27983

The gas sensor board functions by heating up the MQ-7 sensor to purge particulates and then runs a sensing cycle. It must be calibrated by adjusting the alarm trip level in conjunction with the sensitivity level. I set both to about .8V, sensitive enough for smoke, but not overly sensitive. That took quite a bit of time as I don’t smoke inside my house and cold temperatures will affect the reading.

gas-cap_13

Using a smartphone as a serial monitor

 

My source of CO for calibrating the sensor. cough.

My source of CO for calibrating the sensor. cough.

 

 

 

 

 

 

 

Once I figured out the residue left on my clothing from the cigarettes was tripping the sensor while indoors, I was able to better calibrate the board.

A multi-meter and a tiny screwdriver are needed for calbration

A multi-meter and a tiny screwdriver are needed for calibration.

Programming has been an Achilles’ Heel for me. I won’t say I mastered it, but I confronted it and won (mostly by making changes to existing code). The process still took days to complete.

the sketch code

the sketch code

The MQ-7 sensor requires a large power draw for purging, the steps down the current for sensing. At first, I connected the sensor board to an Arduino Leonardo with a separate power source for each.

Two 9V batteries, separate switches, powering the board and processor individually

Two 9V batteries, separate switches, powering the board and processor individually

This proved too much current for poor Leonardo, which ended its life with a smoky bang as opposed to a whimper. Of course, this happened on the Saturday before Monday’s due date.

rip leo

An emergency trip to Tanner Electronics produced an Arduino UNO. It handles current better than a Leonardo and is configured almost the same way. It required updating the drivers and coding software, but eventually it worked.

I couldn't get an LCD or buzzer to wrk with this configuration.

I couldn’t get an LCD or buzzer to wrk with this configuration.

This time powered by a single 9V, I added an additional LED for the alarm and to draw off a little more juice. With a micro to USB adaptor, this can be powered by a smartphone too.

Design Sketch 2

Design Sketch 2

Design sketch 1

Design sketch 1

 

 

 

 

 

 

 

gas-cap_29

gas-cap_30

 

I normally wear either a “cadet” cap or “boonie” style hat. Unfortunately, neither of these could comfortably support the electronics.

 

 

This led me to selecting a faux leather “bucket” style hat:

bucket hat_large

Cheap and fake leather appearance, yet flexible and somewhat sturdy

I extended the wire for the 9V battery pack with the intention of it residing on a belt or in a pocket. I also dropped the idea for a LCD screen readout because of weight and complexity. A smartphone can power and read the hat’s serial output just as easily.

This is the app I installed on my Android phone.

This is the app I installed on my Android phone.

I made all electronic components removable so in order to wash the hat. After all, it’ll start stinking quickly from the cigarette smoke.

 

The wires all come with quick connect plugs.

The wires all come with quick connect plugs.

All wire connections are color coded for ease of use.

All wire connections are color coded for ease of use.

The sensor and LEDs in front connect to the controller in the back.

The sensor and LEDs in front connect to the controller in the back.

When the hat detects carbon monoxide, a red LED on the sensor board and a blue LED under the brim light up. The UNO board also prints the text:

 “Alarm. CO detected. CO kills. Stop smoking.”

This will be a constant reminder for smokers looking at their phone.

To watch the video, click here:

CO GasCap – Small

In the future, I would still like to incorporate a LCD for data readout so a smartphone isn’t needed. A smaller, better power supply than a 9V would be nice. Something like a rechargeable LiPo battery in phones would work.

I think more sensors should be integrated to detect other gasses in the smoke beside CO, and the data should be stored and charted. I could have made a wireless connection for the serial monitor, but Bluetooth is out of my price range currently. A buzzer or alarm tone should ring in addition to the LED light alarm as well.

Hopefully, a wearable tech garment like this could potential drop smoking rates even further. We all know it’s a bad habit, but sometimes in takes live-streaming “in-your-face” information to get the point across. If that doesn’t work, all the sudden activity the hat creates once smoke is detected just might. Currently, that activity is only lights and text, but imagine a hat that also beeped, vibrated, logged data for review and even tweeted (there are code sketches for auto Twitter postings). I think it would work better than gum.