3
\$\begingroup\$

For measuring a voltage via an ADC into a microcontroller (STM32), is it better to set the reference voltage (Vref) referenced to VSS or to VSSA ?

The voltage that I want to measure is referenced to VSS so to me it seems better to reference the Vref voltage to VSS as I do not know if VSS would be lower or higher than VSSA and so it will introduce some errors.

But as VSSA is the analog ground of the ADC, it seems to be better to set the reference voltage VRef referenced to VSSA ?

Thank you :)

\$\endgroup\$
6
  • \$\begingroup\$ Which STM32, give exact model, including which package it is in as it makes a difference. The reference may not even be VSSA if you have a VREF- pin. \$\endgroup\$
    – Justme
    May 10 at 8:49
  • \$\begingroup\$ Thank you for your reply. It is a STM32G484 \$\endgroup\$
    – Jess
    May 10 at 9:05
  • 1
    \$\begingroup\$ Any reason you're not connecting VSS and VSSA together anyway? \$\endgroup\$
    – Finbarr
    May 10 at 9:34
  • \$\begingroup\$ That's not the complete MCU type and you did not mention the package. Add the two letters to know which package you have to know which kind of analog powering scheme it has. \$\endgroup\$
    – Justme
    May 10 at 9:37
  • 1
    \$\begingroup\$ @Seir Depending on MCU package, it has different pins available. Small packages may not have separate ADC reference pins or analog supply pins at all. The more pins a package has, you get separate analog supply, analog ground, analog positive reference and analog negative reference pins. So what is best practice depends on which situation there is. A general answer would have to list all scenarios possible and what is best in those scenarios. \$\endgroup\$
    – Justme
    May 10 at 10:08

1 Answer 1

4
\$\begingroup\$

Proper grounding strategies in mixed signal circuits can be a complicated issue. According to the user manual for your microcontroller, VSSA is

Ground for analog power supply. On device package which do not have a dedicated VSSA pin, VSSA is internally connected to VSS.

Assuming your device package does have a separate VSSA pin, this app note from Analog Devices describes a good design practice for the VSS and VSSA pins.

Many ADCs and DACs have separate analog ground (AGND) and digital ground (DGND) pins. On the device data sheets, users are often advised to connect these pins together at the package. This seems to conflict with the advice to connect analog and digital ground at the power supplies, and, in systems with more than one converter, with the advice to join the analog and digital ground at a single point.

There is, in fact, no conflict. The labels, “analog ground” and “digital ground,” on these pins refer to the internal parts of the converter to which the pins are connected and not to the system grounds to which they must go. For an ADC, these two pins should generally be joined together and to the analog ground of the system. It is not possible to join the two pins within the IC package because the analog part of the converter cannot tolerate the voltage drop resulting from the digital current flowing in the bond wire to the chip. But they can be tied together externally.

Now onto your real question about whether to connect Vref- to VSS or VSSA. According to the chip user guide, Vref- is tied to VSSA internally, so you could actually leave this pin disconnected as long as you have a separate connection between VSS and VSSA on the PCB, and Vref- will just reference VSSA anyway. Alternatively you could still connect it to your analog ground on the board which should not make much of a difference if you have a good grounding strategy on the board.

\$\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.