Silicon ChipPAS CO2 Air Quality Sensor - July 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Low-cost UPSes are not worth the risk
  4. Feature: IC Fabrication, Part 2 by Dr David Maddison
  5. Project: Multimeter Calibrator & Checker by Tim Blythman
  6. Review: Anycubic Photon Mono 3D printer by Tim Blythman
  7. Project: VGA PicoMite by Geoff Graham
  8. Project: 0-110dB RF Attenuator by Charles Kosina
  9. Review: Oatley Solar Charge Controller by John Clarke
  10. Project: Secure Remote Mains Switch, Part 1 by John Clarke
  11. Product Showcase
  12. Feature: PAS CO2 Air Quality Sensor by Jim Rowe
  13. Serviceman's Log: Trail camera fun by Dave Thompson
  14. Subscriptions
  15. Vintage Radio: Astor CJ-12 car radio by Dr Hugo Holden
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: MOS Air Quality Sensors, June 2022; Railway Semaphore Signal, April 2022; High Power DC Motor Speed Controller, January & February 2017
  20. Outer Back Cover

This is only a preview of the July 2022 issue of Silicon Chip.

You can view 44 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • IC Fabrication, Part 1 (June 2022)
  • IC Fabrication, Part 1 (June 2022)
  • IC Fabrication, Part 2 (July 2022)
  • IC Fabrication, Part 2 (July 2022)
  • IC Fabrication, Part 3 (August 2022)
  • IC Fabrication, Part 3 (August 2022)
Items relevant to "Multimeter Calibrator & Checker":
  • Multimeter Checker & Calibrator PCB [04107221] (AUD $5.00)
  • PIC16F1459-I/SO programmed for the Multimeter Calibrator/Checker (0410722B.HEX) (Programmed Microcontroller, AUD $10.00)
  • Complete kit for the Multimeter Checker (Component, AUD $45.00)
  • Firmware and source code for the Multimeter Checker/Calibrator [0410722A/B] (Software, Free)
  • Multimeter Checker & Calibrator PCB pattern (PDF download) [04107221] (Free)
Items relevant to "VGA PicoMite":
  • VGA PicoMite PCB [07107221] (AUD $5.00)
  • VGA PicoMite short-form kit (Component, AUD $37.50)
  • VGA PicoMite short-form kit with case (Component, AUD $55.00)
  • Firmware and user manual for the VGA PicoMite (Software, Free)
  • VGA PicoMite PCB pattern (PDF download) [07107221] (Free)
  • Cutting/drilling guides for the VGA PicoMite front & rear panels (Panel Artwork, Free)
Articles in this series:
  • The Raspberry Pi-based PicoMite (January 2022)
  • The Raspberry Pi-based PicoMite (January 2022)
  • VGA PicoMite (July 2022)
  • VGA PicoMite (July 2022)
  • The PicoMite 2 (February 2025)
  • The PicoMite 2 (February 2025)
