arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.29k stars 4.82k forks source link

Increase HX711 resolution #4839

Closed nicolasbisi closed 5 years ago

nicolasbisi commented 5 years ago

Have you look for this feature in other issues and in the wiki? Yes

Is your feature request related to a problem? Please describe. Maybe, not sure. I'm only getting integer values.

Describe the solution you'd like Maybe having a Sensor34 7 that switches between Kg and g. Or just add Kg with more resolution (x,xx instead of integer only)

Cheers

arendst commented 5 years ago

Look in wiki for command weightres

nicolasbisi commented 5 years ago

Ah. Nice. Thanks, @arendst.

pico563 commented 5 years ago

@arendst thank you for all your great work I spent a hole day trying to find how to change the resolution ; unfortunately there is no Wiki for HX711. I changed in the sketch to get it work as gram (i removed the / 1000) finally I found this command "weightres" I still don't understand Item weight (kg) is used for. please add a wiki for HX711 thanks

meingraham commented 5 years ago

@pico563 Arggh! WeightRes was missing from the wiki. That was the missing piece I was hoping for. I added the WeightRes command to the wiki.

The whole topic of how to best document supported sensors is being discussed. When this portion of the wiki is restructured, we will look at all the supported sensors, out of date sensors, future sensors, etc.

Thanks for being persistent.

Mike

pico563 commented 5 years ago

hi @meingraham I found it after our last night discussion (zee) thanks

pico563 commented 5 years ago

@meingraham @ascillato2 I still don't understand Item weight (kg) is used for.

pico563 commented 5 years ago

Screenshot_20190511-150149

pico563 commented 5 years ago

@meingraham @ascillato2

about sensor34 6 it shows item weight in grams and not in decigrams. pls. check

`6`  = show single item weight in decigram
|`6 <value>`  = set single item weight in decigrams. Once the item weight is set, when items are added to the scale, the telemetry message will report the number of items.
23:00:01 CMD: Sensor34  6
23:00:01 RSL: RESULT = {"Sensor34":{"WeightRef":250,"WeightCal":261,"WeightMax":10000,"WeightItem":250.0}}

23:00:03 RSL: SENSOR = {"Time":"2019-05-16T23:00:03","HX711":{"Weight":1.534,"Count":6}}
meingraham commented 5 years ago

It appears that you set the weight per item to be 250. Is the reported Weight in grams or Kilograms? If it's Kilograms, then I agree, the item weight setting is grams. Please confirm that the weight on your scale was 1.5 Kg.

pico563 commented 5 years ago

confirmed .

meingraham commented 5 years ago

Wiki updated.

dexterbot80 commented 3 months ago

Look in wiki for command weightres

Hello @arendst, hello @meingraham Where is located that wiki page? I want to learn how to display the weight in grams. Thank you

sfromis commented 3 months ago

The unit is always kilograms, but using the command WeightRes, you can set a precision of 3 decimals for grams.

dexterbot80 commented 3 months ago

The unit is always kilograms, but using the command WeightRes, you can set a precision of 3 decimals for grams.

Thank you @sfromis, They work on esp32 to? I have ESP32-POE from OLIMEX

sfromis commented 3 months ago

In general, you can expect things working with Tasmota for ESP8266 to also work with ESP32, but with Mr. Murphy not being "very predictable", I'm nok making absolute claims :wink:

dexterbot80 commented 3 months ago

In general, you can expect things working with Tasmota for ESP8266 to also work with ESP32, but with Mr. Murphy not being "very predictable", I'm nok making absolute claims 😉

Hello, It works with ESP32 but i have one Chinese weighing machine that have bluetooth connection with the screen. They use an Chinese IC chip that have I2C connection to - 3.3V SDA SCL GND pins available on the board. It will be great if we manage to connect TASMOTA to this and make-it MQTT compatible. https://github.com/arendst/Tasmota/discussions/22053

sfromis commented 3 months ago

You already have another thread about that unrelated question.

dexterbot80 commented 3 months ago

You already have another thread about that unrelated question.

Yeah, Maybe we make-it .....:) I connected the 400KG weight cell to the HX711 and encountered a rather interesting problem. When I try to calibrate with a known weight, it displays a much higher weight. At a weight of 291 grams it displays 311 - 312 after calibration and at my weight of 76200 grams after calibration it displays 78800-78900 grams. I used two types of boards with HX711 powered by both 5V and 3.3V and they behave the same. I use the latest version of tasmota sensors from here and the pins for DT and SCK are D4 and D5 at ESP32. https://drive.google.com/file/d/1x6W5Ti-JRB2B0ZkFYq0HQ-kRuE4tvh-h/view?usp=sharing Has anyone encountered this problem?

Update: @sfromis @arendst @meingraham @ascillato2 I installed HX711 arduino library and i use Arduino Mega 2560 with HX Kitchen Scale from the examples and works well. Are you sure that the HX711 amplifier library is correctly implemented in TASMOTA?

dexterbot80 commented 3 months ago

Hello, @arendst, @meingraham Can someone tell me where I can find the full calibration process for the HX711? I kept trying but I can't calibrate the scale.

I designed this for Arduino and the calibration works, but I would like to be able to use Tasmota - programmers much more skilled than me worked here :) Thank you!!!!!!!!!!!!! sketch_sep2a.zip

dexterbot80 commented 3 months ago

Look in wiki for command weightres

Hello @arendst You kill me with this phrase :) Where is the wiki for HX711 located? I searched here but the HX711 does not have a dedicated page

Thank you

barbudor commented 3 months ago

All commands are on the Commands page https://tasmota.github.io/docs/Commands/

dexterbot80 commented 3 months ago

All commands are on the Commands page https://tasmota.github.io/docs/Commands/

Thank you @barbudor Now I found for Sensor34 I hope I can calibrate :) Thank again 1000 times :)

dexterbot80 commented 3 months ago

For small weights it seems to work with autocalibration but is not verry accurate... But if I later put large weights on the scale, the error is very large, several kilograms... For example, if I calibrate with a weight of 2000 grams, after calibration I measure 2070 - 2073 grams. And then if I get on the scale with 75200 grams, the scale displays 79680 - 79683 and it annoys me because I'm not even like a bear :) Calibrated scale value can only be an integer? I tried to enter 11.4 or 11.4, but the saved value remains fixed at 11... If i set calibrated scale value at 1139 i get 0.752 and if i multiply by 100 i get exactly my weight 75.2 KG. Can someone give me an idea how to properly calibrate the scale for a weight up to a maximum of 100KG?

HX711 load cell sensor calibration. Note that without setting WeightRes the default resolution is to the nearest 1kg. Set WeightRes 3 to read fractions of a kilogram. This applies to the JSON payload too. 1 = reset display to 0 2 = start calibration 2 = set reference weight in grams and start calibration 3 = show reference weight in grams 3 = set reference weight in grams 4 = show calibrated scale value 4 = set calibrated scale value 5 = show max weight in gram 5 = set max weight in grams 6 = show single item weight in grams 6 = set single item weight in grams. Once the item weight is set, when items are added to the scale, the telemetry message will report Count as the number of items on the scale 7 = save current weight to be used as start weight on restart (deprecated since v11.0.0.7) 8 0/1  0 = disable JSON message on weight change over 4 grams  1 = enable JSON message on weight change (see below) 9 = set minimum delta to trigger JSON message (see above).  0 = 4 grams (old default)  1..100 = set delta to 0-99 grams  101-255 = set delta to 110-1650 grams (10g increments)

image image

Thank you