monitoring CO2 levels in space

CO2 sensors blasted into outer space again!

Our Carbon Dioxide sensors are heading for the far reaches of the galaxy once again! The CozIR®-A CO2 sensor will be launched into space as part of the ‘Let’s Talk Science’ Action Project, in partnership with the Canadian Space Agency.

co2 sensors for monitoring co2 levels in space

Monitoring air quality in space!

Canadian astronaut, David Saint-Jacques sets off for the International Space Station (ISS) next month. During the mission, David will carry out various scientific experiments, and test new technologies. One of the experiments will be a test carried out for the ‘Let’s Talk Science’ Action Project. The aim of the new project is to see how environmental conditions – such as temperature, light, humidity, and air quality – impact the health and well-being of astronauts in space.

monitoring co2 levels in apce

Astronaut David Saint-Jacques embarking on his next space mission

On his return, David will report his findings, and participating schools will be able to compare the results from space with their own findings back down on planet earth. The mission provides another exciting opportunity for GSS sensors to be involved in space exploration and scientific discovery, whilst also inspiring generations of students all over the world.

In a recent live Facebook stream, David addressed educational leaders and student scientists. Find out more about the project and space mission here: http://explorecuriocity.org/LivingSpace.aspx 

A video of astronaut, David Saint-Jacques talking about the mission is available here:

co2 senosrs for space

 

co2 sensors for fire suppression system

Ultrafast Carbon Dioxide sensor used to upgrade CO2Meter’s datalogger for quicker results

Carbon dioxide (CO2) is an ideal fire suppressor for many applications, because apart from actual fire damage, there is no clean-up or residue associated with a CO2 system – unlike with foaming agents or water. When a fire starts, high-pressure CO2 is released into the area it is protecting. Carbon dioxide gas displaces the oxygen until there is no longer enough required for combustion1. The fire can then be controlled or extinguished.

co2 sensor for fire suppression

Monitoring CO2 in a server room to safeguard against leaks from fire suppression systems

A common application is the protection of switch rooms or control panels, and other confined space environments which house electrical components, computer or process equipment such as server farms2. Other common uses include gas turbine enclosures, power generation stations, and flammable liquid storage areas.

However, there are two key challenges when using CO2. First, the cylinders of CO2 used in these Fire Suppression Systems could leak. Therefore the areas where they are stored need to be monitored3. Second, when such a system has been deployed, the atmosphere must be checked to ensure that the CO2 has dispersed to safe levels for re-entry4.

co2 sensors for fire suppression system

Carbon Dioxide fire suppression system

CO2Meter has developed a data logger capable of measuring up to 100% CO2 concentrations. The portable device is ideally suited for leak detection testing in fire extinguisher systems, and can detect even a slight change in the level of CO2. By attaching a length of tubing, the unit can be run in real-time along pipe connections and valves to pinpoint leaks – even in hard-to-reach places.

This unit is also used to create a three-dimensional map of the CO2 levels in a particular space, by sampling from both horizontal and vertical locations. This helps determine when it is safe for emergency services to enter an area after a CO2 extinguisher has been used.

“Our original design used a GSS ExplorIR®-W CO2 sensor, as the low power requirements of their LED-based technology enabled us to create a portable, battery-powered product that could go weeks between recharges,” explained Irene Hicks, CEO of CO2Meter. “It is also highly accurate right up to 100% CO2 concentrations, which is vital for a sensor in safety applications. However, an almost instant CO2 reading is needed in some situations, so in future we will be using a high speed GSS SprintIR®-6S sensor in our datalogger. This sensor takes 20 readings per second, so it’s ideal for recording fluctuating CO2 levels, particularly in fast changing environments. The beauty of the SprintIR-6S is that it’s still low power enough to be used in our portable data logger, so you can have high speed and low power sensing effectively combined.”

100% Carbon Dioxide sensor with fast measurements

SprintIR-6S® 100% Carbon Dioxide sensor for high speed measurements

A customer of the CM-0003, who uses them for full discharge tests of CO2 fire suppression systems, said, “The meters are small enough to take as carry-on luggage, which I find very useful. I typically use three or four meters simultaneously, with test times ranging from 30 to 60 minutes each. To date I’ve used these CM-0003 meters for testing well over 200 sites.”

Handheld Carbon Dioxide monitor

CM-0003 handheld Carbon Dioxide monitor

The data logger model (CM-0003) is available from the CO2Meter website: https://www.co2meter.com/collections/fire-suppression/products/co2-sampling-data-logger-100-percent?variant=50696225108

Rachael Yates, Marketing Manager at GSS, added, “We have a very close working relationship with CO2Meter who use a variety of our sensors in their products. The solid-state design of our LED-based sensors makes them particularly rugged so that they can withstand the rough handling that portable devices are subjected to. We are delighted to be working with them as they integrate our latest designs of ultra-fast reacting sensors into their product range. In particular, our unique, low power, 100% CO2 sensors are opening new market opportunities for them to create solutions for.”

