Project: Evaluation of CO2 sensors

some sensors still in calibration phase

In my home automation system I use CO2 sensors from Netatmo and some MH-Z14A based arduino nodes.

I really like, that the Netatmo sensors work for about a year on battery. But they can only be integrated with a cloud api into my home automation. This has led to one interruption of several hours in the past, when the service was down. As I regulate my heating with the measured data of these sensors, this was problematic. 🙂

What I am missing with the battery powered Netatmo sensors, is a led indicating air quality.

To remove the dependency of the cloud api, I decided to build my own sensors. But before I order more MH-Z14A sensors, I want to make an evaluation.

Caution: This article is about the experiences I made in my setup with the sensors I have and with the (maybe buggy) code I wrote. It may be, that you can not reproduce my findings. 🙂

goal:
evaluate CO2 sensors for Netatmo replacement

motivation:

  • I don’t want to be dependent on cloud
  • I wan’t a led indicating air quality with every sensor

deliverables:

  • prototype with every sensor
  • graphs of measurements made with different sensors
  • decision for one sensor

approach:

  • buy samples of different sensors
  • build a prototype with all sensors
  • make measurements, store them in influxdb and make graphs with grafana
  • evaluate the measurements

progress:

  • 20190409
    • Prototype built with MH-Z14A and CCS811
    • API Endpoint with node-red configured to store data in influxdb
    • first dashboard in grafana implemented
    • other sensors ordered
  • Progress 20190424
    • MH-Z19b arrived

findings:

  • na

open items:

  • na

log:

20190410:
The CCS811 seems to reset sometimes (no values for several minutes and then starts with 400ppm). I will add a pull up resistor on the I2C bus.

20180424:
CCS811 is quite complex to handle. It has a MCU and you can make firmware updates. The library from adafruit is incomplete, it doesn’t support baseline-functions, which you have to use. I changed to the sparkfun library.

CCS811 didn’t show usable results in mode 3 (measurement every 60s). Now trying mode 1 (every 1s) with a moving average over one minute.

MH-Z19b arrived

building a cheap stratum 1 gps ntp timeserver

goal:
have a reliable local ntp timesource

motivation:

  • be independant of a internet connection
  • study the possibilities of cheap GPS devices

deliverables:

  • running ntp timeserver with GPS time
  • source code for ESP8266 for arduino IDE

approach:

  • find a ebook with code samples
  • play with the technology
  • implement
  • test

notes:

Progress

  • GPS sync for local clock implemented, setting local clock fails on some devices
  • ntp server prototype without GPS implemented
  • Do not use the standard softwareserial library with wifi, as it may crash the system. Use espsoftwareserial instead. I had to pay hard to find out…
  • Code is working now:

findings:

  • the esp9266 has a high resolution clock, but I can not set it on all devices
  • a PPS signal on the GPS device is the key to a high precision time source
  • atom with platformio ide is a nice development environment

open items:

  • build a nice 3d printed enclosure

source code:

 

my machine learning project

goal:
learn to understand machine learning

motivation:

  • I don’t want to be dependent on cloud ai!
  • I wan’t to understand what the future brings and how I can use new possibilities.

deliverables:

  • running code for object and face recognition
  • ideas to use ai in my iot architecture

approach:

  • find a ebook with code samples
  • play with the technology

notes:

findings:

  • play inside a vm, it is no fun to play on windows
  • or make your own docker image 🙂
  • jupyter notebooks are cool
  • I love to visualize the learning progress
  • object detection without a GPU is slow, if you want accurate results
  • there are many trained models ready to use with tensorflow

open items:

  • finish docker image for object detection rest-service and use it to refine motion detection from netcam
  • buy a new home lab server with GPU (?) or use google vision kit