Page 2 of 2

Re: Experimenting with the HX711

Posted: Thu Mar 30, 2023 2:40 pm
by BeanieBots
Hi Oli,
I'm a little confused by your two posts.
You say you are making an energy measuring device and ask about the HX711.
The HX711 is for measuring weight.

Your program listing is for BascomAVR but you do not ask a specific question.
If you would like help to convert it to Annex BASIC we can help but you will need to explain what it needs to do.

A few things to help you on your way.
In ANNEX BASIC, you do not need to DIM all your variable.
Only two types are supported. String and Float.
Simply assign a value.
eg. N=10 N$="Ten"

ANNEX BASIC does not support 'ports' for IO. You need to address each IO pin individually.
Have a browse though the help files for examples but please do not hesitate to ask questions if you are not sure.

Re: Experimenting with the HX711

Posted: Fri Mar 31, 2023 1:45 pm
by Oli
The IC is 2 very precise ad converter INA and INB, they are no matter what they measure, weight or where the analog input comes from.
You don't need to use the power supply function.
There are 2 normal different operations amplifier inputs. The IC is perfect for shunt measurements.
In Bascom I only tested how exactly they are and which bit only comes with noise. 17-18 bit goes great, Direction 24Bit is "rnd".
Your command: RET = AH711 (Data_Pin, CLK_PIN [, resolution])
0 -> Input a gain 128 (default)
1 -> input a gain 64
2 -> Input B Gain 32
It's perfect, only for the ESP8266
I would like to measure energy in AH from LIFEPO4 with measuring shunt current over 20a,
but also 1 lithium cell with 500mA measuring range. Volt at 0.01V exactly at 4V, but up to 50V should also be possible.

The measurements are to be placed in diagrams later, and as CSV, I am considering sending them via UDP to Abacom Profilab on the PC, or on the ESP web interface, but that still seems too difficult for my annex knowledge.

Re: Experimenting with the HX711

Posted: Fri Mar 31, 2023 5:29 pm
by BeanieBots
OK, now I understand what you are trying to do.
It should not be too difficult to acheive what you want with ANNEX BASIC.
I do not have a HX711 to play with myself, so I can't help with details.
Start with something simple.
Just read the two inputs and output to wlog.
Then have a read through some of the example files which will guide you through how to present the data to a web page or TFT display.

Re: Experimenting with the HX711

Posted: Fri Mar 31, 2023 9:59 pm
by Oli
I have hope you find a way to bring it to the ESP8266
You were successful on the ESP32
I can test it

I only bought 10 pieces of ESP32, unfortunately work with Annex only 1m wifi range, no idea why.
But I like to use ready -made devices gousund sonoff etc, 99% the ESP8266 with 1MB,

Re: Experimenting with the HX711

Posted: Sat Apr 01, 2023 6:37 pm
by BeanieBots
Maybe cicciocb will add support to the 8266 if there is enough interest.
Meanwile, hopefully somebody smarter than me might be able to help you out with some code that can read the HX711 using direct I2C commands.
It should be quite possible to do it that way. Perhaps a good read of the data sheet will give some pointers.

Re: Experimenting with the HX711

Posted: Sun Apr 02, 2023 10:06 am
by PeterN
[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Mar 31, 2023 9:59 pm ...
I only bought 10 pieces of ESP32, unfortunately work with Annex only 1m wifi range, no idea why.
...
Might be worth a test to set the wifi power explicitly up to 20 (?)

[Local Link Removed for Guests]

Re: Experimenting with the HX711

Posted: Thu Mar 28, 2024 7:59 pm
by MarioL
Hi all
Has anyone used the command ret = AH711(data_pin, clk_pin) to read from the "HX710B Air Pressure Sensor Module"?
It seems that the clock source and output data format is same.
I would like to experiment the measurement of liquid in a tank using "HX710B Air Pressure Sensor Module".
thanks

salve,
Qualcuno ha usato il comando ret = AH711(data_pin, clk_pin) per leggere dal "HX710B Air Pressure Sensor Module" ?
Sembra che la modalità di clock ed i formati dei dati in uscita siano uguali.
Vorrei sperimentare la misurazione di liquido in una cisterna usando il sensore di pressione HX710B.
grazie