How to get started with our evaluation kit in under 2 minutes

Our evaluation kits allow you to connect our CO2 sensors to your PC, log data and check out the operation and performance of the sensor. It’s very quick and easy to get started with our evaluation kit. In fact, you can be up and running in less than 2 minutes! Here’s your step-by-step guide to start you off in the exciting world of CO2 measurement!

First, just to note that evaluation kits are available for all GSS core CO2 sensors. It’s the same set up process for each sensor. The only difference is that some sensors have slightly different pin outs and so need to be connected using a small adaptor board to connect to the USB lead. Full pin out details are provided in our datasheets, and examples of how to connect the USB lead to individual sensors are given in our READ ME FIRST document. (All of which are included on the USB stick enclosed in your evaluation kit).

Now to get started, open your evaluation kit box and check that you’ve got everything there you need. You should have: a USB stick; a USB cable; and the relevant CO2 sensor that you’ve selected for your application. The USB stick contains your evaluation software – which enables you to communicate with the sensor – and a range of other documents, including application notes, datasheets and the READ ME FIRST guide noted above.

measuring co2 levels with GSS evaluation kit

USB stick: part of CO2 sensor evaluation kit

take CO2 readings with this CO2 sensor evaluation kit

USB cable: part of CO2 sensor evaluation kit

NDIR LED based CO2 sensors

GSS range of NDIR CO2 sensors

So to communicate with the sensor, plug the USB cable into a USB port on your laptop or PC. Recent versions of Windows will automatically identify the USB driver, so just leave it to self-install. If that doesn’t happen and you’re prompted to locate a driver, you can download it from the FTDI website here: https://www.ftdichip.com/FTDrivers.htm Select the ‘VCP Drivers’ option then choose the correct driver for your operating system.

Next, take the USB stick and plug it into another USB port on your computer. When the USB drive appears on screen showing the USB content, click on the GSS Evaluation Software folder. In the next window, click on the setup.exe file. The application should automatically install in a few seconds, and once installed the programme will start running. If it doesn’t self-install, you can start it from the ‘Program’ menu within the Start Menu.

gss CO2 sensor evaluation kit

Plugging in the USB stick

Now connect your sensor to the USB cable. Simply line up the pins on the sensor and plug it into the cable. For examples of how to correctly connect the USB lead to individual sensors, please refer to the READ ME FIRST guide on your USB stick.

plugging in the co2 sensor to set up the evaluation kit

Connecting up the CO2 sensor

Finally, in the top left-hand corner of your screen, select the relevant COM port from the drop down Connection list. Then click the Connect button. After 1 or 2 seconds you should see the sensor taking live CO2 readings. The graph on screen shows CO2 concentration levels (in ppm) on the Y-axis, and time on the X-axis. The readings on the graph will depend on the CO2 levels in the room you’re in at the time. However, a nice test is to breathe near the sensor and see the increased CO2 readings on your graph right before your eyes. (Please take care to avoid blowing directly and hard onto the membrane, as your hot humid breath may cause condensation).

And that’s it! Now you’re ready to start measuring CO2 levels in your application.

Watch the video!

Our new video can get you up and running in less than 2 minutes! watch it here:

measuring co2 levels with GSS evaluation kit

How to measure CO2 levels with a GSS evaluation kit

For a detailed description of the software interface, please refer to the GSS Sensor User Guide. The READ ME FIRST document enclosed on your USB stick includes a full glossary of Command buttons if required. And if you need any further assistance, please contact us via info@gassensing.co.uk or call us on +44 (0)1236 781900.

Gas Sensing Solutions surprised to find high levels of CO2 when travelling

CO2 sensor specialists, Gas Sensing Solutions (GSS), took a CO2 datalogger on a business trip from Scotland to Asia to see how the levels of CO2 changed on different modes of transport throughout the journey. Surprised by how high levels were on occasions, GSS will be doing further investigations in other locations to see how CO2 levels vary in the real world.

The datalogger used measures CO2 concentration, air pressure and temperature along with relative humidity every few minutes. It is a custom solution designed and built by GSS and uses one of its low power, ambient air CozIR®-A sensors. This low power consumption enabled the datalogger to record over a 2-week period without needing a change of battery. The other sensors are an NXP MPL3115A2 pressure sensor and a Sensirion SHT21 temperature and humidity sensor.

ambient air co2 sensor

Datalogger uses a CozIR-A CO2 sensor

The graph below shows how the CO2 level in blue and the air pressure level in green fluctuated throughout the journey. It clearly shows increased levels of CO2 when there are a number of people in a confined space with limited ventilation to remove CO2 build up.

