“Mit den Ampeln ist es möglich zu messen wie viel CO2 in der Luft eines Klassenzimmers oder eines anderen Raums vorhanden ist und ab einer bestimmten Konzentration einen Hinweis auf das Lüften zu geben.”, erläutert Lehrer Schreier. “Die Schulen sind vom Kultusministerium gehalten alle 20 min zu lüften. Aber wie lange soll man lüften? Bis alle frieren oder bis die Raumluft erneuert wurde? Das können wir jetzt bestimmen”
CO2 ist ein gutes Maß für die Konzentration von Aerosolen, die neben Tröpfchen, als dem direkten Anhusten, für die Übertragung von SARS-COV2 verantwortlich sein können.
As one might not always have an Octopus microcontroller at hand, people have asked me how to build a CO2Ampel – CO2 traffic light warning gadget – with a different microcontroller. Thankfully, such a device was recently assembled at Chaos Computer Club Freiburg.
To keep things inexpensive, we’re skipping the NeoPixel LED of the other tutorial, in this tutorial. Thus parts could be obtained for around 55 EUR. Later, we’ll cover how to connect the measuring device described here, to various displays . Also, those interested in finding further tips and information, can find more information in the Octopus section of this blog. (This post is for the most part identical with the CO2 Messen mit dem Octopus tutorial, also on this blog.)
Parts
I have provided links to the Mouser Onlineshop and to Tindie. You can also find the parts elsewhere, and my links aren’t affiliate links.
Node MCU (microcontroller, controlling the other elements ), via Amazon or Mouser.
CO2 sensor SCD30 – these are available with different interfaces. Eg. With a Grove connector – although often sold out – as well as without. In the case of the CO2 sensors without a grove connector, one needs to solder or otherwise connect it to the microcontroller. Slightly cumbersome but manageable. (Digikey from 53 EUR, RS Online from 72 EUR, Mouser around 50 EUR – at time of writing these were sold out, but new ones are orderd)
LCD panel – To display the data from the CO2 sensor. There are several variants, also with Grove connectors. From 6 EUR. from Mouser.
A power source – Likely you already have one – a USB charger. Just make sure you have a Micro-USB cable. Powerbanks are an alternative, especially if you want to carry the device around.
I2C Hub – a hub connecting several Grove connector cables. Grove connector cable – 2.5 EUR by Mouser.
A case – There are many ideas around. From Ikea picture frames, to Bird houses.
A Data ready USB cable – You probably have one at home, but may have to try several USB cables before you find one that can transmit data as well as power. Please note, quite often the USB cables one gets with various bits of electronics can only carry power. So it makes sense to try different USB cables if USB cable one doesn’t work.
Programming
To program Arduino code with visual programming (Ardu)blocks, we need to modify the Ardunio IDE code editor a bit. (For those that prefer text-code, you’ll find the produced Ardublocks code, in text form, at the end of this tutorial).
Windows: download the zip file with the ‘blocky’ Arduino IDE and then install the relevant hardware driver software. Install the Arduino into a very short File tree, et. C:/iotw. You may also have to take care if you have another Arduino Version already installed. Pay attention which do you start. Start by double clicking on the „IOTWerkstatt.bat“ file.
Mac OS: this is a bit more complicated compared to Windows, but accomplishable using these instructions (in German, again), or the ones below. Here too, you need to install the relevant hardware driver software, and download the special Arduino IDE. This is done as follows:
Following the installation of the Arduino IDE, right-click on the Arduino IDE icon, and select “Show package content” from the menu. This shows the files that make up the Arduino IDE.
Open the “Contents” folder of the just-opened Aruduino package.
Open the downloaded IoTW.zip file.
Drag the “Portable” folder (of the expanded IoTW.zip file ) into the “Java” folder of the expanded Arduino IDE files.
Now open the Arduino IDE.
Open the “Tools” menu and go to Port submenu, and select “Dev/cu.SLAB_USBtoUART” option, to select the right port.
Open the “Tools” menu, as before, and now open the “Board” submenu, and select the “Generic ESP8266 Module”, as our board.
Cabling
The ESP9266 is cheap and can be used as the microcontroller for the CO2 Traffic lights.
Connect yellow on the D1, white on the D2, black on the GND, and red on the 3V. The cables connect with the Node MCU as shown in the table below. Now we need to solder them into place.
Node MCU pin
I2C / Grove Cable
3.3 V
red
GND
black
D1
yellow / SCL
D2
white / SDA
Here and now is a good time to solder the (Grove) cables to the Node MCU. Then we can do fun things like connect a Grove LCD and a SCD30 CO2 sensor to the Node NCU, via a I2C hub. As the grove Cables have preset colours, this should be simple.
While building your own Co2 Sensor and Warning Lights
More an more Germany are more and more concerned with Lüften. Lüften means to open the Windows of the room you are in and then venilate it properly. It’s done best, by opening two windows on walls opposing each other, thus letting air blow through.
Because Germans are masters in „Lüften“ and because many people wanted to know, how to build these little warning lights, in order to know when they should open the Windows and let fresh air in, I wrote a lot of articles on my blog. But these were all in German. So Miska Knapek translatedone article into English and I did some editing.
As aerosol is difficult to measure, but it roughly correlates with CO2 concentration in the air of an enclosed space, clever people like Guido Burger and the Umweltcampus Birkenfeld have devised a way to easily measure CO2 concentrations.
Fortunately, Sensirion makes a CO2 sensor and Guido Burger has ready to tinker microcontroller, the Octopus Board, which can interface and control the CO2 sensor. It is possible to use a Node MCU as well.
The microcontroller can be programmed using the ArduBlocks visual Arduino programming language. Of course you can still do text based programming, if you want it. See the ArduBlocks equivalent code towards the bottom of this article.
With ArduBlocks, using visual ‘programming blocks’, one can do the essential bits of a programming language – loops, conditional statements (if/then), and send/receive signals from various sensors, or send and receive data via MQTT, Thingsspeak or Blynk. (Sorry the Articles are in German, but you may use Google Translate)
The Campus Birkenfeld of Technische Hochschule Trier has more material about this CO2 measuring device, including relevant considerations, background, as well assembled a bit of a building instruction (but it’s all in German). While I enjoy tinkering, in the end I was mostly interested in having a working measuring device. Thus I’ve assembled a quick assembly guide here, below.
CO2 sensor SCD30 – these are available with different interfaces. Eg. With a Grove connector – although often sold out – as well as without. In the case of the CO2 sensors without a grove connector, one needs to solder or otherwise connect it to the microcontroller. Slightly cumbersome but manageable. Ca. 45 EUR
Grove cabel – connecting straight to the Octopus Platine, one can use this to attach sensors, displays and other electronics with Grove interfaces. Ca. 3 EUR
LCD panel – To display the data from the CO2 sensor. There are several variants, also with Grove connectors. From 6 EUR.from Mouser.
Apower source– Likely you already have one – a USB charger. Just make sure you have a Micro-USB cable. Powerbanks are an alternative, especially if you want to carry the device around.
A case – There are many ideas around. From Ikea picture frames, to Bird houses.
A Data ready USB cable– You probably have one at home, but may have to try several USB cables before you find one that can transmit data as well as power. Very often Electronics come with a cheap cable that can only carry power.
Eine der Übertragungsmöglichkeiten für Krankheiten – nicht nur den Covid19 Erreger – sind Türklinken. Die fasst man an um Türen aufzumachen. Während man eine Tür, die sich von einem Weg öffnet, leicht mit dem Ellenbogen runterdrücken kann und dann nach vorne wegstoßen, geht das bei Türen, die sich zu einem öffnen leider nicht. Meistens rutscht dabei der Ellenbogen von der Klinke und man hat auch gar nicht genug „Grip“ um die Tür aufzumachen.
Our hands-free door opener is easy to 3D print and mount all by yourself! Materialise Design Engineer Roman takes you through the process step by step.
Geniale belgische Designer haben nun eine ganze Reihe von Adaptern entwickelt, die es erlauben Türen eben nicht anfassen zu müßen. Ich habe bei mir im Mehrfamilienhaus nun an den Türen an denen viele Menschen vorbeikommen: Eingang, Tiefgarage, Treppenhaus, jeweils solche Adapter angebracht.
Noch bin ich am Lernen, was man beachten sollte. Man braucht:
Schrauben M4 16mm oder 20 mm
Muttern für die M4 Schrauben
Gummi: Entweder einen Fahrradschlauch den man zerschneidet oder die Gummis von Einweckgläsern.