Skip to main content
Associate
June 17, 2024
Question

Measure Circuit returns wrong value after connect to G4 chip

  • June 17, 2024
  • 5 replies
  • 1582 views

I am using the STM32 G431RBT6 chip. There is a circuit for measuring voltage, current, and other parameters.

When the circuit is not connected to the chip, the voltage divider works perfectly. However, when the circuit is connected to the chip (with the code uploaded), the voltage readings are incorrect (for example, 50V reads as 40V), and this issue occurs inconsistently across channels.

It is important to note that this discrepancy is not due to incorrect ADC results, but the voltage divider output itself is incorrect. The ADC channels are configured with no pull.

What could be causing this issue, and how can I resolve it?

This topic has been closed for replies.

5 replies

Senior III
June 17, 2024

It depends on the impedance of the divider.  If you use high value resistor,  use buffer opamp. 

"If you feel a post has answered your question, please click ""Accept as Solution""."
CuongLeeAuthor
Associate
June 17, 2024

Before using this chip, I've used another G4 one and everything work well, this happens only when I switch to new G4 chip. So, it still relates to  the divider?

Senior III
June 17, 2024

Do you run the same program? Is it possible that io is not configured as analog input. We can only suggest that the voltage drops when the loading is more. This can be due to pin misconfigured as output, pull down enabled etc.

 Can you please confirm the voltage when you keep the reset kept pressed? At this condition, the io is in input mode. Make sure that the divider voltage doesn't go beyond 3.3v when the divider input is max voltage.  Check the datasheet if this voltage exceed the absolute max voltage when  vcc is not applied. 

As per datasheet the input impedance is 50k. 

Chek if vdda is proper and the pins are soldered properly. 

"If you feel a post has answered your question, please click ""Accept as Solution""."