measuring carbon dioxide in ambient air

Graph showing CO2 and pressure levels on the trip

The World Health Organisation1 guideline is that CO2 levels should be below 1000 ppm, and ASHRAE (the American Society of Heating, Refrigeration and Air Conditioning Engineers) says that CO2 at high concentrations of 5000 ppm can pose a health risk2.he drop in air pressure on the graph shows the part of the journey that was in a plane. The train journeys show particularly high levels of CO2, where CO2 levels built up to over 2000 ppm. Similar results are shown from the meeting room. However, perhaps surprisingly the highest CO2 peaks were during the taxi journeys with two passengers and a driver. This consistently produced levels in excess of the 5000 ppm health risk indicator mark2 – and, at one point of the journey, even peaked at 10,000 ppm. This really shows the high levels of CO2 that people can be exposed to while driving through a busy city.

affect of co2 on the human body

How CO2 levels impact on the human body

“Generally, people are still not aware of the problems of high CO2 concentrations,” said Dr David Moodie, Technical Manager at GSS. “That drowsy sensation you often experience in a stuffy meeting room is caused by elevated levels of CO2. The higher the level and the longer the exposure, the more apparent the effect is on the body. Travelling can often be tiring, leaving you feeling worn out. This real-world data shows how often you can be exposed to high levels of CO2 without realising it – even in taxis and trains – and this could be a significant factor in how you feel. So, my advice is to open windows whenever possible to let the CO2 out. Naturally that does not apply on planes!”

co2 measurement

Technology used to make measurements

1. https://consult.education.gov.uk/capital/bb101-school-design-iaq-comfort-and-ventilation/supporting_documents/DfE%20Ventilation%20guide%20consultation%20draft%2029%2006%202016.pdf

2. https://www.ashrae.org/File%20Library/Technical%20Resources/Technical%20FAQs/TC-04.03-FAQ-35.pdf

GSS technology

Most CO2 sensors work by measuring how much light is absorbed by CO2 molecules in the 4.2 to 4.4 microns range as it passes through the sample gas, which is called Non-Dispersive Infra Red (NDIR) absorption. The amount of absorption indicates how much CO2 is present. GSS developed proprietary LEDs that are specifically tuned to emit at these wavelengths. The LEDs use very little power and turn on almost instantly, enabling sensor readings to be made in a few seconds. As a result, GSS has pioneered the development of CO2 sensors that can be powered by batteries for long periods of up to ten years. Competitor sensors use IR sources that require significantly more power per measurement and also take much longer to reach a stable condition for a measurement, resulting in the need for mains power. Examples of the wide range of applications for GSS CO2 sensors can be found on the company’s website www.gassensing.co.uk

US-based CO2Meter uses GSS sensors at the heart of its CO2 alarms

CO2Meter is a Florida-based business specializing in the design and manufacture of gas detection and monitoring devices – mainly CO2. The company is a long-term and highly valued application partner of Gas Sensing Solutions (GSS) and has been using and supplying their next generation, LED-based CO2 sensors at the heart of its range of CO2 detection devices. These range from level controllers to alarms and data loggers. It has recently extended its range of CO2 alarms with the addition of a version that can handle up to 100% concentrations of CO2.

“We use GSS NDIR CO2 sensors because of their best-in-class technology and proven reliability,” said Ray Hicks, CTO at CO2Meter. “Because GSS manufactures its sensors with their own proprietary LEDs – rather than using a heated source of IR – the sensors are small, robust and provide almost instant readings.”

100% CO2 sensor

GSS ExplorIR 100% CO2 sensor

GSS manufactures a range of sensors – under the ExplorIR and SprintIR brands – that are capable of reading up to 100% CO2 concentrations. Hicks continued, “In fact, GSS provided us with our first ever 100% CO2 Sensor many years ago. As an example, we’ve used the ExplorIR®-W with voltage output to produce a new addition to our range, the iSense 100% CO2 sampling logger alarm. Having this solution has enabled us to extend our reach in specific industry applications, as very few monitors can measure up to 100%.”

CO2 gas alarm

CO2Meter’s iSense CO2 alarm (CM-0052)

The iSense alarm (CM-0052) is suitable for both permanent and temporary installations in industrial applications. It can be used for a range of different processes, including monitoring and control, long-range data collection, sampling inspections, remote deployment and CO2 leak detection. The device is ideal for use in industrial settings, such as MAP applications, fermentation vats and barrels, biological incubators and agricultural storage.

Hicks explains, “The product shown here is the iSense CO2 alarm being used in an application for Controlled Atmospheric Packaging. We’ve paired the alarm with our hypodermic needle kit to make a complete solution for testing head space gas composition in modified atmosphere packaging. And looking at biological applications for instance, the addition of tubing would also make this alarm suitable for measuring potentially dangerous concentrations of CO2 if this was a requirement.”

