| If you just want a sensor that will give your computer raw data that you can then further process, a pretty simple approach is a Sensirion SPS30. Sparkfun has them [1]. You can hook it to a USB port via a serial/USB adaptor, such as this FTDI cable from Sparkfun [2]. The male pins on the cable from the SPS30 will plug right into the female sockets on the FTDI cable. There's sample code provided that easily builds on Unix and Unix-like systems (you'll just need to change one line to tell it the device name of the serial port). That code will poll the sensor and give regular readings, and also (assuming you keep it running long enough) do the periodic cleaning cycle of the sensor. The SPS30 also has an I2C interface, although it is not as capable as the UART interface (it only provides mass concentration data, not number concentration data). Sparkfun also caries a similar sensor from Honeywell [3], but I don't see any links to sample code or drivers, and the datasheet they link to does not have a lot of detail on the protocol. Note: Sparkfun has several FTDI cables. The one I've linked to has 5 V power, 3.3 V signals. They also have one that is 5 V power and signals. The SPS30 is 5 V power 3.3 V signals, but is 5 V tolerant on the signals so the 5 V power and signals FTDI cable should also work without frying the SPS30. Going the other way, in general, a 3.3 V serial device can send to a 5 V serial device with no problem unless the cable is really long because the lowest voltage the 3.3 V will output for a high output is still above the lowest voltage the 5 V side accepts as a high. So the 3.3 V SPS30 signal should also work with the 5 V FTDI cable. But I recommend the 5 V power 3.3 V signal cable in general. You can use it with both 3.3 V and 5 V signal systems with no problem. With the 5 V signal cable you have to be careful to not use it with 3.3 V systems unless they are 5 V tolerant. An example of a 3.3 V system that is not tolerant is Raspberry Pi. [1] https://www.sparkfun.com/products/15103 [2] https://www.sparkfun.com/products/9717 [3] https://www.sparkfun.com/products/14959 |