[2024 DigiKey Creative Competition] February Catkins Campaign Project-05 Get Sensor SPS30 Sensor Data
[Copy link]
This post was last edited by Maker_kun on 2024-11-3 21:07
The SPS30 sensor is an optical particulate matter (PM) sensor from Sensirion that represents a technological breakthrough in this field. Its measurement principle is based on laser scattering and combined with Sensirion's innovative anti-pollution technology, it ensures accurate measurement from the first use to a service life of more than eight years.
The SPS30 sensor has the following features:
High precision and long-term stability: The SPS30 sensor uses advanced algorithms and anti-pollution technology to maintain high precision and stability during long-term use. Multi-interface support: The sensor provides two communication interfaces, UART and I2C, suitable for different application scenarios. For connection cables longer than 20 cm, it is recommended to use the UART interface to enhance anti-electromagnetic interference capabilities.
Miniaturized design: The SPS30 sensor is small in size, measuring only 41 x 41 x 12 mm, making it suitable for space-constrained applications such as wall-mounted or compact air quality monitoring equipment.
Wide range of applications: SPS30 sensors are widely used in air purifiers, HVAC equipment, demand control ventilation systems, air conditioners, air quality and environmental monitors, as well as smart home and IoT devices.
Certification and environmental protection: The SPS30 sensor has passed the MCERTS certification and complies with the latest EU environmental standards, such as ROHS and REACH directives, ensuring its green and pollution-free nature.
The SPS30 sensor has become an important tool in the field of air quality monitoring and control due to its excellent measurement performance, long-term stability, flexible interface selection and wide range of applications.
PM2.5, or fine particulate matter , refers to particles with an aerodynamic equivalent diameter of less than or equal to 2.5 microns. This type of particle can remain suspended in the air for a long time and has a significant impact on air quality and visibility. The sources of PM2.5 can be divided into natural sources and anthropogenic sources. Natural sources include wind-blown dust, volcanic ash, forest fires, and sea salt; anthropogenic sources include primary particulate matter (such as coal smoke, industrial emissions) and secondary particulate matter (formed by chemical reactions of gaseous precursors). The chemical composition of PM2.5 is complex, mainly including soluble particles (such as F-, Cl-, Br-, NH4+, Na+, K+, etc.), inorganic elements (such as natural dust, metal elements) and carbon-containing substances (such as organic carbon OC, elemental carbon EC and polycyclic aromatic hydrocarbons, etc.). These components make PM2.5 highly toxic, and long-term exposure to high-concentration PM2.5 environments will increase the risk of respiratory diseases, cardiovascular diseases and lung cancer. When measuring PM2.5, commonly used methods include weight method, beta-ray absorption method, micro-oscillating balance method and light scattering method. Among them, the light scattering method is widely used due to its fast measurement speed and high sensitivity. The impact of PM2.5 on health is mainly reflected in its ability to penetrate deep into the lungs and enter the blood system, thereby affecting the respiratory and cardiovascular systems. It may also adsorb organic pollutants and heavy metals, increasing the risk of cancer and gene mutation. Therefore, controlling the concentration of PM2.5 is crucial to improving air quality and protecting public health.
Working principle of SPS30 particle laser scattering detection:
Convert different particles into different electrical signals:
Super strong consistency:
Characteristics of different PM2.5:
Relationship between air quality and PM2.5 particles:
European standards:
US Standard:
The official library uses the wire IIC channel, but if wire is used, it will occupy the LCD screen driver
void sensirion_i2c_init()
{
Wire.begin();
}
void sensirion_i2c_release(void)
{
}
int8_t sensirion_i2c_read(uint8_t address, uint8_t *data, uint8_t count) {
uint8_t readData[count];
uint8_t rxByteCount = 0;
// 2 bytes RH, 1 CRC, 2 bytes T, 1 CRC
Wire.requestFrom(address, count);
while (Wire.available()) { // wait till all arrive
readData[rxByteCount++] = Wire.read();
if (rxByteCount >= count)
break;
}
memcpy(data, readData, count);
return 0;
}
int8_t sensirion_i2c_write(uint8_t address, const uint8_t *data,
uint8_t count) {
Wire.beginTransmission(address);
Wire.write(data, count);
Wire.endTransmission();
return 0;
}
#endif /* SPS30_USE_ALT_I2C */
The official library needs to be further modified to carry out the wire1 channel. Modifying the official library does require a lot of effort and time.
You need to replace wire with wire1
Get sensor data:
References:
https://news.eeworld.com.cn/medical_electronics/2018/ic-news08168920.html
https://ehs.uci.edu/enviro/air-quality/current-air-quality.php
https://www.zhihu.com/question/20173158/answer/2001770330?utm_campaign=shareopn&utm_content=group2_Answer&utm_medium=social&utm_psn=1832705139284262913&utm_source=wechat_session
|