Code Monkey home page Code Monkey logo

swat-engineering / kiwi-air-monitor Goto Github PK

View Code? Open in Web Editor NEW
10.0 7.0 2.0 54.42 MB

Kiwi monitor is an open source CO2/Humidity/Temperature sensor intended for monitoring the quality of the air in a room. Kiwi was created to support teachers with a notification to ventilate their classroom.

Home Page: https://www.kiwimonitor.nl/

License: GNU General Public License v3.0

C++ 62.93% C 7.97% Go 27.37% Dockerfile 1.02% Shell 0.72%
air-quality co2-sensor co2monitor temperature-monitoring humidity-monitoring

kiwi-air-monitor's Introduction

Kiwi Monitor logo

Kiwi air monitor is an open source CO2/Humidity/Temperature sensor intended for monitoring the indoor air quality. Kiwi air monitor was initiated by swat.engineering to support teachers and school organizations with the ventilation of the class rooms.

Features

  • Monitor CO2, Humidity, Temperature, Atmospheric Pressure
  • Display current measurements and its trend on a small display
  • Blink a warning light if certain thresholds are reached (> 800ppm CO2 for example)
  • Optionally: publish sensor readings to a (self hosted) MQTT server to allow building wide monitoring
  • Optionally: partial remote control via MQTT
  • Optionally: Updating firmware over wifi (OTA)
  • Optionally: Docker-compose based Dashboard & MQTT server setup

Due to the cost-cutting concern, we have focussed more on precision instead of accuracy. Meaning that if a value increases, it should indeed represent an increase in that property, but it is acceptable to have a bias with respect to more expensive measurements. So you might get a temperature of 20.4 degrees C even though it iss actually 20.9 degrees C but if it increases to 20.5 degrees C it indeed is now 21.0 degrees C.

Hardware

The hardware is build around the ESP8266 platform. The costs (in the Netherlands) are roughly โ‚ฌ45-50 per device. The list of components and schemas can be found in doc/NL/Hardware.md. We also provide a 3D model to print.

Documentation

Please check out the documentation for further details and instructions about hardware and software, and user manuals:

  1. Dutch
  2. English

Server

We've developed a small server setup (docker-compose based) so you can get started yourself. Checkout the server/ directory and the corresponding documentation.

License

The software and 3D models are all GPLv3 licensed. We use libraries with compatible licenses. See Software documentation for a list of which libraries are used.

kiwi-air-monitor's People

Contributors

davylandman avatar dependabot[bot] avatar frankvd81 avatar mariesaphira avatar msteenhagen avatar petravanhoudt avatar wimjan1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwi-air-monitor's Issues

Switch to timer based on cyclecount

Look at PolledTimeout.h for inspiration.

It's only suited for timers that tick at max every 25s, but for a lot of our cases that is fine.

Implement Threshold feature

We have 3 levels of Warnings we want to give:

  • Level 1: CO2 is above a certain threshold (for example 1000) but (already) decreasing
  • Level 2: CO2 is above a certain threshold (for example 1000) and not decreasing
  • Level 3: CO2 is above a second threshold (for example 1500)

Open questions:

  1. which color should the led be for the different levels (taking into account that the case is most likely the logo with the led for an eye)
  2. Should the led always pulse at same intensity?
  3. how to detect decreasing trend?
  4. how to avoid hysteresis?

This is an example CO2 curve:

afbeelding

and a detail shot of a peak:
afbeelding

Progress:

  • implement threshold detection of the 3 levels
  • change color scheme of led.

Develop small MQTT forwarder

subscribe to kiwi/+/sensor/# stream, and forward the measurements to influxdb.

Tag based on mac, and have a map of extra tags that can be registered for each mac.

For example toml config:

[servers]
mqtt = "mqtts://iot:password@mqtt-servername"
influxdb = "http://influxdb"
influxdb_name = "kiwi"

[[client.tags]]
mac = "30:AE:A4:07:0D:64"
tags = [ "1st floor", "front-side"]

[[client.tags]]
mac = "30:AE:A4:07:0D:55"
tags = [ "2st floor", "front-side"]

Re-design KIWI PCB revision 1.1

  • Instantiation of rev1.1 design database
  • bug fix: Rotate the OLED display connector 180degree
  • Modify the connector for the new MH-Z19-C with cable connector
  • Review placement of the BME280. The reported temperature is too high
  • Connector for the LED should move to a different location. Probably better use a 90degree connector for easier plug-in with short wires.
  • Check if we can move the pin controlling the LED to another Arduino pin. Currently it is assigned to D4, which is the same as the blue LED on the ESP8266 board. because of this we can not switch off the ESP8266 LED. Switch to either D3, D5 or D6
  • make the pads bigger for all components, comparable to the esp8266 pads
  • put the kiwi bird logo on the pcb (get the svg from font awesome by clciking the download button)
  • add small labels on the pcb to help with allignment of the components (just like for the led). so maybe just write the pin for the GND connection on all of them?
  • annotate/decorate the debug pins so that a user knows to ignore them
  • flip the rcwl board, so that the other side is faceing front

Design 3D case

Multiple variants for with and without PIR sensor.

Ventilation holes in bottom for CO2 sensor and BME280.

Due to airflow, sensors on lower side, esp & display on higher side

Re-design KIWI PCB revision 1.2

  • RCLW met chip zijde naar boven
  • Knopje aan achterzijde van PCB aan een ESP GPIO
  • !RST van de ESP verbinden met D0 (i.v.m sleep mode)
  • RCWL-OUT naar een andere ESP GPIO
  • LED via 3 pin JST
  • BME280 via 4 pins JST
  • Beslissen welke CO2 sensor we willen gebruiken en met welke connector (Picoblade, 4P-JST, allebei)

Switch to runtime configuration instead of compile time

As suggested by @gertziel and @Frankvd81 it would be nice to configure the Kiwi after flashing the firmware.

Steps:

  • put button on back of the kiwi to trigger "maintenance mode" that starts an access point and allows a user to upload a config file
  • store config file in file system part of the memory
  • replace most compile-time defines into runtime defines
  • plot lacking wifi connectivity on screen
  • release binaries using github actions

Make mqtt server example setup more secure

The client already supports ssl and user/password protected connections, but the current docker-compose setup doesn't do this.

We should provide:

  • a small script to generate a new certificate
  • a way to generate user&password authentication
  • pass this user&password along to the internal side of the mqtt-2-influxdb forwarder

Design plug&play cable management

Make it easy to replace sensors and prepare larger batches by designing a cable system.

@doesie suggested a system with compact connectors. Maybe we print stickers for on the connectors?

File user-config.h does not exist

I have tried to upload your code via Platform IO but it states that the file user-config.h does not exist.

is there something I am missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.