Story
The quality of the air that we breathe, is very important to our health. This device analyses the air quality inside our homes, and records the values in a SD card. By analyzing the stored values, we know how the evolution of the parameters thru time was.
I will use temperature, humidity and air quality sensors that are cheap enough to use in this kind of project, without sacrificing too much the precision. The main idea behind this project is to know if the air is breathable or not.
The elected sensors are:
- DTH11 Temperature and humidity sensor, approx. $5.00 (not very accurate but good enough);
- CCS811 Air Quality Sensor module, approx $19.95.
Platform:
I used Arduino Uno before, and I felt some memory limitations, so I decided to use a different board this time. As I need an SD card to record the values, the Adafruit Feather M0 Adalogger, was a perfect choice at a good price ($19.95):
- ATSAMD21G18 ARM Cortex M0 processor, clocked at 48 MHz / 3.3V logic
- 256KB of FLASH + 32KB of RAM
- Built in 100mA lipoly charger with charging status indicator LED
- MicroSD card holder
- light (5.3 grams)
- small (51mm x 23mm x 8mm)
Building:
I started by downloading the latest version of the Arduino IDE from https://www.arduino.cc/en/Main/Software choosing the windows installer. After the installation is complete, be sure to read carefully the Adafruit Feather M0 Adalogger user manual.
To be able to use Arduino IDE with this board, we have to configure the IDE as described in the Adafruit Feather M0 Adalogger user manual. Will be necessary to add a URL to the new Additional Boards Manager URLs option. Other simple actions are required, all of them described in the manual that can be found at:
With everything configured, (don’t forget to select the right board and port on the IDE) lets do some simple test to check if everything is working. I used this code:
void setup() {
pinMode(13, OUTPUT);// initialize digital pin 13 as an output.
}
void loop() {
digitalWrite(13, !digitalRead(13)); // flash the LED with inverse value
delay(500); // wait for a half a second
}
After sending this code to the FEATHER M0 ADALOGGER, I had no errors and the red LED on the board (connected to port 13 ) started flashing. Everything was OK.
Read more: Air Quality Analyzer