Skip to content
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

Add safety guard against error-prone sensor data #8

Open
mwood77 opened this issue Jan 12, 2022 · 1 comment
Open

Add safety guard against error-prone sensor data #8

mwood77 opened this issue Jan 12, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mwood77
Copy link
Owner

mwood77 commented Jan 12, 2022

Cheap pressure sensors are prone to throwing trash data (they get shorted-out easily). We need to programmatically guard against this by setting duty cycle to 0% if this goes above a certain threshold.

Possible solution considerations:

  • Verify the mV reading against group head temperature?
  • Verify against total uptime & group head temperature
  • check span between last (n)number of readings and current. If span is greater than (n), cut power?
@mwood77 mwood77 changed the title Add safety guard against sensor errors Add safety guard against error-prone sensor data Jan 13, 2022
@mwood77 mwood77 self-assigned this Jan 13, 2022
@mwood77 mwood77 added the enhancement New feature or request label Jan 13, 2022
@mwood77 mwood77 added this to the v1.2.0 milestone Jan 13, 2022
@mwood77 mwood77 removed their assignment Jan 13, 2022
@mwood77 mwood77 self-assigned this Jan 14, 2022
mwood77 added a commit that referenced this issue Jan 14, 2022
… relay shut off override to control functions
mwood77 added a commit that referenced this issue Jan 14, 2022
@mwood77
Copy link
Owner Author

mwood77 commented Jan 15, 2022

Current solution under test:

  1. On boot, set constant INIT_TEMPERATURE as group head's current temp.
  2. Compare previous pressure sensor input to current pressure sensor input (pressure in BAR)
  3. If value difference is greater than 2.0, increment ERROR_COUNT (init @ 0).
  4. If ERROR_COUNT is greater than or equal to 20 && current group head temperature is greater than INIT_TEMPERATURE + 10, set fail condition and shut off relay (turn off power).

INIT_TEMPERATURE + 10 is needed, as known good pressure sensors throw a large amount of unreliable data during initial power up/heating; it takes some time for the sensor to stabilize during the first 5 minutes of operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant