The HSE COVIDuino

Even with our home office policy, working in the office is unavoidable at times. Amongst our stringent COVID-19 guidelines is regular ventilation. But when should we ventilate? We decided to solve this the HSE way – meet the COVIDuino!

Air quality is an interesting topic. According to various studies, a carbon dioxide (CO2) concentration of over 1000 parts per million (ppm) in the air we breathe is detrimental to proper cognitive functions. In these times of the coronavirus, stale air can also be quite dangerous. Looking at our own history of ventilating (or, rather, not ventilating) our office rooms, we realised that we need help!

The COVIDuino is a fully-functioning carbon dioxide meter built from a small embedded device, a CO2 sensor and some intelligent LEDs.

Arduino, SCD30 & NeoPixels

Arduinos are tiny, open-source microcontrollers with a staggeringly huge community and support behind them. Prototyping projects with them is absolute breeze. Regular readers of our blog will definitely remember the WUELAMP project, this current project actually started as a spin-off of that one.

For the COVIDuino, we used an Arduino Zero with an Ethernet shield and an SCD30 air quality sensor. This sensor simultaneously measures temperature, humidity and most importantly for us, the CO2 levels. For the output, we have a 29 LED NeoPixel stripe. To connect all these, we just used a breadboard and crimped some appropriate cables. We gladly stick to the KISS principle at HSE, and we really wanted to emphasize that this fully-functioning device is cheap and easy to build using only a few parts.

Software – making the bits flow right

Developing software for the Arduino is simple even for beginners with the default Arduino IDE. However, for more advanced users, our recommendation is to use the seemingly ubiquitous Visual Studio Code. There are a few extensions available for Arduino development, PlatformIO being currently the most popular.

The device continuously monitors the CO2 levels and uses the NeoPixels to show us exactly how bad the situation is. After reading up on the technical definition of air quality (defined, for example, in the DIN EN 16798-3:2017-11), we decided to implement a four-stage warning system:

  • From 400 (~fresh air) to 600 (optimum for indoors) ppm CO2, our COVIDuino shows the situation with the ratio of white to green lights
  • From 600 to 1000 (Pettenkofer number) ppm, it shows the situation with the ratio of green to amber lights
  • Between 1000 and 1600 ppm, it uses the much more severe-looking amber-to-red colour scheme
  • After 1600 ppm, the NeoPixels start to aggressively blink red, signifying that action is needed ASAP

The many-coloured LEDs also had the unexpected benefit of eliciting a festive mood – just when we needed it for Christmas.

Harkening back to the days of cubicles, we also implemented a “boss-key”: Once the temperature sinks below a comfortable 21 °C, the NeoPixels flash blue, signalling that we should shut the window because Joerg is freezing.

The entire project is open-source and publicly available at our GitLab site.

Continuous Integration & Deployment

To imbue the COVIDuino with some of HSE specialities, we also enabled a CI/CD workflow for it. Evading the clunky Arduino IDE, we opted for the Arduino CLI tool, which lets us compile and deploy projects, right from the terminal. Using it is extremely straightforward. Each time a new commit is pushed to the central repository, the GitLab Runner executes the compilation and deployment steps on a VM running on a hypervisor.

CI/CD (Continuous Integration and Delivery/Deployment) is a DevOps tool which helps with creating robust and higher-quality code. New commits are integrated as fast as possible into the main codebase, are tested and if successful, are deployed.

Release Automation Tools - Schematics

If you want to read more about it, and perhaps even use it in your own LabVIEW projects, check out our Release Automation Tools for LabVIEW.

What’s next for the COVIDuino?

If you’ve already looked at the code, you will have seen the Thingspeak module being utilised quite heavily. But what is this, you may ask. All will be revealed in the next blog post. But just as a teaser, the IoT is here, and fancier than ever!

If you haven’t had a look at the code yet, what are you waiting for? It’s a fully open-source project, and quite simplistic, offering the perfect opportunity to get your hands dirty with some Arduino development.

COVIDuino GitLab Repo

One thought on “The HSE COVIDuino

Leave a Reply

Your email address will not be published. Required fields are marked *