Giter Club home page Giter Club logo

almost-decent-scale's Introduction

Almost decent scale

Work in progress, a clone of decent scale for home use

BOM:

  • ESP32 or esp32-s3-mini
  • HX711
  • Load cell (either 500g or 750g) - take care of screw location / orientation, this will affect your enclosure choice.
  • some M3 flathead and countersunk screws you probably have lying around
  • M3 threaded inserts if you're going with the 500g design.

Designs / Enclosures

Currently, two enclosure designs are available in this repo. A build for esp32-s3-mini and a build for esp32, provided by @randomcoffeesnob. The design for esp32-s3-mini is still under active development, while the esp32 and 500g load cell is ready to go!

Pick the one you want, based on the equipment you have. But be wary, esp32-s3-mini design is really not finished yet!

Calibrating over Bluetooth:

The scale supports calibrating over bluetooth. To calibrate the scale, send the 0x03F1 command to 36F5 which will activate the calibration mode.

Once in calibration, the process is the same as when calibrating over Serial port.

  • remove all weights and wait for the scale to tare (7 seconds)
  • add a known weight
  • read the value from the control characteristic 36F5, I copy the value into calculator on macOS, use byteflip and change to decimal representation.
  • calculate the factor: (units_read_from_char / known_weight)
  • write 0x03F2XXXXXXXX to 36F5 where XX is the uint32(hex) representation of the factor multiplied by 1000 (i.e. 0x03F20000073A for factor 1.85). Make sure to pad the value with any leading zeroes you need.
  • scale should be calibrated now

TODO:

  • conform to DE scale BT protocol (tare, led, version, etc) ✔️ looks ok
  • Add own thread logic
  • Calibration over BT ✔️
  • DE1 tare command handling ✔️
  • esp32-s3 target ✔️
  • (maybe) web server
  • esp32-s2 mini target <- cancelled, only has wifi, maybe one day s3-mini
  • esp32-s3-mini ✔️

Use platformio.ini to define pins for your setup. Also if you want to use fake BT for some reason, add -D BT_COMMS_FAKE, otherwise use -D BT_COMMS_NIMBLE.

Additionally, I had to slow down my esp32s3 devboard - use -D ESP32S3_SLOWDOWN to reduce clock speed to 80MHz.

almost-decent-scale's People

Contributors

tadelv avatar

Stargazers

Rouben avatar  avatar Miha Filej avatar Yannick avatar

Watchers

Miha Filej avatar  avatar Yannick avatar

Forkers

pbrena

almost-decent-scale's Issues

lolin32_lite

I'm a beginner and I want to use the WEMOS LOLIN32 Lite board. Can you give me some advice? I've been trying to use the platformio.ini file all day and it keeps giving me the following error:

[env]
platform = espressif32
test_framework = googletest

[env:native]
platform = native
lib_deps =
HX711
h2zero/NimBLE-Arduino@^1.4.1

[scale-core]
framework = arduino
; board = esp32-s3-devkitm-1
lib_deps =
HX711
h2zero/NimBLE-Arduino@^1.4.1
build_flags =
-std=c++2a
; -D LV_CONF_PATH="${PROJECT_DIR}/include/lv_conf.h"

[env:elolin32_lite]
extends = scale-core
board = lolin32_lite
monitor_speed = 115200
build_flags =
${scale-core.build_flags}
-D LOADCELL_DOUT_PIN=17
-D LOADCELL_SCK_PIN=18

[env:esp32-s3-mini]
extends = scale-core
board = lolin_s3_mini
monitor_speed = 115200
monitor_filters = send_on_enter
monitor_eol = LF
build_flags =
${scale-core.build_flags}
-DARDUINO_USB_CDC_ON_BOOT
-DBOARD_HAS_PSRAM
-DCORE_DEBUG_LEVEL=3
-D LOADCELL_DOUT_PIN=8
-D LOADCELL_SCK_PIN=6
-D BT_COMMS_NIMBLE
-D DEBUG_SERIAL=Serial
-D LOGSerial=Serial

show error
Environment Status Duration


native FAILED 00:00:00.701
elolin32_lite FAILED 00:00:05.565
esp32-s3-mini SUCCESS 00:00:25.366

src/main.cpp:15:3: error: 'LOGSerial' was not declared in this scope
src/main.cpp:25:3: error: 'LOGSerial' was not declared in this scope
src/main.cpp:48:7: error: 'LOGSerial' was not declared in this scope
*** [.pio\build\elolin32_lite\src\main.cpp.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.