CO2 monitor for MAP applications

Monitoring CO2 levels in Controlled Atmospheric Packaging applications with the CM-0052 – iSense 100% CO2 Sampling Controller Logger Alarm.

The ExplorIR®-W 100% concentration CO2 sensor inside the iSense provides an optimal fit with the industrial environments being measured. Calum MacGregor, CEO at GSS said: “The sensor has a particularly robust design, thanks to its core mid-infrared LED technology. It’s this solid-state platform that enables the earliest warning of any possible CO2 leaks. This also provides the exacting precision needed in leak detection and similar applications.”

The close alliance between manufacturer GSS and their key partner is now approaching its 10th year. MacGregor concluded, “We have developed an incredibly valuable relationship with the team at CO2Meter. We share the common goals of ensuring that customers get the correct, fit-for-purpose solution for their specific needs, using cutting-edge CO2 detection technology. CO2Meter has an in-depth knowledge of gas detection technology, and delivers a first-class service to its clients. Together with their immense technical expertise, this makes them a highly valued partner for GSS, and we look forward to growing together further in the future.”

Further details about the iSense 100% CO2 Sampling Controller Logger Alarm can be found at: https://www.co2meter.com/collections/scientific-industrial/products/co2-rechargeable-100-data-logging-in-nema4-box

Further information about the ExplorIR®-W 100% CO2 sensor can be found HERE:

CO2Meter www.co2meter.com

The company was founded in 2008 after CEO Irene Hicks found first-hand how important hazardous gas detection instruments were in the South African mining industry where she represented a gas detection company. Once she took the opportunity to become head of their US facility, she decided to the move to the States and met Ray Hicks – a successful entrepreneur and engineer looking for a new project. He became fascinated by gas detection technology and the result of their shared interest spiked the successful business that is constantly growing today. Its approach is one based in the science of gas and how best to accurately and repeatedly measure that gas for the end user’s purposes. Its business partners in agriculture, HVAC, science, safety, research, pharmaceuticals, beverage, and other fields find its devices to be highly accurate and cost effective.

Low power CO2 sensor demo

Gas Sensing Solutions exhibits at Sensor China Expo

Gas Sensing Solutions (GSS), a leader in CO2 sensor technology, will be exhibiting at Sensor China Expo 2018 . The company will be on Booth B004 in the Overseas Pavilion from 10 to 12 September 2018.

“China is one of our largest export markets,” said Lily Liu, Business Development Manager at GSS. “We make regular trips to China to support our partners with technical training and advice on designing solutions using our sensors. Naturally, we will also be talking to manufacturers seeking the very best in CO2 sensor technology, as our next generation LED-based sensors set new standards for low power, fast response and robustness.”

Low power CO2 sensor demo

How the CozIR-LP CO2 sensor can be used for Demand Controlled Ventilation (DCV) applications

GSS has a multi award-winning technology that is the basis for its next generation CO2 sensors. Its proprietary mid-infrared LEDs use very little power and turn on almost instantly – giving sensor readings in less than a second. As a result, GSS has pioneered the development of solid-state NDIR CO2 sensors that can be powered by batteries for up to 15 years. Alternative sensors use IR sources that require significantly more power per measurement and also take much longer to reach a stable condition for a measurement, resulting in the need for mains power. Also, being solid-state means that GSS sensors are very robust and stable enabling them to be used in harsh conditions of vibration and pressure changes, such as on vehicles, aircraft or even spacecraft.

GSS has three families of standard products that each focus on a particular strength of its technology. Therefore, designers can select the most appropriate sensor according to the needs of their specific application. The CozIR® family has particularly low power consumption and so provides a long term, low maintenance solution for battery-powered ambient air monitoring systems.

CozIR-LP low power and small CO2 sensor

CozIR-LP low power, small profile CO2 sensor

SprintIR high speed co2 sensor

SprintIR-W high speed sensor

The SprintIR® family provides high speed sensing up to 100% CO2 concentration, for when an ultra-fast measurement result is required. And the ExplorIR® brand is for measuring up to 100% CO2 levels in tough applications, such as those subjected to harsh environments, vibrations, and handling.

100% co2 sensor for tough applications

ExplorIR-W robust sensor

Within each family there are further sub-brands according to specific features, such as size, output and Temperature + Relative Humidity (RH) integration. As the company manufactures its sensors, it also offers a custom CO2 sensor design service.

GSS will have demonstrations on its stand to showcase these three strengths. The CozIR®-LP shows how a battery-powered CO2 sensor can be used for Demand Control Ventilation. The SprintIR®-6S demo shows how fast the sensor responds to changes in CO2. The ExplorIR® robustness is proven by having it working inside a ball being thrown around the stand.

—————————————————

If you would like to meet GSS at the show, please contact us: info@gassensing.co.uk

