Connecting a ZPH01 Dust Sensor to Python

I've just noticed that one of the wires came of the connector while I was taking the photograph. Oh well.

Anyhoo, some time back I got a dust particle sensor to play with. Air quality is a big thing, but one that we don't have much information about at the moment. An air quality measurement device is also a perfect application for LoRa. Sensors can gather data and then send summaries over the network. As part of ConnectedHumber initiative (of which much more later) we're designing an air quality sensor with the intention of deploying some city wide.

As a start I've connected the sensor to my PC and written a little Python script that gets the readings from it. You can find the script on GitHub here, in the unlikely event that you've got a sensor just like mine.

To connect the sensor to my PC I just used a standard USB to serial adaptor, the kind of thing you use to program Arduino Pro-Mini devices. I connected all the signal pins, and also took the mode pin to ground, so that the sensor will output serial data rather than pulses. 

The sensor works fine, although I've no real idea what any of the numbers mean at the moment. The next step is to get one into a case with a Wemos or LoRa device connected to it.