Skip to main content
MYara.2
Visitor II
August 22, 2022
Question

Ground problem while reading ADC in STM32f030f4p6 module

  • August 22, 2022
  • 1 reply
  • 648 views

I want to take a voltage reading over the voltage divider circuit I prepared with the STM32f030f4p6 module. I divided the voltage as 1 by 13. When I run the code in debug mode, for example, if I give 14V, I need to read 1V, but the value I see in the debug window is around 700mV. When I remove and reconnect the 3rd leg of the voltage divider circuit(ground pin), the problem is completely resolved. Anyone know why?

This topic has been closed for replies.

1 reply

Peter BENSCH
ST Technical Moderator
August 22, 2022

Welcome, @MYara.2​, to the community!

Have you looked at AN2834, which deals with ADC and its accuracy?

Reasons could be that you have used too high impedance resistors for the voltage divider and that you are measuring too fast without the ADC input having settled.

Good luck!

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.