ZH-03B particle sen...
 
Notifications
Clear all

[Solved] ZH-03B particle sensor sample anomalies - spikes in sample data  

  RSS

carboncycle
(@carboncycle)
Active Member
Joined: 6 months ago
Posts: 13
December 19, 2019 11:37 pm  

I've run a few of these sensors in Mycodo and I've noticed spikes in the graphs.   These are indoor and I have a HEPA filter running constantly.   When I have run the sensor under conditions of moderate pollution ( the mountains nearby are on fire ) I haven't noticed this as much - however under light conditions I see this problem more often.


Quote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 5 years ago
Posts: 199
January 8, 2020 4:24 pm  

I'm going to see if I can add some software detection/removal of these anomalies, since they can cause all sorts of issues with conditionals/triggers that rely on the measurement data to perform actions.

Mycodo Developer


ReplyQuote
carboncycle
(@carboncycle)
Active Member
Joined: 6 months ago
Posts: 13
January 8, 2020 11:56 pm  

Thanks Kyle!  That was my concern as well - I had wondered why those folks that designed the PurpleAir gizmo used 2 of these.  At first I thought it may be a sensor failure consideration but it could be due to these random spikes.   The sensor is otherwise pretty good when there is something to sense.  The housing solution they came up with is a pretty good idea and easy to replicate.


ReplyQuote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 5 years ago
Posts: 199
April 10, 2020 8:06 pm  

I just updated the winsen_zh03b.py input module (available in the next release) with a new option to specify the number of measurements to acquire. If any measurements are above 1000, they are discarded. If more than 1 measurement (for each particle size) remain after measuring and discarding, the stored value will be an average of the remaining measurements. I also added a 100 ms sleep between measurements that has improved reliability of multiple successive measurements. I set the default to 3 measurements and it seems to be working great so far. 2 measurements would likely work well but I wanted to ensure the highest likelihood of success without too many excessive measurements.

Mycodo Developer


ReplyQuote