# HX711 on-chip analog supply regulator, my mistake or datasheet mistake?

Most HX711 boards use an external transistor to supply regulated power for the load cells, the voltage output (called VAVDD) is calculated using this formula from the datasheet: VAVDD = VBG*(R1+R2)/R1

Consulting this schematic from Sparkfun (image bellow) we can see that R1 = 20K and R2= 8.2K, given that VBG is 1.25v, the formula comes to 1.76V which is not the real output, the output is around 4.3V (my own board outputs 4.5V with R1= 4.7K and R2= 1.8K).

Am I missing something or is the formula mistyped and should read: VAVDD = VBG*(R1+R2)/R2?

Using the formula above you get the correct voltage output, also it can be derived using the 1.25V reference and the voltage divider:

1.25 = VAVDD * R2/(R1+R2) <=>

VAVDD = 1.25/(R2/(R1+R2)) <=>

VAVDD = 1.25 * (R1+R2)/R2

• What is the ideal output, for a given R1 and R2? Commented Jan 25, 2017 at 2:07
• @Umar , don't know if i understand your question, but the output should be configurable and at least 100mv under VCC to account for voltage drop on the transistor (from datasheet), to change the VCC from 5v to lets say 3.3V the formula given in the datasheet would yield the wrong voltage output. Commented Jan 25, 2017 at 2:55
• clear now. below answers should prove your findings valid. Commented Jan 25, 2017 at 3:03

The comments on the SparkFun page for this product talk about this. To quote Member #461211:

The formula for the output voltage AVDD appears wrong in the HX711 datasheet and the SparkFun schematic. I think it should be VAVDD = VBG*(R1+R2)/R2 … not R1 in the denominator. My derivation and measurements support this. I had to dig into this to use VSUP = DVDD = 3.3 V and change the 20 KΩ resistor to a 10 KΩ for a different load cell excitation voltage.

In short you are right, and not the first to observe this error. I encountered this myself not too long ago. Small world :).

• Oh thanks for that, I searched for this but forgot to check the product comments. Is it not weird that the manufacturer and a second board designer made the same error? A trap for anyone intending to use it at 3.3V (also my plan). I assume the AVDD would just try to go to VCC and then be subject to noise from the rest of the circuit. Commented Jan 25, 2017 at 2:31

Your mistake: Vbg gets dropped on R2, so the current through it is Vbg/R2. That same current flows through R1+R2 -> total output voltage is (R1+R2)/R2*Vbg.

• Thank you for the answer. You reached the same conclusion as I did, so that would mean its a mistake on the datasheet not me right? Commented Jan 25, 2017 at 2:51

Your are very correct, the error is obviously from the datasheet and sparkfun designer also made the same.

Even mere look at the formula and circuitry at where it is connected through the transistor to the AVDD, you would notice easily that ideally the voltage value on the AVDD should be same as the VCC connected to through collector of the transistor (just like an ideal toggled switch), but practically it would less to the VCC depending on the internal Rce resistance. The R1 and R2 are basically acting a voltage divider to the AVDD, so as to tell the feedback of the internal circuitry of the IC what AVDD is divided to(half).

Therefore, it is incorrect to use the formula in the datasheet, using that simply means the AVDD as been taken for Vfb and vice versa.