Items relevant to "0-110dB RF Attenuator":
  • 0-110dB RF Attenuator PCB [CSE211003] (AUD $5.00)
  • ATmega328P programmed with the firmware for the 110dB RF Attenuator [CSE211003.HEX] (Programmed Microcontroller, AUD $10.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • 0.96in cyan OLED with SSD1306 controller (Component, AUD $10.00)
  • Short-form kit for the 0-110dB RF Attenuator (Component, AUD $75.00)
  • Firmware and BASIC source code for the 0-110dB RF Attenuator [Attenuator 3] (Software, Free)
  • 0-110dB RF Attenuator PCB pattern (PDF download) [CSE211003A] (Free)
  • Front panel label and drilling diagram for the 110dB RF Attenuator (Panel Artwork, Free)
Items relevant to "Secure Remote Mains Switch, Part 1":
  • Secure Remote Mains Switch receiver PCB [10109211] (AUD $7.50)
  • Secure Remote Mains Switch transmitter PCB [10109212] (AUD $2.50)
  • PIC16F1459-I/P programmed for the Secure Remote Mains Switch receiver (1010921R.HEX) (Programmed Microcontroller, AUD $10.00)
  • PIC16LF15323-I/SL programmed for the Secure Remote Mains Switch transmitter (1010921A.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware and ASM source code for the Secure Remote Mains Switch [1010921A/R] (Software, Free)
  • Secure Remote Mains Switch PCB patterns (PDF download) [10109211/2] (Free)
  • Front panel label and drilling diagrams for the Secure Remote Mains Switch (Panel Artwork, Free)
Articles in this series:
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Mains Switch, part two (January 2025)
  • Secure Remote Mains Switch, part two (January 2025)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $11.50.

Using Cheap Asian Electronic Modules By Jim Rowe PAS CO2 Air Quality Sensor Module Continuing our series of articles describing low-cost air quality sensors (LCAQS), this month, we take a close look at a sensor module based on photoacoustic spectroscopy or PAS. It’s the Infineon XENSIV PAS CO2 mini-board. P AS (photo-acoustic spectroscopy) sensors take advantage of the way molecules of a particular gas absorb specific IR wavelengths according to the Beer-Lambert law. In PAS sensors, the degree of absorption is measured using a phenomenon Alexander Graham Bell discovered in 1880. When a thin metal disc is exposed to pulses of sunlight (Bell used a rotating slotted wheel), it emits sound. Later, Bell showed that materials exposed to the non-visible wavelengths in sunlight (like infra-red/IR and ultraviolet/UV) also emit sound. The basic structure of a PAS sensor is shown in Fig.1. On the left is the pulsed IR light source (generally an array of LEDs), with an optical filter passing only the wavelengths absorbed by the gas to be detected - in this example, 4.2μm for the detection of CO2. At the far end of the chamber, there is a MEMS microphone optimised to detect low audio frequencies. When the detected sound level is amplified, it can be converted into a figure corresponding to the amount of CO2 present in the cell. The whole sensor is enclosed in an acoustic insulation layer, to reduce the influence of external sound. LCAQS sensors using the PAS principle have only appeared in the last couple of years because their development has depended on MEMS technology. The only one currently available seems to be the XENSIV PAS CO2 sensor from Infineon Technologies (an offshoot of Siemens in Munich, Germany). This comes on a very compact module measuring only 14 x 13.8 x 7.5mm, combining the PAS sensor with a Fig.1: the basic structure of a PAS sensor. A pulsed IR LED emits light through a filter leaving only wavelengths of light that the gas to be detected can absorb. A MEMS microphone then detects low-frequency audio that is emitted by the gas, which can be measured to provide the amount of gas in the cell. siliconchip.com.au Australia's electronics magazine dedicated microcontroller unit (MCU) running advanced compensation algorithms and providing a choice of three different data interface ports. It is currently available from suppliers like element14 for around $50 or Mouser Electronics for about $78. Inside the module Fig.2 shows a functional block diagram of the XENSIV PAS CO2 sensor module. At the top is the PAS measurement cell, with its gas inlet pipe on the right, the MEMS IR emitter in the centre and the MEMS LF microphone on the left. Then in the lower part of the diagram are the microcontroller and memory, the light source driver and the circuit that measures the voltage of the external 12V DC supply used to power the IR emitter. Labels for the pin connections are available on the module underside. July 2022  83 but I suspect it is only functional when the UART or PWM interfaces are being used. The actual pin connections for the PAS CO2 mini-board are shown in Fig.3, which is a simplified top view of the module. There are six pins on each side, but the two lowest pins, labelled SWD and SWCLK, are for testing during manufacture and should not be connected when the module is being used. All of the remaining pins correspond to those shown in Fig.2. Trying it out Fig.2: a functional block diagram of the XENSIV PAS sensor module. As mentioned above, the PAS CO2 sensor mini-board provides a choice of three different data interfaces for communicating with an external MCU: I2C, asynchronous serial (UART) and PWM (pulse-width modulation). Which one to be used is chosen by setting the logic level on the PSEL and PWM_DIS control pins. To use the I2C interface, the PWM_ DIS and PSEL pins must be pulled down to GND. For the UART interface, PWM_DIS is pulled down while PSEL is pulled up to logic high (3.3V) instead. Finally, if you want to use the PWM interface, the PWM_DIS pin is pulled to logic high (3.3V). When the I2C interface is selected, the SDA/TX pin is used for the data line and the SCL pin for the clock line. When using this interface, both the SDA/TX and SCL pins need to be fitted with 10kW pull-up resistors to the +3.3V supply. When the UART interface is selected, the SDA/TX line is used as the serial data output and the RX pin for serial data input. But when the PWM interface is selected, the width-modulated pulses emerge from the PWM pin. The INT pin is an output to allow the internal MCU to indicate when it has finished a measurement. I could not find much information on this, Once I had obtained a sample XENSIV PAS CO2 mini-board module, the challenge was to discover how to connect it to a standard low-cost MCU like an Arduino Uno. Luckily, I found this information on the Infineon website. Although Infineon only provides specific information on connecting the module to either a PSoC 6 WiFi-BT Pioneer Kit or an up-market Arduino Due, I was able to glean enough from the latter option to work out how to connect it to an Uno or similar. This turned out to be relatively straightforward, as you can see from Fig.3, which shows how to connect the module to an Arduino Uno via I2C. The 3.3V logic supply comes from the +3.3V output of the Uno, while the SCL Fig.3: connecting the PAS sensor to an Arduino board is straightforward. Note that we have tied the PWM_DIS and PSEL pins to GND so that the module is in I2C mode. Useful links PAS modules: • https://au.element14.com/3779651 • https://au.mouser.com/ProductDetail/726-PASCO2V01AUMA2 • www.infineon.com/cms/en/product/sensor/co2-sensors/#!products Software libraries (or download through the Arduino IDE Library Manager): • https://github.com/Infineon/arduino-pas-co2-sensor • www.arduino.cc/reference/en/libraries/pas-co2-sensor/ Photoacoustic spectroscopy: • https://w.wiki/4wsX 84 Silicon Chip Australia's electronics magazine siliconchip.com.au and TX/SDA pins connect to the Uno’s SCL and SDA pins and a pair of 10kW pull-up resistors. The PWM_DIS and PSEL pins are tied to ground for I2C mode, as mentioned earlier. Since the module also needs a 12V DC supply to provide power for the IR LED, this can come from a separate plugpack supply. It can be a small supply, since the average current is less than 600μA with brief pulses of around 20mA. Three bypass capacitors on the 12V supply line provide smoothing. Of course, we need a software library to send commands to and receive data from the sensor, plus a sketch to use the library. After a bit of searching on the Arduino website in the “reference/en/ libraries” section and then in the list of 900-odd contributed libraries for communicating with sensors, I found one called “PAS CO2 Arduino Library v1.0.3”. When I clicked on that one, it took me to github.com, where I discovered that the library was provided by and maintained by Infineon! So it was obviously the right one to download. I downloaded the library zip file and added it to my Arduino IDE’s list of installed libraries. I then discovered that it came with 12 example sketches – four of which are for using the module’s PWM interface mode, while the Fig.4: sample output 15:37:04.303 15:37:09.505 15:37:14.520 15:37:19.487 15:37:24.502 15:37:29.516 15:37:34.483 15:37:39.498 15:37:44.466 15:37:49.480 15:37:54.448 15:37:59.462 15:38:04.477 15:38:09.444 15:38:14.459 15:38:19.426 15:38:24.441 -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> pas co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 co2 ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm ppm serial intialized value : 633 value : 623 value : 621 value : 611 value : 609 value : 610 value : 649 value : 1018 value : 1255 value : 1254 value : 1256 value : 1317 value : 1409 value : 1418 value : 1405 value : 1392 other eight are for the serial interface modes (ie, I2C or UART). The latter had the following titles: • serial-alarm • serial-api-test • serial-calibrate • serial-device-id • serial-diagnosis • serial-oneshot • serial-periodic • serial-reset I decided to try “serial-oneshot.ino”, and when I loaded it, compiled it and then uploaded it to the Arduino and opened virtual serial port COM3, it all sprang into life. The PAS sensor measures 14 x 13.8mm, making it tiny in comparison to the enlarged photo shown here. Fig.4 shows the output in the Arduino IDE Serial Monitor following the startup of the serial-oneshot sketch. The first line indicates that the PAS CO2 and its I2C serial port have been initialised, while the following lines show the measured CO2 levels in ppm (parts per million). These measurements are about five seconds apart, as you can see from the timestamps. The other thing to note from Fig.4 is that the initial seven readings are all between 610ppm and 649ppm, whereas the eighth reading suddenly jumps up to 1018ppm and then following readings move up to 1418ppm before starting to fall again. At about 15:37:40, I exhaled towards the PAS CO2 sensor. So it was responding to the sudden increase in CO2 level, as it’s supposed to. Encouraged by this initial success, I then tried loading, uploading and running the “serial-calibrate.ino” example sketch. This sketch ran very quickly, simply giving a “sensor now calibrated” message before ending. Summary Despite being very compact, the Infineon XENSIV PAS CO2 sensor mini-board is a good performer. As it uses a standard I2C interface, it is compatible with just about any microcontroller, including virtually all Arduinos. No doubt it would work with a Micromite as long as it was set up to send the correct I2C commands. Although it is priced higher than the MOS sensors we’ve looked at previously, and it needs a 12V supply, it is a good choice if you want a small and accurate CO2 sensor. SC siliconchip.com.au Australia's electronics magazine July 2022  85