1
\$\begingroup\$

Every voltage regulator IC has atleast a variation of 2% or something. This can make the ADC reading way inaccurate if it fluctuates to those levels. What is a robust and common solution to this problem?

\$\endgroup\$
1
  • \$\begingroup\$ Remember that the reference voltage is not the only source of error. In addition to such gain errors, there are also linearity errors. If you are using an ADC built-in to a microcontroller you can't expect a very high level of accuracy. \$\endgroup\$ Jan 30 '19 at 12:37
4
\$\begingroup\$

You use an external "reference". You can use anything from a few-penny LM431 to much more sophisticated references, depending on your requirements for accuracy and stability as well as noise

LM4040 is a commonly used shunt reference for moderate accuracy and low cost, but there are many others, do a parametric search based on your actual requirements. They come in two basic types- series and shunt. The series type is like a more accurate and stable type of voltage regulator, the shunt type is like a zener diode that requires some series resistance to establish a bias current.

In some cases, for the best accuracy, you may need to buffer the reference output in order to drive the ADC reference input.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Okay, understood. But is there a way to use a generic voltage reference without that much accuracy and compensate the error in software? I understand that there is an internal reference and that is calibrated by ST during production by using a 3.3V supply with a -+10mV variation. Is it possible to recalibrate these values with a different voltage reference supply? Like the TL431 for instance. – \$\endgroup\$
    – sixter
    Jan 30 '19 at 10:28
  • 2
    \$\begingroup\$ If you add the particular section of the datasheet to your question and your actual requirements it might be possible to answer, but this seems way too hypothetical. Generally if you have a better reference it's probably best to use it directly rather than to try to correct a lousy reference. It's certainly possible to do a calibration using an external reference (for example a bench top instrument) and store a correction factor in EEPROM, but if it drifts around with temperature, time etc. it may be no better than the ST calibration, with added risk. \$\endgroup\$ Jan 30 '19 at 10:32
  • 1
    \$\begingroup\$ There is initial accuracy (a good reference could be 0.1% or 0.01%) and stability (could be 100ppm/°C or 1ppm/°C), time stability and noise. There's not much point in calibrating a reference that drifts wildly with time and temperature to 0.01% because it will be different 10 minutes from now. \$\endgroup\$ Jan 30 '19 at 10:34
  • 1
    \$\begingroup\$ The thing is my reference has an error of 2%. My question now is how exactly can that calibration be performed in code? I'll have a regulator connected to another ADC pin so that the values can be read and calibration performed periodically. There does not seem to be a lot of info on this. \$\endgroup\$
    – sixter
    Jan 30 '19 at 10:42
  • 2
    \$\begingroup\$ If everything is perfect, you can measure the known voltage, maybe average many readings to get a number x. Then multiply measurements by x'/x where x' is the expected number. That assumes no offset error, which is usually pretty good, but you can also correct for that by measuring 0V and subtracting that averaged reading from subsequent measurements etc. But, and I cannot emphasize this too strongly, if the underlying hardware is bad, software isn't going to make it magically better. \$\endgroup\$ Jan 30 '19 at 10:45
1
\$\begingroup\$

There are parts made for this purpose, called voltage references rather than voltage regulators, ADR421ARZ is one such example with good noise specs.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.