Friday, July 11, 2014

Monitoring Radon with Arduino

I live in the Midwest, in Chicago suburbs. When I bought my house several years ago I ordered Radon gas check and the levels were in normal range. From what I read about Radon, it's levels can change during the year and season. I always wanted to check its level real-time and find the factors causing its fluctuation if it is possible.

I bought a Safety Siren Pro Series 3 Radon Gas detector from Amazon (Model No: HS71512) and did some initial measurements. On my living floors the radon levels were OK, but I was mostly interested in basement, which is unfinished non-liveable "crawl space", used mostly for storage. Would be great to have the Radon measurement process automated, without the need to crawl into basement every time to check the readings.

I found excellent article written by Chris Nafis which exactly targeted my task. Recently I've got a spare Arduino Kit from SparkFun Electronics and decided to use it for the Radon detection automation. You can get a lots of basics and instructions from Chris's radon work, I will explain here only what I did differently.

First of all, the Safety Siren Radon Gas detector has to be modified, which will void your warranty. Instead of having a set of cables directly attached to a Safety Siren detector board, I installed a 25-pin DB-25 connector on top of Radon Detector, and cut a LPT-port cable in half from my old PC. I soldered the cable wires to my Arduino and put it along with Ethernet Shield into a small plastic box. See the picture below of what I have today running in my basement.
 

Below is the picture of LPT cable ends with soldered wire pins I used for experimenting. Later I removed all the pins and soldered cable wires directly to the Arduino board, so the whole construction would fit into the box.


An interesting challenge was the detection of Long / Short setting of Safety Siren detector (1 week or 1 month of approximate radon data). I noticed that after reset the detector automatically turns on into Long setting, but I wanted to rely on the actual settings and not assume anything. Chris has an Arduino program for older Model HS80002 listed on his website, but I had a newer HS71512, and Long / Short detection logic were missing in the program. First I thought I can read the Long / Short LED, but unfortunately soldering into it was not an easy task without disassembling the Safety Siren board, so I decided to take a programming approach.

I noticed that the Long / Short settings has some timing differences. See two screenshots below, each screenshot has two channels displayed. On a first screenshot the DIGIT_4 strobe (lower channel on screenshot) goes 0 almost immediately with LTL signal (upper channel) when we are in Short setting. In Long setting, this two signals has a timing difference, so the second screenshot illustrates it.


 So to handle this timing difference, I used interrupts functionality of Arduino. The Arduino Uno has int0 on pin2, which I attached to LTL from Safety Siren detector.

attachInterrupt(0, detectShortHandler, RISING);

The interrupt service routine is very simple - if DIGIT_4 is 0 - we are in Short mode, if opposite - we are in Long.

void detectShortHandler()
{
  delayMicroseconds(100);
  if (digitalRead(DIGIT_4) == LOW)
    state = ST_SHORT;
  else
    state = ST_LONG;
}

Please note a small delay I had to add before processing the DIGIT_4 strobe value. The DIGIT_4 goes to 0 "almost" immediately, see a screenshot below, hence the pause.



Finally, I had the radon values detected, processed and periodically (once per ~30 minutes) published to Xively free service (former Pachube). Below is a graph of the Radon level in my crawl space after several days of monitoring.
Note that I have only "long" setting presented. After several weeks of collecting data, my Safety Siren detector failed to switch to Short. I think it is a detector issue (probably internal firmware fail), because it still switch into Long and stay there even after I disconnected Arduino and did a full reset of Safety Siren detector. Well, I cannot exchange detector because I opened it and I will not buy another one (~$100 is too steep for a small project), so I'll stuck with Long setting for now.
Update: after about 4 months both the "long" and "short" settings started to operate normally. I think the reason might be a power supply, this is the only thing which I changed with my current setup during that time.

For those who would like to repeat this project - I published my Arduino program on GitHub, feel free to use it and get back to me if any questions.

4 comments:

  1. That all looks highly technical. I would honestly be a bit overwhelmed to do a project like this. You used a 25-pin DB-25 connector, but could I use a different connector—assuming there are different types of connectors available. Certified Radon

    ReplyDelete
  2. Yes, it might look complex on a first thought. Answering your question - connector type is not very important. If you don't plan to move your detector around very much you can even solder wires directly and omit connector.

    I love electronics, so I did it mostly for fun. After almost a year from project completion, I am thinking what I would done differently. If I would be interested in a working device and obtaining results only, I'd buy a RM-60 module from Aware Electronics ( http://www.aw-el.com/price.htm ). It detects Alpha particles, has a serial port connection for your PC or controller of choice, and still not very expensive (~$180).

    Alternative approach - buy an assembled "Arduino IDE compatible Geiger counter dosimeter /w LCD shield" on ebay ( for example here - http://www.ebay.com/itm/161558397392 ). It will cost you ~$35.00 plus some extra for a Geiger tube (for example SBT11 costs about the same amount).

    Both approaches hopefully give you enough to start dealing with radon without getting too deep into soldering and schematics.

    ReplyDelete
  3. How did yo do the step " I installed a 25-pin DB-25 connector on top of Radon Detector"? Thanks

    ReplyDelete
    Replies
    1. I was not completely correct in my explanation - it was installed actually on a side of detector, not on top. See the first photo.
      In a past I bought about a dozen of DB-25 M and F connectors for a couple of dollars on E-bay for another project, so it was a natural choice.

      Installation had two steps. First is to cut a hole in plastic hood for DB-25, glue it in and fasten with two screws. The second step is more complex: wiring and soldering connector pins to 7-segment indicator matrix. I made a couple of mistakes in wiring, it took me several hours to figure it out and rework, so it definitely requires more attention.

      I am pretty sure if SafetySiren folks will come up with pre-installed connector in their next version, or provide any other interface to read the data - it will make their device even more popular.

      Delete

Note: Only a member of this blog may post a comment.