Find out more about the Sensor China Expo here: http://www.sensor-expo.com/en/

CozIR®-A CO2 sensor used to evaluate LoRaWAN and sensor applications

A customer of Gas Sensing Solutions (GSS Ltd) based in Budapest, Hungary has built a sensor panel device using the CozIR®-A CO2 sensor.

ChipCAD has incorporated the CozIR®-A in their Micromite GPS LoRa MOTE design.  The sensor measures up to 1% CO2 concentrations, and is designed for ambient air applications.

The Micromite device is targeted at design engineers to quickly evaluate LoRaWAN and its sensor applications.

The ChipCAD article is available here:

http://micromite.chipcad.org/home/micromite-mote-szenzorpanel 

The full application spec can be read here:

Micromite-LoRa-Mote_GPS-Sensor-Multicast_Specification-4v00

Connections

How to monitor CO2 levels with a BBC micro:bit and a bitty data logger

Written by Martin Woolley | http://www.bittysoftware.com

Visualising the Invisible!

I was recently contacted by a professional educator, based in Alberta, Canada called Jennifer Ferguson. Jennifer (@FergeeksonGirl ‏ on Twitter) works for a charitable, education and outreach organization called Let’s Talk Science (@LetsTalkScience) and has been using Bitty Data Logger.

The reason Jennifer made contact was to talk about her current project, Living Space, an education initiative developed with the Canadian Space Agency, and to ask for some assistance.

Living Space is concerned with monitoring key environmental conditions, including carbon dioxide (C02) levels. Jennifer wanted to be able to connect a Carbon Dioxide sensor to a micro:bit and to communicate its readings to Bitty Data Logger over Bluetooth so that the data could be visualised, logged and shared.

C02 Monitoring

C02 monitoring is widely used in all sorts of applications, many of them really important, some of them surprising. Examples include heating, ventilation and air conditioning (HVAC) systems, large scale city environmental monitoring, and aspects of food production, including monitoring of plant cultivation environments and improved food storage. It’s used in laboratory incubators for monitoring cell cultures, and in healthcare for things like breath analysis applications where the sensor has to deliver results very rapidly, at around 20 measurements per second. Breath analysis data allows for monitoring conditions such as asthma. And of course, a C02 sensor being a sensor, it’s something you’d expect to find in larger scale connected systems which we might file under the umbrella term “Internet of Things (IoT)”.

Jennifer was working with an impressive sensor, the CozIR®-A made by Scottish company GSS (Gas Sensing Solutions). Some models, such as this one can take temperature and humidity readings as well as C02 measurements.

GSS CozIR®-A low power ambient air CO2 sensor

CozIR®-A ambient air CO2 sensor

Let’s start by getting to know the CozIR®-A sensor.

Connecting a micro:bit to the CozIR®-A Sensor

The CozIR®-A sensor has a number of pins on its underside. The important ones are GND,  3.3V power and serial receive (RX) and transmit (TX) pins. Yes, the interface is a UART interface, which allows serial communication, one bit at a time using two of the pins, one for transmitting bits and one for receiving. To connect the CozIR®-A sensor to a micro:bit, you make connections like this:

CozIR®-A Micro:bit
GND GND
3V3 3V
TX RX (pin 1)
RX TX (pin 0)

Note how TX on the CozIR®-A is connected to RX on the micro:bit and RX to TX. This makes sense if you think about it. Data transmitted from the sensor has to be received by the micro:bit. Data transmitted by the micro:bit has to be received by the sensor.

Here’s what a micro:bit connected to a GSS CozIR®-A sensor looks like:

Connections

micro:bit connected to CozIR®-A CO2 sensor

close-up of the micro:bit connected to CozIR®-A CO2 sensor

Close-up of micro:bit with connections

GSS CozIR®-A CO2 sensor with connection

Close-up of GSS CozIR®-A CO2 sensor

Communicating with the CozIR®-A Carbon Dioxide Sensor

The GSS CozIR®-A sensor uses a simple protocol for sending and receiving data and commands over the UART connection with a microcontroller like our micro:bit. All commands and data consist of ASCII characters only and they’re all, always terminated with carriage return, line feed characters i.e. \r\n or ASCII characters 0x0D and 0x0A.

The software guide that comes with the GSS CozIR®-A sensor is very good, and it doesn’t take long to understand the protocol and pick out those commands and responses that are required for your purposes.

There are three operating modes defined. Mode 0, Command Mode stops the sensor from making measurements. It will respond to commands when it receives them, but otherwise is more or less dormant. Mode 1, Streaming Mode has the sensor making and reporting measurements every 500ms by default. Mode 2, Polling Mode makes measurements in the background but does not report them unless it receives an appropriate command from the connected micro:controller.

