This is modified version of Valentin's scale to fit on my Breville Dual Boiler espresso machine.
An ESP32-based Feather board is used in place of the ESP32 Thing of the original. This board from EzSBC.com vastly reduces the original Adafruit Feather's high deepsleep current draw of 160mA (IIRC) down to 10uA.
The power switch is removed to free up space in the scale body, using the ESP32 deepsleep mode instead to preserve battery life. Both buttons on the front panel activate tactile switches mounted in the body. Holding the left button down > 1sec puts the ESP32 into deepsleep. Both buttons use internal pull-up/down resistors in the ESP32, so no extra components are required.
A 18650 LiPo cell (or equivalent 4.2V LiPo battery) is used to power the scale and recharged by the Feather's onboard charging circuitry.
The original scale's MicroPython firmware required a few changes to handle the new button and deepsleep/wake actions. In addition, the Feather handles reading the battery voltage differently, so another code changes covers that, and as a bonus the voltage divider resistors are not required.
The load cell is attached to the scale platform with heat-set nuts. I use them for almost every project as they provide superior holding power for fasteners. They are optional however.
All the module circuit boards are attached using M2.6 x 4mm plastic self tapping screws. These are also optional of course, you can use hot glue if you wish. I like using plastic self-tappers on my 3D printed projects.
Ensure the buttons slide freely in the front case. Use sandpaper wrapped around a pencil (or something similar) to open them up if needed.
If you find that the scale battery doesn't last long enough, there is a second version of the base (esp32_scale_base_18650) which has a built-in 18650 cell holder for convenience. This is intended to be used with commonly available 16mmx18.5mm spring terminals.
The MicroPython firmware modified from the original code specifically for the hardware specified below can be downloaded from https://github.com/Nkawu/coffee-scale-firmware.
Follow the Wiki at https://github.com/Nkawu/coffee-scale-firmware/wiki for help to prepare the ESP32 board, install the firmware and calibrate the scale.
The author remixed this model.