RobTillaart / HX711

Arduino library for HX711 24 bit ADC used for load cells and scales.
MIT License
88 stars 29 forks source link

add example for eeprom for esp32 #19

Closed Albalate closed 2 years ago

Albalate commented 2 years ago

Init proyect and use GND to pinout 2 for tare, and GND to 15 to enter calibrated mode

RobTillaart commented 2 years ago

This is an EEPROM example like HX_set_persistent.ino.

Primary goal of examples is to explain the library functions and so I am wondering what the difference / added value is of this example. I saw you extracted the calibrate code in a function.

Did not compare all the details but it looks more like an improvement or an upgrade of the existing example, not necessary a new example. What is the argument to make this an separate example?

Albalate commented 2 years ago

the HX_set_persistent.ino does not work with esp32 to read the eeprom. Today I will do tests with an industrial load cell to see if HX_delta_scale.ino does it correctly, I think it does not work. eeprom for esp32 need to initialize the eeprom in setup.

Albalate commented 2 years ago

tests performed: utilcell 30 KG load cell (https://www.utilcell.es/load-cell/300-model-load-cell/) hx711 esp32 result: +-150 units(gr)) ##################################### utilcell 30 KG load cell (https://www.utilcell.es/load-cell/300-model-load-cell/) hx711 arduino UNO R3 result: +-3 units(gr)) soft: // // FILE: HX_kitchen_scale.ino // AUTHOR: Rob Tillaart // PURPOSE: HX711 demo // URL: https://github.com/RobTillaart/HX711

RobTillaart commented 2 years ago

I see difference 3gr and 150 gr.

What voltage is applied to load cell? is it the same in both cases?

Albalate commented 2 years ago

voltage to hx711 is 5v in both cases (supply is stabilized with 2 output filters) more than a difference, I would say that it is a random measure in esp32

RobTillaart commented 2 years ago

Strange as the HX711 does the AD conversion and the communication to the processor is binary. Do you have a logic analyzer to capture the bits?

Albalate commented 2 years ago

I have the oscilloscope broken, it is due to the speed of the processor, with the library of "https://github.com/bogde/HX711" I get the same result in both hardware. +-4 gr whit scale off 30000gr When I have a while I'll help you find the error

RobTillaart commented 2 years ago

Mmm, difference between Bogdes lib and mine is using long versus float for the math. As the UNO with my lib gives the same results as Bogdes lib (within noise limits) the math is OK.

Can you print the raw values that are read from the HX711 by means of shiftin.

Line 75 or so in the .cpp file.

RobTillaart commented 2 years ago

30.000 grams loadcell. ~4gr is an accuracy of ~1 in 10.000 (quite good) What says the datasheet? Do you have a link?

Found datasheet 1 in 10.000 is the limit of the sensor so it won't get much better.

Albalate commented 2 years ago

in esp32 not work only work in arduino UNO When I finish the current work, I help you find the mistake, I understand that it may be mine

RobTillaart commented 2 years ago

When I finish the current work, I help you find the mistake, I understand that it may be mine

Any progress made?

RobTillaart commented 2 years ago

Any progress made? If not I better close this Pull Request

Albalate commented 2 years ago

no, I'm a little busy, when I return to the scale I reopen it if necessary Thank you

El jue, 2 jun 2022 a las 14:30, Rob Tillaart @.***>) escribió:

Any progress made? If not I better close this Pull Request

— Reply to this email directly, view it on GitHub https://github.com/RobTillaart/HX711/pull/19#issuecomment-1144807992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCSJ23ICIOOPU3FMSBPIATVNCSQFANCNFSM5RCACB5A . You are receiving this because you authored the thread.Message ID: @.***>

--

Saludos


Usemos todos un mismo idioma, el castellano sin "k" ni seudo abreviaturas, con uso moderado de mayúsculas y negritas y mostrando educación

Piensa en el planeta, si no es imprescindible no imprimas este mensaje. Gracias

REENVÍA EN CCO Y ELIMINA MI DIRECCIÓN