Measure Circuit returns wrong value after connect to G4 chip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-16 7:22 PM - edited ‎2024-06-16 7:23 PM
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?
- Labels:
-
STM32G4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-16 8:31 PM
It depends on the impedance of the divider. If you use high value resistor, use buffer opamp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-17 2:23 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-17 5:53 AM - edited ‎2024-06-17 6:13 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-21 9:27 PM
I realize that if I just add just 1 or 2 code line the ADC will return wrong value. I mean that there something makes wrong value (effect directly to hardware) that just by code. Could you explain this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-21 9:58 PM
That seems to be a clue..
What does that line contain? Where do you insert code line? please add the code and mark it for us to understand
