Egg Shield

The Egg Shield is an Arduino shield with Temperature, Humidity, CO and NO2.

Getting Started

If you have purchased an Egg Shield, here are the steps to seeing some sensor values:

  1. Plug your shield into the Arduino/Nanode, and power up. Remember to only plug in one power source at a time. If you power the shield, it will also power the Arduino, and vice versa.
  2. Connect your computer to the device with a USB or FTDI cable.
  3. Download this sample sketch and put it into your Arduino environment’s library folder.  The latest EggBus library is located on Git-Hub here.
  4. Open up the Arduino environment, open eggbus.ino sketch and load it onto the ‘duino.
  5. Open the serial monitor at 9600 baud.
  6. Reset the device.

As a little background before we look at the results of that: The CO and NO2 (and any additional sensors you add later) are accessed using a bus, while the temperature and humidity sensor is read directly from the pins with Analog 3.

When you reset, you should see output something like this:

===========================
Egg Bus Address: 0x3
Firmware Version: 3
  Sensor Address: 00:04:A3:27:C7:6E

This prints out your MAC address (only the Nanode has a MAC address. See this blog post). Next, every 5 seconds the sketch will poll the egg bus, and print out something like this:

--------------------------
  Sensor Index: 0
    Sensor Type: NO2
   Indep. Scaler: 0.00010000
  Table X Scaler: 0.40000000
  Table Y Scaler: 1.70000004
 Measured Value: 5568 => 0.55679998
              R0: 2200
Implied Resistance: 1224.95996093
     Table Row 1: [62, 117] => [24.80000114, 198.90000915]
     Table Row 2: [75, 131] => [30.00000000, 222.70001220]
     Table Row 3: [101, 152] => [40.40000152, 258.39999389]
     Table Row 4: [149, 188] => [59.60000228, 319.60000610]
     Table Row 5: [174, 204] => [69.59999847, 346.80001831]
     Table Row 6: [199, 219] => [79.59999847, 372.30001831]
     Table Row 7: [223, 233] => [89.20000457, 396.10000610]
     Table Row 8: [247, 246] => [98.80000305, 418.20001220]
    Sensor Value: 0.0020710244
    Sensor Units: ppb
---------------------------
  Sensor Index: 1
    Sensor Type: CO
   Indep. Scaler: 0.00040000
  Table X Scaler: 0.00300000
  Table Y Scaler: 165.00000000
 Measured Value: 639 => 0.25559999
              R0: 750000
Implied Resistance: 191700.00000000
     Table Row 1: [134, 250] => [0.40199999, 41250.00000000]
     Table Row 2: [168, 125] => [0.50399999, 20625.00000000]
     Table Row 3: [202, 49] => [0.60599999, 8085.00000000]
     Table Row 4: [232, 12] => [0.69600000, 1980.00000000]
     Table Row 5: [241, 6] => [0.72300000, 990.00000000]
    Sensor Value: 0.0349701499
    Sensor Units: ppb

This shows you that there are two sensors on the bus. Sensor 0 is an NO2 sensor and Sensor 1 is a CO sensor. The gas concentrations are reported in parts per billion (ppb). We have a concentration here of 0.034 ppb CO which is low according to Wikipedia. Two ppb of NO2 (0.000002 ppm) also low.

Remember, you need to give the sensors time to warm up.

Connecting to the web

Hopefully, you are getting some data from your shield at this point. But it is much more fun to connect to the web and see your data graphically!

Fortunately, the Ethercard library has an example sketch connecting to Cosm (aka Pachube), pachube.ino. You will of course need to sign up to Cosm to post.The sketch is well commented.

Once you have done that you can go to airqualityegg.com and post where in the world your sensors are.

Files: EggBus [libraries folder], Xively connection.