To request a particular mode #, the command K #\r\n must be sent. So for polling mode, the command is K 2\r\n. Note the space character between “K” and “2”.

For the best, most accurate readings, the sensor needs to be calibrated. The protocol supports calibrating the sensor in a number of ways, including in a known gas concentration, which is the recommended approach or, for those of us without a supply of a suitable reference gas, in fresh air.

Requesting fresh air calibration is achieved by sending the command G\r\n to the sensor.

Micro:bit and the CozIR®-A Sensor

Jennifer had already put together a MakeCode application which could acquire sensor readings from the CozIR®-A and display them on the micro:bit’s LED display. Her application made use of a handy custom block written by Simon Monk of Monk Makes that took care of the nitty gritty details of talking to the sensor, which made her application very easy to read. Here’s the original code which she sent to me:

MakeCode application code for co2 monitoring

MakeCode original code

The application starts by configuring the micro:bit serial communications system to use pins 0 and 1 from the edge connector instead of using the USB connector for serial data. It then sits in an infinite loop, calling one of three custom block functions to obtain a C02, temperature or humidity reading, depending on the value of a variable called mode. The mode variable can be changed by pressing button A so that you can switch from C02 to temperature to humidity readings at the click of a button. Values returned by the custom block are simply displayed on the micro:bit LED grid.

The CozIR®-A Custom Block and Serial Communications

The CozIR®-A custom block which the Let Talk Science application uses, works like this.

There are a number of functions which the application using the block will call, such as the function C02(). Functions like this one send a command to the sensor (in this case Z \r\n) by writing to the serial interface, wait for 200ms and then return the value of a variable which should now contain the latest measurement of the requested type.

    export function Co2(): number {

serial.writeString(“Z\r\n”)

basic.pause(200)

return co2

}

 

How the variable gets assigned the latest measurement, is explained by looking at another part of the custom block’s code. Responses to all commands are received from within an event handler, serial.onDataReceived which is called whenever there’s data waiting to be read from the serial port, as will be the case when a command has been processed. The response data gets read into a string variable, examined to see what type of response it is and then values extracted and assigned to the appropriate variable. For example, C02 readings always start with a Z then a space and then the value in parts per million (ppm). So this code checks for a response that starts with “Z” and then extracts the associated value:

response = serial.readUntil(serial.delimiters(Delimiters.NewLine))

//basic.showString(response)

value_str = response.substr(3, 5)

let value = parseInt(value_str)

// basic.showString(response.charAt(1))

if (response.charAt(1) == ‘Z’) {

let co2_uncompensated = value

co2 = co2_uncompensated + (altitude * 556) / 10000

}

As you can see above, it’s the variable c02 that gets returned by the Co2() function.

The Micro:bit Event System

The BBC micro:bit lets software components talk to each other using event objects. An event is just data which indicates that something in particular has happened and has an associated value or sub-type. Software components can both generate events and indicate that they’re interested in being notified about particular types of event happening elsewhere in the system, when they occur. For example, I might write some code that wants to know when either of the micro:bit’s buttons is pressed. The software component in the micro:bit firmware that is responsible for handling the buttons, known as a driver, generates events whenever buttons get pressed. All my code has to do to receive these events is to register its interest in this type of event using a micro:bit function, and specify what I want to happen when such an event takes place. In the MakeCode programming system, we’re given ready-made blocks for this purpose, such as the onButtonPressed block.

onButtonPressed block code

onButtonPressed block code.

Including the onButtonPressed block in my code, simply means “please tell me if a button gets pressed and execute this code when this happens”.

Events are said to travel along a message bus which you can think of as being like a pipe that events flow along, with some software components injecting event messages into the pipe and others syphoning off copies and processing them.

Technically, events are 32-bit numbers with the first 16 acting as an event identifier (ID) which tells us what type of event it represents and the second 16 acting as a sub-type or an associated value which can be as large as 65535.

Communicating with Bitty Data Logger

Bitty Data Logger uses the micro:bit event system. One of the nice things about the event system is that software components that generate or process events do not have to be inside the micro:bit! They can be connected to the micro:bit over Bluetooth using something called the Event Service. All MakeCode applications which use the Bluetooth package, automatically have the event service built into them, meaning that events can be used for bidirectional communication between the micro:bit and the other device, connected over Bluetooth.

Various event types are used by Bitty Data Logger. These are the ones which were useful in communicating CozIR®-A CO2 sensor data:

Event ID 9020 9030
Event Name Pin Selection Data
Direction of Communication bitty data logger to micro:bit micro:bit to bitty data logger
Purpose Let’s bitty data logger tell the micro:bit which pins on its edge connector to read data from before transmitting it over Bluetooth. Each 9030 event has a value which combines a pin number with a value. This is how up to three different types/sources of data from an external device, connected to the micro:bit, can be communicated to bitty data logger.
Data Format Bits 0, 1 and 2 are used to select pins 0, 1 and 2 for sampling.

