mortenfyhn / coffee-scales Goto Github PK
View Code? Open in Web Editor NEW⚖️ Scales for brewing coffee ☕
License: GNU General Public License v3.0
⚖️ Scales for brewing coffee ☕
License: GNU General Public License v3.0
For adafruit feather with battery
The weight reading is very unstable.
Stupid and pointless but fun: Estimate the bias based on something like "if rate of change is very low assume it should be zero"
Adafruit feathers seem nice because they have the charging circuit integrated:
I'll just use a photoresistor. Keep it simple. With the random ldr I have, I measure approx
So it seems that with a circuit like [3v3]---[ldr]---[Vmeas]---[10K]---[gnd]
and the ldr I have, a good starting point is: max brightness above Vmeas = 2.44 V (500 raw analog with Vref = 5v)
and minimum brightness below Vmeas = 0.73 V (150 raw analog)
.
Using https://platformio.org/lib/show/6582/SevenSegmentTM1637 now, but I think https://platformio.org/lib/show/258/TM1637 is better. It's certainly smaller.
Seems to happen after it's been used with a particularly heavy item. The weight starts to alternate between 1156 and 1565 at something like 3 Hz. The timer still runs fine.
The old display modules are too big. Gonna develop new ones that
Maybe it's better if I always set the hysteresis limits to the threshold between two values (say if value is around 0.1, then thresholds are 0.05 to 0.15, and so on).
Should be possible to make it "prepare for tare" so that when hitting the tare button the reaction is immediate. Consider ideas from #15, too.
It feels better somehow. Removes the need for non-const globals.
Maybe a macro to toggle it. Should output valid csv to serial.
When I do a read call, does it block?
Displays 0.0 instead of 1.0 grams.
Clang tidy probably.
😢
Stopped working after March 17.
Here's the last good build: https://github.com/mortenfyhn/coffee-scales/actions/runs/659453634
And the first bad build: https://github.com/mortenfyhn/coffee-scales/actions/runs/662921725
Which seems to indicate that v5.1.1 broke my build: https://github.com/platformio/platformio-core/releases/tag/v5.1.1
Update: Yep, v5.1.0 works fine.
I'm guessing it's caused by platformio/platformio-core@7c271c8
The current taring just reads a raw value n times and sets the offset equal to the average of the readings. What if I instead take a single reading and set the offset repeatedly until for instance the change in offset is very small. Then taring a) might go faster and b) won't fail if it happens while the applied weight changes.
Gotta decide what to include and what to skip.
Probably the easiest issue yet
Should run at midnight
The measurement sometimes jitters between adjacent tenth of gram values. Need better measurement filtering to avoid this.
A good opportunity to try out doctest
Often ends up at something like -0.2 grams after taring. Should fix it so it hits 0.0.
Use the logged data I have.
Spec / goal:
Maybe bias estimation? In the log data, after finishing the pour, the data falls from 200.45 to 198.98 over approx 90 seconds. But maybe that's just evaporation!?
The scales cannot currently display negative numbers on the 7-segment display. Fix it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.