This project uses the Azure Sphere MT3620 Starter Kit to convert a CO2 sensor into an IoT device. The world is becoming increasingly aware that carbon dioxide is the primary greenhouse gas (accounting for about two thirds of greenhouse heating) and it has been steadily increasing its concentration in air since the industrial revolution began. In the last 100 years it has increased from its pre-industrial peak of about 300 ppm to 415 ppm today (you can check it here: ). That is over 38% increase. The earth's eco system makes good use of the greenhouse effect, which has traditionally kept most of the planet above freezing temperatures, but we are reaching levels that will increasingly affect our environment in many different ways. Before we reverse the trend, the oceans may have risen over 80 feet.

It takes a big tree about a year to extract 38 kg of carbon from CO2 in the air and it stores it in the 100 kg of wood it creates, but we can burn that wood in one hour.

It takes millions of years to form fossil fuels, but we can return all that carbon to the atmosphere in a couple of hundred years.

It is hard to conceive of a process that can scrub CO2 from the air as fast as a forest fire can generate it.

CO2 is invisible and only makes up 0.04% of the atmosphere, but it is vitally important to our lives as well as the plants and animals around us.

Azure Sphere MT3620 Starter Kit

Project Objectives

These random notes about CO2 set the stage for this project, however, this project is not about global warming, it is aimed at everyday issues with CO2, specifically the effects of breathing higher concentrations of CO2 and how to prevent such issues.

One of the primary goals of this Sensing the World Challenge is to set up the Azure Sphere MT3620 Starter Kit to connect securely with the Azure Cloud and check in daily.


Connecting Daily

The process of connecting for the daily sync was quite involved due to the highly secure nature of the connection. The first thing needed was a secure email account, so this had to be set up with Microsoft. This is not a regular Microsoft account, which I already had. Then there are many steps to get the device properly set up to connect to the cloud, involving a lot of command line interaction with the device.

After the module and accounts are set up, a downloadable app makes daily syncing very straight forward - just a few clicks of a mouse.

Just run the app and click on the "Read Device" button, wait for it to obtain device ID from the module via USB, then click on the "Send to Server" button.


The connection activity is summarized on the online Heat Map.

This shows that the total number of devices checking to date in is 1636 and the maximum on any given day is 654.

My 2 devices are named "Ace" and "A Cloud Tickler", so you can see they have connected daily for 6 months so far. That part of this challenge was harder than it sounds as I had to travel several times and just consistently checking in requires persistence and perseverance. The difficulty is obvious from the heat map that indicates there has never even been one day where more than half of the devices checked in. However my devices have succeeded at this aspect of the challenge.


CO2 Project

Symptoms of breathing various concentrations of CO2

350-1000 ppm no measurable effects

1000-2000 ppm poor air quality – lethargy, loss of concentration, tiredness

2000-5000 ppm dirty air – headache, insomnia, nausea, lethargy, irritability, dizziness, loss of focus

5000-10000 ppm – reduced oxygen, secondary toxic gasses produced, pronounced symptoms

10000+ - increased respiration rate, tachycardia, cardiac arrhythmias, impaired consciousness, potential coma

15000+ - potentially fatal


CO2 Issues and Situations and Instrumentation Applications
So how is this an everyday issue?

Humans inhaling 21% oxygen and 0.04% CO2, exhale about 16% oxygen and 4% CO2. This is an increase in CO2 by a factor of 100.

In enclosed spaces this eventually results in the intake air having less oxygen and more CO2, to the point where adverse symptoms can manifest. Unfortunately, we cannot tell when there is not enough oxygen or too much CO2.

Our enclosed spaces (buildings and vehicles) are generally designed to have enough ventilation to prevent CO2 from building up to excessive levels, but there are many situations where you may be in an enclosed space where nobody thought about ventilation.

Have you ever been in a room with a lot of people and it began to feel “stuffy”?

Have you ever slept in a vehicle and woke up with a headache?

Have you ever been stuck in an elevator?

Have you ever hidden in a really confined space for a period of time?

Have you ever had a nap in a bathtub?

Have you ever played hockey in an arena where the Zamboni was was burning propane?

Have you ever worked in a shed with a propane heater?

The goal of this project s to log CO2 concentrations in some of these situations to see if any are pushing into unhealthy levels.


Project Description

The project has not been a formally planned affair, it started with researching the CO2 problem, then I spent some time researching the Azure Sphere hardware and eco system. I then progressed to signing up to participate for the "Sensing the World" contest.

The system will monitor CO2 levels and display them locally as well as have the ability to publish the data to the Azure cloud.



Subsystems and Ordering

Next I ordered some parts to build a CO2 monitoring system. This included an AirRadio WS20 CO2 sensor which has arrived:

This sensor has a UART interface, which from what I have found out, may be a bit of an exercise to get working.

So I ordered a Grove CO2 sensor which uses an I2C interface:


I also wanted a local display so I ordered some displays. The original idea was to implement a 2.6" QVGA Digole display which has an I2C interface:

However to make the transition easier, I wanted to order the 0.96" OLED display used in the Azure Sphere examples:

This s a much smaller display. Of course I ordered the wrong display and did not discover it for a long time because I was holding off doing anything that might brick the Azure module before the daily check-in period was completed. This period got extended a couple of times, so I was very late in finally getting the correct display on order. Unfortunately it has not arrived yet.

I also ordered and received an I2C to digital I/O module for use in my other Azure Sphere Kit project - detecting open windows and rain ingress:

Rain Sensor

I also ordered and received several Grove connector cables since the Azure Module has a Grove connector available for I2C peripherals.

I have a solar charged battery with USB output which should power the system.

Azure Sphere Module


After getting some parts on order and I finally worked up the nerve to start messing with loading software on the Azure module.

The first tests were with the Azure Sphere Starter Kit out-of-box demo application software that read all the built-in sensors and displayed their outputs.

Here are some screen captures of the demo app in operation, showing the different acceleration axes as I rotated the device with respect to gravity:

Next I tried loading a very simple custom program to perform the mandatory LED blink function:


Conclusions So Far

The Azure Sphere MT3620 Starter Kit is a powerful and secure little IoT module that leverages the comprehensive infrastructure of Microsoft's Azure Sphere cloud.

It represents a lot of development work to provide a complete solution from sensor to cloud, including all the tools needed to get a complete system working. It still has a ways to go before it is a slick as a normal Microsoft product install, but there is enough for early adopter technophiles to build complete applications. My applications will benefit from others who are paving the way with useful example applications.