Shield

1 Assembling the AirSensEUR shield

1.1 Getting the PCB

Two types of PCBs are necessary:

  1. The AirSensEUR sensor shield PCBs, which includes the sensor shield, the daughter board for temperature, humidity and pressure and the USB2Serial board schemes. It is possible to build your own PCBs from scratch using the BOM and the electronic schemes although the easiest way is to purchase them at LiberaIntentio.
  2. An Arduino USB Serial Light Adapter that allow to upload the firmware to the AirSensEUR sensor shield (https://www.arduino.cc/en/Main/USBSerial). It can be bought for example on Rs-online, Mouser or Digikey.

1.2       Installing the firmware

The firmware can be preinstalled on each sensor shield by the supplier, LiberaIntentio. However, if needed the firmware can be uploaded (see 1.2.1 below).

AirSensEUR is based on an ATMega328 microcontroller with Optiboot factory loaded. Optiboot (https://code.google.com/p/optiboot/) is a small program (called bootloader) that runs each time the microcontroller is reset or powered up. The bootloader waits some seconds for a specific set of commands coming from the serial line and, if found, enters in a “programming mode”. This operating mode expects to receive a binary file through the serial line thus erasing and programming the internal flash. If, the specific set of commands were not found on the serial line, the bootloader starts the program (if any present) located to a fixed flash memory address.

Optiboot can be found on each ATMega328 based board (for example the Arduino UNO™) and on the AirSensEUR board. For this reason, AirSensEUR is “seen” by the Arduino IDE like a “plain standard” Arduino UNO. Thus, AirSensEUR can benefit from a worldwide available open source code and libraries targeted to ATMega328 based Arduino™.

A custom firmware was developed to instruct the ATMega328 microcontroller to properly connect to other on-board peripherals on the AirSensEUR board, to generate the needed timings, read samples, pre-process them by filtering and temporarily store on the microcontroller memory. This firmware is also responsible for the implementation of a serial protocol used by an external host to setup working parameters and retrieve sampled data. This software is provided as source code and needs to be compiled then uploaded to the AirSensEUR for the very first time or if upgrade is needed. This operation can be done by following this step by step guide below.