DC01 Infrared PM2.5 Air Quality Sensor
Has anybody worked with this device. Amazon is selling this unit for $9.99. It has a uart connection so it may not be compatible with a P2, but I do not know.
Thanks
Ray
Has anybody worked with this device. Amazon is selling this unit for $9.99. It has a uart connection so it may not be compatible with a P2, but I do not know.
Thanks
Ray
Comments
If it's got a UART connection there is no reason it shouldn't be compatible with the P2 or any other microcontroller. Do you have a link to the specific device you're interested in?
https://www.amazon.com/EC-Buying-Infrared-Detection-Concentration/dp/B0DBST3BSS/ref=sr_1_1?crid=24BKF6M5TK5T2&dib=eyJ2IjoiMSJ9.NnBM8HusXWF7IiRVhVFCiHvEibkgSLC9Y9-uQ-YJflWOafqVqW4Oq9mnEtovEMIFD_ll41djhkNP9Id8cjM-PjOjDiLlx_aX5xAls1DL2SSudrYtTEY8lpTc1ygkZJYdKxSkQnrrF36ShK_TkT_H1vOx7RMipxz9xB1tPewmOspZhK-LrxVN4DEj6gt243eMXbKS-zs7UTmrT9LP6ArRDNFW1zT560mLR0pO8yVH__4.9GAu1nUGuxnHjnJpFULLzHrF-TKuQHSaeQZjPgBfhb0&dib_tag=se&keywords=DC01+Infrared+PM2.5+Air+Quality+Sensor&qid=1772814471&sprefix=dc01+infrared+pm2.5+air+quality+sensor,aps,175&sr=8-1
Now I noticed amazon shows other similar devices, but they are selling in the range of $40.00. I was looking at a goveelife air quality unit, and noticed that the unit uses PM2.5 sensor. Hmm is this better than a bme680 setup.
Ray
Here's a point where AI can be helpful. I asked ChatGPT to explain that sensor.
-- https://chatgpt.com/share/69ab0d32-ff78-8006-a160-f8fefae36147
Pretty simple: 9600 baud serial, sends 4-byte packets with sensor data. Note, though, that the device works at 5V so we would want to use a level shifter (FET + 2 resistors) or series resistor to limit the current into the P2 pin.
I couldn't find a standard datasheet, but I did find this:
-- https://manuals.plus/asin/B0DBST3BSS
Technically, you only need the TX output and ground from the DC01 sensor. What I would do -- and will when I get them (ordered from AliExpress) -- is setup a Spin cog that uses a smart pin in RX mode to monitor the device. When the header ($A5) shows up, grab the next three bytes, verify with the checksum and if good, write to a global variable. Operating in this manner means your main program only needs monitor that global variable (of course, this can later be moved to an object where than value is accessed using a standard method). I can knock this together in a few minutes if you already have the sensor and are willing to try it.
This seems to be a different kind of sensor specifically targeting particles. The BME860 will give you pressure, humidity, temperature, and VOCs -- seems like these two devices would be good together in an air quality monitoring system.