For example:

00000010 means pin 1 should be read.

00000111 means pins 0, 1 and 2 should all be sampled.

Bits 0-9 contain value. Bits 15-14 contain a pin no. So a single event value, indicates both the pin that the data comes from and the data sampled from that pin.

In MakeCode, to be notified whenever the 9020 Pin Selection event is sent over Bluetooth from Bitty Data Logger, and to set some flags indicating which of pins 0, 1 and 2 have been selected in the app, this is all we need to do:

MakeCode application code

MakeCode application code.

To formulate a 9030 data event and send it to the smartphone application over Bluetooth, I usually place the code in a MakeCode function block which I can call from elsewhere, like this:

MakeCode function block

MakeCode function block.

It’s that easy!

Changing the Let’s Talk Science code to work with Bitty Data Logger

To adapt Jennifer’s code to work with Bitty Data Logger, I decided to cheat a little. I decided to pretend that C02 readings were associated with pin 0, temperature readings with pin 1 and humidity readings with pin 2. Of course, all of these readings are being returned over the micro:bit’s pin 1 which is receiving serial data from the sensor’s TX pin, but let’s not quibble. Pretending that the three sensor data types come from different pins, allows us to transmit and classify the three types of data seperately so that Bitty Data Logger can capture and chart the data in the usual way.

Reading data from the sensor is performed in a Forever block and only happens if we’ve accepted a Bluetooth connection, indicated by a variable which gets set when a connection is established or lost, in these event handlers from the MakeCode Bluetooth package:

Accept a Bluetooth connection

Accept a Bluetooth connection.

We then request one or more of the three sensor data types, depending on the pins that were set in the Pin Selection event.

Request co2 sensor data types.

Request sensor data types.

Conclusion

The GSS Carbon Dioxide sensor is great for all sorts of science projects and has great relevance to a range of real world issues. As always, Bitty Data Logger allows phenomena to be visualised and analysed, which is a big help in furthering a deeper understanding.

Give it a try! Bitty Data Logger is in the Apple App Store and Google Play.

http://www.bittysoftware.com/apps/bitty_data_logger.html

Conclusion

The GSS Carbon Dioxide sensor is great for all sorts of science projects and has great relevance to a range of real world issues. As always, Bitty Data Logger allows phenomena to be visualised and analysed, which is a big help in furthering a deeper understanding.

Give it a try!

Bitty Data Logger is in the Apple App Store and Google Play:

http://www.bittysoftware.com/apps/bitty_data_logger.html

Full Solution

https://makecode.microbit.org/_5hEKs3FgR7he

Editor

<div style=”position:relative;height:0;padding-bottom:70%;overflow:hidden;”><iframe style=”position:absolute;top:0;left:0;width:100%;height:100%;” src=”https://makecode.microbit.org/#pub:_5hEKs3FgR7he” frameborder=”0″ sandbox=”allow-popups allow-forms allow-scripts allow-same-origin”></iframe></div>

Link

https://makecode.microbit.org/_5hEKs3FgR7he

Editor

<div style=”position:relative;height:0;padding-bottom:70%;overflow:hidden;”><iframe style=”position:absolute;top:0;left:0;width:100%;height:100%;” src=”https://makecode.microbit.org/#pub:_5hEKs3FgR7he” frameborder=”0″ sandbox=”allow-popups allow-forms allow-scripts allow-same-origin”></iframe></div>

Contact the author

Martin Woolley | Developer Relations Manager, EMEA at Bluetooth SIG

http://www.bittysoftware.com

https://bittysoftware.blogspot.com/

@bittysoftware 

 

people on an airplane breathing in ambient air with CO2 sensors used to monitor the level of CO2 in the air and maintain safe air quality

Sensor technology role in Government funded research on aircraft air quality monitoring

The innovative CO2 sensing technology that has been developed by Gas Sensing Solutions (GSS) will play a key role in a UK Government funded research programme to improve aircraft cabin air quality.

people on an airplane breathing in ambient air with CO2 sensors used to monitor the level of CO2 in the air and maintain safe air quality

Monitoring air quality with CO2 sensors on airplanes

The U-CAIR project, led by Honeywell in partnership with the National Physical Laboratory, Gas Sensing Solutions and SST Sensing, is developing cabin air sensor technology to monitor air quality and improve passengers’ cabin experience. The U-CAIR (UK ATI Cabin Air) project will not only create an improved passenger experience in large passenger aircraft, business jets and regional aircraft, but also allow for further fuel savings of up to 2000 litres on long haul flights. Receiving a grant of £2.3 million, this project will enable the UK to develop key technologies that will lead the market in passenger-friendly aircraft. This is part of the £3.9 billion that government and industry will have committed to the aerospace sector by 2026.

