Skip to content

Conversation

@FabianSperrle
Copy link
Contributor

  • 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

@FabianSperrle
Copy link
Contributor Author

In case this is well-received: would you also want flowrate (and weight) published via MQTT?

@LoQue90
Copy link
Member

LoQue90 commented Jan 6, 2024

I'm not into the scale, need the space to the portafilter for the cup, so I can't judge any scale related features.
But until now, anything that we measure or adjust is published to MQTT and is modified if possible through MQTT.
So I would say, go for. :)

@FabianSperrle
Copy link
Contributor Author

I'm not into the scale, need the space to the portafilter for the cup, so I can't judge any scale related features. But until now, anything that we measure or adjust is published to MQTT and is modified if possible through MQTT. So I would say, go for. :)

Until I buy a bottomless portafilter I just screwed off the spout to gain some space, otherwise it would be painful, yes...

Comment on lines -83 to -195
weightBrew = weight - weightPreBrew;

Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

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.

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
Copy link
Contributor Author

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?

@FabianSperrle FabianSperrle force-pushed the flowrate-by-weight branch 2 times, most recently from 78685fe to f2aa129 Compare January 21, 2024 18:35
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
@FabianSperrle
Copy link
Contributor Author

Superseded by #450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants