The AirQuality SenseBox (AQSB) is not a matching the original SenseBox-approach. Instead it is a kind of a Wireless Sensor Network.
The Network is divided into autonomous "Outdoor Units" (sensor nodes), which measure air quality and "Indoor Units" (gateways) which provide gateway functionality. The Sensor Nodes are periodically broadcasting their data via radio. Gateways can receive this data and perfom further operations with it.
The Wireless Sensor Network is forming a Mesh-Network.
The Sensor Node consists of the AirQuality Sensor Shield, which was developed by the AirQualityEgg developers. On the contrary to the idea of the AQE Developers, the Sensor Shield is not plugged into a "normal-form-factor" Arduino, but is connected to a RFBee, which also provides an Arduino-Compatible microcontroller and a low power Radio Chipset (TI CC1101), which is quite powerfull. A GPS (sparkfun Venus) is added to the Sensor Node, so the platform will be aware of its position. The Node will be powered by a rechargeable battery and a Solarpanel. As the logic of the RFBee is running a on 3,3V and the SensorShield is runnning on 5V a Step-Up Converter is required to power the Sensors.
List of Components:
- RFBee (18,90 EUR)
- AirQuality SensorShield (v 1.4) ( 71,00 EUR)
- Venus GPS + Antenna (41,50 EUR + 10,56 EUR)
- Grove XBee Carrier (15,80 EUR)
- Battery (38,54 EUR)
- Solarpanel (14,90 EUR)
- Logic-Level Converter (3,60 EUR)
- 5V Step-Up Converter (5 EUR)
- Various Cables (3 EUR)
Costs Per Unit: 222,80 EUR
: There is an dangerous error in this Set-Up which could destroy your RFBee! Not only the Power needs to be converted, also the logic has to be. So an additional logic-level-converter is needed -- DustinDemuth
To test the sensor platform in an outdoor environment, we build an enclosure from Lego bricks, which should make use of convection inside of the enclosure to create an airflow.
The Software is written for the Arduino Environment. As our SensorShield
is not the original one, we had to customize the recent library of the AirQualityEgg
. This customization can be found in the svn https://svn.52north.org/svn/swe/incubation/sensebox/AirQualitySenseBox/libraries/EggBus/
The original library for the RFBee (Dustin received that one by E-Mail from one of the developers) was not sufficient for the usecase, so it was also customized, the library can also be found in the svn: https://svn.52north.org/svn/swe/incubation/sensebox/AirQualitySenseBox/libraries/RFBee/
After each loop the Board is going to sleep mode for 4 seconds. The code will loop 15 times. Each loop a new Measurement is taken. To filter outliers, the arithmetic mean is calculated. After 15 loops a Message is braodcasted, containing:
- MAC Address of the SensorShield
- Humidity (fixed point)
- Temperature (fixed Point)
- NO2 (Raw Impedance
- CO (Raw Impedance)
- Battery Level
12 || 9 ||9 ||4 || 4 || 8 || 8 |3 |1 = 58
MAC || LAT ||LON ||HUM ||TEM || NO2 || CO |BAT|!
The first bit of the temperature section defines if the temperature is positive or negative. When TEM = 1058 then TempC
5.8 ; when temp = 0988 then TempC
= -1.2 so A receiver only has to substract 1000 and divide by 10 to get the floating point value from the message.
The gateway receives the messages broadcasted by the SensorNodes. It splits the message into its single components, converts the raw impedance of the NO2 and CO Measurements to ppb. After this conversion the message can be stored on the SD card and/or be send away to data-logging services like cosm or thingspeak. In future releases, support for the sensor observation service will be added.
Gateways support one single feed/channel per sensor node and can store a different api-key for the data-logging service for each sensor node. Those keys and channel-ids are stored on the SD card in folder matching the CRC32-hashed value of the SensorShields MAC-Address.
A folder-Structure on the SD-Card looks like:
This example identifies 4 different MAC-Addresses and their respective API-Keys and Feed/Channel ID's. Due to this information, data can be uploaded to the logging platform.
The Gateway consists of an IBoard Pro (Which is a clone of the Arduino Mega 2560, extended with a Ethernet Chipset, a Real-Time-Clock and a SD-Card Reader) and a RFBee.
List of Components:
- IBoard Pro (38,08 EUR)
- RFBee (18,90 EUR)
- Power Supply (...... EUR)
Total Cost of the Gateway: 56,98 EUR
A second option for hardware design is currently under development. This one should upload data to the service via a GSM/GPRS connection.
The gateway is also programmed in Arduino, the sourcecode can be downloaded from the svn:
The RFBee which is plugged into the Gateway needs a different software than the one from the node. The software is also in the SVN