I’ve written before about what particulate matter sensors are and how they work. Many of these sensors come with a tiny 8-pin connector. With some luck, you even find an English data sheet. But you might just end up with a Chinese one. It might look like this:
Luckily, most signals have english names:
Ok, that’s all we need to know to connect this thing to a PC. You can see that the supply voltage is 5V and the I/O voltage is 3.3V. That’s perfect for most use cases. You also see that there is some kind of serial interface RX/TX and a SET and RESET input.
What do you need? The only thing you need is a USB to Serial (TTL) adapter. The come in different variants and might look like this:
Before buying check 2 things: The adapter should offer 5V AND 3.3V power outputs (for this project we only need 5V, but you might need the 3.3V for other projects) and have a DTR output (we will use this to turn the sensor on and off).
Now connect the sensor to the adapter as follows:
Note that the pin numbers are for the specific sensor shown above. Check the data sheet of your sensor, the pins might be different!
Why isn’t RX not connected? All the dust sensors I’ve seen do not use this signal at all. If it isn’t used, there is no need to connect it (but you can do if you like).
Finally this will look like this:
You can now connect this to you PC or Mac and read data from the sensor. We will show in another article how to do this.