The project is driven by the increasing awareness of the effects that even slightly elevated levels of CO2 can have on health, which start with yawning and drowsiness and become progressively worse as levels rise. If a room feels stuffy that is not due to lack of oxygen but CO2 levels increasing to the point where it is starting to have an affect.

co2 sensors to monitor air quality on airplanes

High levels of CO2 can cause hallucinations

In an aircraft with hundreds of people all breathing out CO2, the level could quickly rise so the air has to be changed to remove it. Changing the air uses energy to pump low-pressure air in from outside the aircraft, then pressurise and warm it for the cabin. This energy comes from burning aircraft fuel, so the aim of this project is to monitor the level of CO2 in the cabin to match the air change to what is actually required. This can provide significant savings in fuel use and reduce carbon footprints.

Calum MacGregor, CEO of GSS, explained, “Our unique CO2 sensor technology has been selected for this project because of its industry leading features of low power, accuracy and immunity to vibration.

Calum MacGregor CEO of GSS

Calum MacGregor, CEO of GSS

Plus, our sensors are very robust with a long service life, making them the perfect choice for the challenging environment of vibration, pressure changes, etc. in an aircraft where they must work reliably for many years. This project is one of many that we are involved in where we develop a custom solution that precisely meets the needs of the customer.”

For more information, have a look at our range of CozIR® CO2 sensors for air quality monitoring. These low power sensors are designed to measure ambient air (up to 1% CO2), so they are highly suited to monitoring air quality on aircraft, and in similar confined spaces.

www.ati.org.uk 

https://www.azosensors.com/news.aspx?newsID=12495

Sensor + Test CO2 trade show

AZO Sensors talks with the CEO of GSS at Sensor + Test 2018

AZO Sensors catches up with GSS’ CEO, Calum MacGregor in Nurnberg.

Could you tell us a bit about Gas Sensing Solutions and why you are attending SENSOR+TEST 2018?

We are Gas Sensing Solutions and we’re world leaders in manufacturing CO2 sensors. We manufacture LEDs in-house – all of our CO2 sensors are LED-based, which gives us three huge advantages; low-power, robustness, and high speed. Those are the three markets we target; low-power is normally the battery-powered market; Robust, for those challenging applications which need to endure vibrations and bumps, or where you need to withstand changing pressures and temperatures. And high speed, where you want to measure rapidly changing CO2 levels, for example, in breath analysis and other medical applications.

CO2 breath analysis

Monitoring Exhaled CO2 with the N-Tidal handheld monitor

We are here because SENSOR+TEST has been by far the most successful show at reaching these very different markets. We operate in lots of different practical markets and all of them come together once a year at SENSOR+TEST 2018.

Are there any products that you are highlighting this year?

High Speed CO2 sensor

SprintIR6S high speed sensor

Two products. One is our high-speed sensing range, known under the SprintIR brand – particularly the SprintIR-6S which has been really successful for the last few years. It’s the fastest CO2 sensor in class by a long way, and it’s showing a lot of traction in medical markets. We’re also introducing our ExplorIR brand. This is a range of CO2 sensors for harsh or challenging environments, where the sensor undergos a lot of vibration or shocks, and is subject to particularly testing conditions.

What makes those products unique to anything else that is on the market?

High speed. We are best in class in terms of our speed and response. This is often needed for measuring very rapidly changing CO2 levels. For example, in people’s breath you need a very rapid speed of response. We are just best in class there because we are using our own innovative LED technology. This is also the case in terms of the tough and robust strengths of our sensors. Because they’re built on this solid-state technology, there are no heated parts, no moving parts, and they can withstand many Gs of vibration experienced during acceleration, with no compromise on performance and accuracy.

Factory where the GSS LED is made

GSS LED making factory

Which industries do you primarily serve?

We serve a very broad range of markets. We make CO2 sensors for air quality markets, such as for building automation and control systems. We manufacture sensors for horticultural applications, such as for plant growth and grain storage applications. In terms of healthcare, we make CO2 sensors for medical markets. For example CO2 sensors for breath analysis applications like capnography and fitness testing. We have many customers in the food transportation and storage industries, who use Carbon Dioxide sensors in shipping containers. The wonderful thing about SENSOR+TEST is that we meet people who are doing things we had never thought of before!

We also manufacture custom CO2 sensors and solutions for people who have a really challenging environment. Some customers want us to design a Carbon Dioxide sensor for an application we never even knew existed! There are so many weird and wonderful applications out there and we’re just glad to be able to lend our extensive knowledge and create a custom solution for them.

Calum MacGregor CEO of GSS

Calum MacGregor, CEO of GSS

Calum MacGregor talked to AZO Sensors about GSS’s experience at the Sensor + Test show: https://www.azosensors.com/article.aspx?ArticleID=1188