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

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

  RSS

carboncycle
(@carboncycle)
Eminent Member
Joined: 8 months ago
Posts: 20
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: 271
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)
Eminent Member
Joined: 8 months ago
Posts: 20
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: 271
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
carboncycle
(@carboncycle)
Eminent Member
Joined: 8 months ago
Posts: 20
July 22, 2020 9:24 pm  

Hello Kyle,

Seems you've been busy, as usual. 😀 

I have stocked the MHZ-19B in the Tindie Store but I'm having a problem with the USB adapters I obtained.  They seem to be a correct board - but they don't show up as a device and rather than getting a solid PWR indicator - an LED flashes three times.

I suspect a wrong component or counterfeit.  The boards have "HW" and "hw-199" on the back.  The boards I've used previously had no markings.  I can drop images of the board to warn off others, I'm still working with the Ebay vendor on how to resolve that problem.

I was trying to figure out an alternative and the cheapest idea I could come up with was an 8266 module that sends via MQTT.  The 3.3v serial port levels are the major problem to solve I think. Calibration would have to be implemented.

 

BR


ReplyQuote
carboncycle
(@carboncycle)
Eminent Member
Joined: 8 months ago
Posts: 20
July 22, 2020 9:31 pm  

I forgot to mention - I've been thinking about the ZH03B problem and I'm wondering if I need to look at checking the CRC - the device IIRC appends a CRC that I didn't bother to check.   I've been de-decaffeinating the last few weeks and that seems to be helping with thinking this over.


ReplyQuote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 5 years ago
Posts: 271
July 22, 2020 9:47 pm  

Yes, Mycodo has stayed my busiest project! In fact, I just released 8.6.0 less than an hour ago, which has a lot of new features and bug fixes.

That's good to hear, about getting the sensors in stock. I updated the link on the build materials list. That's unfortunate about the communication boards, though. I hope it gets resolved without too much issue.

I recall having the thought about the CRC, but haven't looked into it more than that. It would be nice to incorporate its use. De-decaffeinating has got me though quite a many problem-solving sessions myself.

Mycodo Developer


ReplyQuote