08 April 2024

PMS5003 Digital Particle Concentration Sensor

🔘The SpacerLabs domestic 'Air Quality Monitor' ( AQM ) 🏭 with multi-sensor support posted on 15.03.2023, ( updated 29.02.2024 ) is based on the Cubic PM1006 infra-red LED particle sensor module.  Another type of  particle sensor is the 🪴 Plantower 🗼PMS5003.  It uses a laser source, is capable of detecting particles down to ⌀0.3 microns in size, and measures some additional  values compared to the PM1006 as well as being approximately twice as accurate. One has been obtained as an individual item, ( not part of an AQM product, filtration or ventilation equipment etc ), and is being tried out.
In use, the measurements made by the PMS5003 are sent periodically ⏲ as 32 bytes of data over a UART serial interface at a data rate of 9600 bits/sec. A UART to USB protocol converter dongle provides a virtual COM port on a computer allowing the data to be displayed on a pc if there is a usb cable connecting 🔗both and a serial terminal program is running. 
Left - PMS5003, Right - UART to USB dongle
We wrote a serial terminal application specifically for the PMS5003, called 'PMS5003_Serial', with only basic functionality just to demonstrate the operation of the PMS5003, ( image below ).
PMS5003_Serial software receiving & displaying data
The received raw serial data are displayed in hexadecimal and decimal, then parsed in software to extract the bytes of interest containing data relating to particulate matter🦠  mass concentration ( ug/m^3 ) and particle number per deci-litre, ppdl, ( 0.1 litre ) of air 🜁 , sorted according to size in microns. The AQI ( range 0-500 ) and air quality level are also given.
This project might be developed further by providing embedded control, a touch sensitive colour display, Bluetooth, App for a mobile device and a 3-D printed case.
 
UART = Universal Asynchronous Receiver Transmitter.
AQI = Air Quality Index 

 
 

29 February 2024

PM2.5 data from AQM now on the cloud

🔘Particulate Matter ㏘, PM2.5, data can now be uploaded 🖧 to the Ubidots cloud  ☁ from the Air Quality Monitor ( AQM ); see 15.03.2023. The Ubidots Ů platform provides visualisation / analysis of data from IoT sensors, also generating events, alerts, actions etc if required. We are already using this platform in conjunction with the Greenhouse Gas Monitoring system ( see 28.07.2022 ) and a soil moisture meter. On this occasion, with the AQM,  Node-Red is being used for alerts⏰.Two new widgets to display the PM2.5 concentration value have been added to an existing SpacerLabs Ubidots dashboard. The colours used for the air-quality levels ( good, OK, poor ) on the gauge widget match those used on the coloured LED indicator on the front of the AQM. 
Part of the dashboard showing the new widgets for PM2.5
Using the Node-Red 🟥 application, function 'nodes' are linked by connecting inputs to outputs and on-line services to create a 'flow' to perform task(s) using a browser based workspace. We have used it previously with the UVRM ( see 23.03.2023 ) and a soil moisture meter. The AQM flow ( image below ) starts by subscribing to the AQM PM2.5 data on Ubidots cloud using MQTT ( blue node ) and ends by triggering an email 📧 to be sent when the PM2.5 level exceeds 85 ug/m3; classified as level 'high' and air 🜁 quality 'poor'.
Node-Red 'flow' to trigger an email warning of poor air quality
It can be seen under the 'Debug' tab that an email 📧is indeed sent when PM2.5 >85; otherwise only the value ( if changed ) is reported. The email topic reads "SpacerLabs AQM - PM2.5 Alert " and the message reads "The SpacerLabs AQM has measured a PM2.5 level >85 (High) Air-Quality category - Poor. (Timestamp)". Even though the AQM may not be visible, an immediate audible notification is given by a smart phone when the email is received. 🔲
PM2.5 = Particulate Matter size 2.5 micron
MQTT = Message Queued Telemetry Transport
IoT = Internet of Things

18 February 2024

🏭Greenhouse Gas Monitor - Real Time Data

ThingSpeak Embedded Plot        🔘The SpacerLabs "Greenhouse Gas Monitoring System" 🟩 was described on 28.07.2022 & 05.01.2023 🗓. Periodically since then it has been used to measure the outdoor concentrations of two potent green-house gases, Methane and Carbon Dioxide, in close proximity to "Spacerowa Laboratories" at 3m above ground level.  Methane ( CH4 ) and Carbon Dioxide ( CO2 ) concentration data in parts per million are now downloaded here every 15 minutes from the SpacerLabs Greenhouse Gas Monitor channel on ThingSpeak cloud ☁ for IoT sensor projects.

It has been noticed that increased concentration of methane coincides with wet weather conditions and vice-versa. According to NASA data, atmospheric concentration of CO2 was 416ppm in 2021, and CH4 was 1.8922ppm in 2020.
Lower left MQ-4 sensor, lower right MQ-135 sensor
The image above shows the outdoor part of the system with the two gas sensors, MQ-4 ( methane ) and MQ-135 ( carbon dioxide ), mounted in a weather-proof junction box,  ( cover removed ).
The blue trim-pot on each sensor breakout board can be used to set a concentration threshold level to trigger an alarm ⏰ and illuminate 💡 a LED ( just visible in the image ). Although active, the alarm condition is currently not being extended back to the micro-controller situated indoors for processing. 🔲