-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of Winsum ZH03B sensor Dust particle sensor in xsns_18_pms5003.ino #19850
Conversation
The Winsum ZH03B sensor is quite similar to the Plantower PMS3003 sensor. The main difference is the response in passive mode. With these changes xsns_18_pms5003.ino can support the ZH03B sensor when PMS_MODEL_ZH03X is defined in the configuration file.
@@ -239,6 +319,7 @@ void PmsSecond(void) // Every second | |||
Pms.valid--; | |||
if (Settings->pms_wake_interval >= MIN_INTERVAL_PERIOD) { | |||
PmsSendCmd(CMD_READ_DATA); | |||
AddLog(LOG_LEVEL_DEBUG_MORE, "ZH03x: Read command issued (2)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -217,20 +283,34 @@ void PmsSecond(void) // Every second | |||
// wakeup sensor WARMUP_PERIOD before read interval | |||
Pms.wake_mode = 1; | |||
PmsSendCmd(CMD_WAKEUP); | |||
AddLog(LOG_LEVEL_DEBUG_MORE, "ZH03x: Wake up command issued"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
if (Pms.time >= Settings->pms_wake_interval) { | ||
// sensor is awake and warmed up, set up for reading | ||
PmsSendCmd(CMD_READ_DATA); | ||
AddLog(LOG_LEVEL_DEBUG_MORE, "ZH03x: Read command issued (1)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -171,6 +184,59 @@ bool PmsReadData(void) | |||
return true; | |||
} | |||
|
|||
bool ZH03ReadDataPassive() // process the passive mode response of the ZH03x sensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Place this function within #ifdef PMS_MODEL_ZH03X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -27,6 +27,8 @@ | |||
* You can either support PMS3003 or PMS5003-7003 at one time. To enable the PMS3003 support | |||
* you must enable the define PMS_MODEL_PMS3003 on your configuration file. | |||
* For PMSx003T models that report temperature and humidity define PMS_MODEL_PMS5003T | |||
* This module can also support de Winsum ZH03x series of dust particle sensors, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's Winsen
. Not Winsum, places in the Netherlands (yes there are more than one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, Thank you for the comments.
Thx. |
* Rectified Typos (arendst#19841) * Rectified Typos * Update settings.json * Support of Winsum ZH03B sensor Dust particle sensor in xsns_18_pms5003.ino (arendst#19850) * Update xsns_18_pms5003.ino The Winsum ZH03B sensor is quite similar to the Plantower PMS3003 sensor. The main difference is the response in passive mode. With these changes xsns_18_pms5003.ino can support the ZH03B sensor when PMS_MODEL_ZH03X is defined in the configuration file. * Update xsns_18_pms5003.ino * Update change logs * Update be_lexer.c (arendst#19856) Added check for unterminated block comments * Refactoring of storing safeboot bin (arendst#19858) * Folder for storing safeboot is now configurable * Platform 2023.10.06 * Platform 2023.10.12 --------- Co-authored-by: Dellucifer <[email protected]> Co-authored-by: FransOv <[email protected]> Co-authored-by: Theo Arends <[email protected]> Co-authored-by: Andreas Ziemer <[email protected]>
Support of Winsen ZH03B Dust particle sensor in xsns_18_pms5003.ino
Description:
The Winsen ZH03B sensor is quite similar to the Plantower PMS3003 sensor. The main difference is the response in passive mode. With these changes xsns_18_pms5003.ino can support the ZH03B sensor when PMS_MODEL_ZH03X is defined in the configuration file.
Related issue (if applicable): fixes #
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass