JTK – Notes and Ramblings Things we have found …

6/22/2020

Dust – adding the SDS011

Filed under: General,Home Automation — taing @ 11:23 am

A SDS011 dust sensor(datasheet and communications protocol) from Amazon has been added to openhab. There is lots of good info online describing the sensor performance and Arduino(1, 2), ESP32(1, 2) and Raspberry Pi(1, 2, 3, 4, 5) setup. There is even PC based software for testing.

Nettigo has a interesting article on using the sensor with a heater inline to improve performance in high humidity. They use a Sensirion SHT30 to automatically drive a MOSFET to trigger a PTC Heating element.

One of the nice things about the package as purchased is it comes with connectors and an USB/serial adapter to allow for connections using USB, TTL serial or i2c.

In the end, it was simplest to use the brand new Openhab plugin binding. The binding reports both 2.5 and 10 µg/m³. The binding allows for easy setup of reporting mode allowing the sensor to pretty much manage itself. For reporting mode, a reporting interval is set. The unit will wake up every interval and measure for 30 seconds then sleep for interval minus 30 seconds.

Since plugging the sensor directly into the openhab server in the basement wasn’t going to be very useful a modified version of the same method used to remote the Z-Wave dongle was used. This required installing ser2net on the Pi with the sensor and setting the correct comm parameters(9600 8N1) and making copies of /etc/default/socat.conf(updated with the proper device name and IP address of the Pi with the sensor) and /etc/init.d/socat (updated to point to unique .log and .pid files and the new .conf file).

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress