I am using the HSTS016, range 100A, I am trying to calibrate it using an ESP32 in order to measure DC current, the problem is whatever I do to make it work it gives me values like literally non sense. Another thing, I cannot exactly understand the role of the Vref pin, like trying to find something useful in the datasheet but I find nothing.
Please, if anyone worked with it before, tell me.
I see you have tagged your question Iotawatt. Do you mean you want to use the current transformer with an Iotawart? Unfortunately, very few people here know anything about this device. I suggest you try asking at https://community.iotawatt.com
[Edit]
I’d found a data sheet that described the Hall effect device as a current transformer - hence @Imenn’s note to that effect.
I see what went wrong. Google returned the wrong data sheet and called it a current transformer. It is not.
Now I see also what you mean by Vref - it is not the ESP32’s pin, You connect a stable and accurate 5 V power supply between 5V and GND, and the output will be at 2.5 V ± 0.625 V 15 mV with no current flowing. You will need to measure, but I think Vref will be at the same d.c. voltage, that is, you can use Vref and the output to feed into a differential amplifier, to remove the effect of the ± 0.625 V 15 mV error. If this does not appear to be the case, leave it not connected.
Just a nit, but the ±625 mV is the output, not the error. The V_REF pin can be used to subtract out the ~2.5 V bias correctly, which you have alluded to in the past. As is typical, the datasheet is terrible but the reference pin is described across a few implementations.