-
-
Notifications
You must be signed in to change notification settings - Fork 170
Add "flow rate" calculation by measuring what arrives in the cup #437
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 "flow rate" calculation by measuring what arrives in the cup #437
Conversation
FabianSperrle
commented
Jan 6, 2024
- determine weight in the cup whenever we get a new weight measurement, divide by time since last measurement to get flow rate into the cup
- added a sliding window average over the last 10 measurements to get smoother output
- adjusted display template to show flow rate
|
In case this is well-received: would you also want flowrate (and weight) published via MQTT? |
|
I'm not into the scale, need the space to the portafilter for the cup, so I can't judge any scale related features. |
Until I buy a bottomless portafilter I just screwed off the spout to gain some space, otherwise it would be painful, yes... |
| weightBrew = weight - weightPreBrew; | ||
|
|
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.
I don't know why this was here before -- the weight is already calculated in brewvoid.h, why do it again here?
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.
Half done refactoring and moving stuff out of main?
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.
Unless somebody remebers/knows why it should be here I think removing it here is good. Now that I looked at it again I would guess that the entire shottimerscale() could be removed.
src/brewscaleini.h
Outdated
| float scaleDelayValue = 2.5; // value in gramm that takes still flows onto the scale after brew is stopped | ||
| bool scaleFailure = false; | ||
| const unsigned long intervalWeight = 200; // weight scale | ||
| const unsigned long intervalWeight = 50; // weight scale |
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.
Increased the scale frequency -- why was it so low before?
Potentially there could be a further change to only read the scale during shots to save some CPU cycles when idling?
78685fe to
f2aa129
Compare
Switch to EMA smoothing Finalization: Lower EMA a to 0.05 for stable readings, increase scale frequency to get high resolution, and prevent shot weights <0g
f2aa129 to
5f281e4
Compare
|
Superseded by #450 |