SPS30 sensor via I2C with MKR one: Arduino sketch
- Details
- Category: Devices
- Hits: 283
Works with sensirion-sps Arduino lib (the versions below 1.2.0). Data will be in Serial monitor:

#include <sps30.h>
#include <Wire.h>
// Uncomment for serial plotter format
// #define PLOTTER_FORMAT
void setup() {
int16_t ret;
uint8_t auto_clean_days = 4;
SerialUSB.begin(115200); // Use SerialUSB for MKR boards
while (!SerialUSB) {
; // Wait for USB Serial to be ready
}
delay(2000);
// Initialize I2C on default pins (SDA/SCL on MKR ONE 1310)
Wire.begin();
// Initialize Sensirion I2C layer (usually calls Wire.begin internally)
sensirion_i2c_init();
while (sps30_probe() != 0) {
SerialUSB.println("SPS sensor probing failed");
delay(500);
}
#ifndef PLOTTER_FORMAT
SerialUSB.println("SPS sensor probing successful");
#endif
ret = sps30_set_fan_auto_cleaning_interval_days(auto_clean_days);
if (ret) {
SerialUSB.print("error setting the auto-clean interval: ");
SerialUSB.println(ret);
}
ret = sps30_start_measurement();
if (ret < 0) {
SerialUSB.println("error starting measurement");
}
#ifndef PLOTTER_FORMAT
SerialUSB.println("measurements started");
#endif
#ifdef SPS30_LIMITED_I2C_BUFFER_SIZE
SerialUSB.println("Your Arduino hardware has a limitation that only allows reading the mass concentrations.");
SerialUSB.println("See https://github.com/Sensirion/arduino-sps#esp8266-partial-legacy-support");
delay(2000);
#endif
delay(1000);
}
void loop() {
struct sps30_measurement m;
uint16_t data_ready;
int16_t ret;
do {
ret = sps30_read_data_ready(&data_ready);
if (ret < 0) {
SerialUSB.print("error reading data-ready flag: ");
SerialUSB.println(ret);
} else if (!data_ready) {
SerialUSB.println("data not ready, no new measurement available");
} else
break;
delay(100);
} while (1);
ret = sps30_read_measurement(&m);
if (ret < 0) {
SerialUSB.println("error reading measurement");
} else {
#ifndef PLOTTER_FORMAT
SerialUSB.print("PM 1.0: ");
SerialUSB.println(m.mc_1p0);
SerialUSB.print("PM 2.5: ");
SerialUSB.println(m.mc_2p5);
SerialUSB.print("PM 4.0: ");
SerialUSB.println(m.mc_4p0);
SerialUSB.print("PM 10.0: ");
SerialUSB.println(m.mc_10p0);
#ifndef SPS30_LIMITED_I2C_BUFFER_SIZE
SerialUSB.print("NC 0.5: ");
SerialUSB.println(m.nc_0p5);
SerialUSB.print("NC 1.0: ");
SerialUSB.println(m.nc_1p0);
SerialUSB.print("NC 2.5: ");
SerialUSB.println(m.nc_2p5);
SerialUSB.print("NC 4.0: ");
SerialUSB.println(m.nc_4p0);
SerialUSB.print("NC 10.0: ");
SerialUSB.println(m.nc_10p0);
SerialUSB.print("Typical particle size: ");
SerialUSB.println(m.typical_particle_size);
#endif
SerialUSB.println();
#else
SerialUSB.print(m.nc_0p5);
SerialUSB.print(" ");
SerialUSB.print(m.nc_1p0 - m.nc_0p5);
SerialUSB.print(" ");
SerialUSB.print(m.nc_2p5 - m.nc_1p0);
SerialUSB.print(" ");
SerialUSB.print(m.nc_4p0 - m.nc_2p5);
SerialUSB.print(" ");
SerialUSB.print(m.nc_10p0 - m.nc_4p0);
SerialUSB.println();
#endif
}
delay(1000);
}
polluSensWeb - connect any UART pollution sensor via COM port!
- Details
- Category: polluSensWeb
- Hits: 1670

PolluSensWeb is a lightweight web-based serial interface and charting tool for visualizing and logging data from UART pollution sensors (PM2.5, VOC, etc).
- Live serial data acquisition
- Frame parsing with startByte / endByte / checksum
- Dynamic charts with customizable signal style (color, thickness, tension)
- Multiple simultaneous charts
- Full CSV export (timestamp + all signals)
- Clearable log with raw serial packets and checksum result
- Configurable via external JSON file
- Supports webhooks
- Works offline after load (except webhooks)
- Minimal dependencies
- No external servers required
Supported Sensors
The following sensors are currently supported by polluSensWeb:
- Panasonic SN-GCJA5
- Honeywell HPMA115S0-XXX
- Air Master AM7 Plus
- Plantower PMSA003-S
- Plantower PS3003A
- Plantower PMS1003
- Plantower PMS5003
- Plantower PMS7003
- Plantower PMS6003
- Plantower PMS9103
- Plantower PMS3003
- Nova PM SDS011
- Sensirion SPS30
- SHUYI SY210
- TERA NextPM - thanks to Michael Lažan for testing! (senzorvzduchu.cz)
- SenseAir S8 004-0-0053
- SenseAir S88 Residential
- SenseAir S88 LP
- SenseAir S88 GH
- SenseAir K30
- SenseAir K33
- SenseAir eSENSE
- SenseAir S8 004-0-0017
- SenseAir K33 ICB
- Sensirion SCD30
- YYS DC01
- YYS D01
- YYS D01-P
- YYS D9
- YYS D3
- YYS D5
- YYS D7
- YYS D7B
- Winsen ZH03B
- ...more coming soon!
UN Ocean Gaps, TFA Chemical Risk, €15B Water Investment, EU Microplastics Standard, EV Ship Fire in Pacific
- Details
- Category: Econews
- Hits: 383
1 — UN Ocean Conference Exposes Gaps in Marine Protection
Only 2.7% of global oceans are fully protected — far short of the 30% by 2030 target.
Officials and researchers called for:
- stricter enforcement of marine pollution rules,
- limits on plastic and chemical pollution,
- better data sharing on marine ecosystem health.
2 — TFA, a New "Forever Chemical," Under EU Review
Trifluoroacetic acid (TFA), a persistent byproduct of PFAS, is now found in rainwater, groundwater, and human breast milk across Europe.
The European Chemicals Agency may soon classify it as a reproductive toxin — a step that would trigger new monitoring and regulation.
3 — €15 Billion EU Investment to Protect Water
The European Investment Bank will invest €15 billion over 3 years in water protection projects, aiming to:
- reduce water pollution,
- improve wastewater treatment,
- cut water waste,
- fund innovation in monitoring and treatment.
4 — First EU Standard for Microplastics Testing
The EU Joint Research Centre (JRC) has released the first reference material for microplastics in water — a PET-based standard for calibration.
This supports the new EU Drinking Water Directive rules requiring microplastics monitoring.
5 — Burning EV Ship in Pacific Raises Pollution Fears
The cargo ship Morning Midas, carrying ~3,000 cars (incl. ~800 EVs), caught fire and was abandoned about 300 miles southwest of Alaska.
Lithium-ion batteries and fuel onboard continue to burn. Salvage efforts are underway.
AP News | WSJ
Page 3 of 48
RSS
