cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Multichannel Issue

vbk22398
Senior

I am using STM32F423RHT6 in my project. I am using 2 ADC Channels for measuring Voltage and Current(through Current Sensor). But I am facing a strange issue. Where the channel corresponding to the current is getting accurate values of analog voltage. The issue arises when I measure ADC value corresponding to voltage. I am using a voltage divider to measure the values of voltage ranging from 83.5V to 70.0V. The values are within 3.3V. 

Issues facing:
1.
The value of voltage when measuring across the multimeter is say 2.45V, but in conversion of digital to analog value, I am getting voltages more than 2.45. I am getting around 2.6/2.7. 
2.
When I am Probing across the voltage divider using a multimeter, this ADC input voltage corresponding to the voltage divider is getting reduced. Which is why, if we don't probe, causing the issue number 1 which is more voltage.
NOTE:
Probing through the multimeter doesn't affect the current channel but only the voltage channel.
3.
When I simultaneously read from both the channels, the channel corresponding to the current is accurate and the value of the voltage channel is getting increased and unable to find the relation between V and I to map the voltage and current.

What might be the issue?

I am using ADC in DMA mode to read the ADC Values. Have taken the pin outs of ADC separately and have connected it to Gnd and Vcc to check if they are independently working or not. They are working with this scenario independently but when connecting to Voltage divider and Current sensor, again the same issue. Tried with a different channel but the ADC Pin concerning voltage divider face the issue of overvoltage during normal cases and undervoltage when probing. This is a hardware issue but don't know how to proceed further. 

Kindly reply if anyone has a solution!

Screenshot 2024-11-22 192234.png



10 REPLIES 10
SofLit
ST Employee

Hello,

I suggest you to debug the issue step by step.

Forget about the voltage and current measurement for the moment and use two external voltage sources for both ADC channel inputs and vary the voltage input, remove all these HW external stuff dividers etc.. and check if you have the same behavior.

 

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.
MM..1
Chief III

DMA screenshot show word, but ADC results is HALF WORD. And you dont show haw and where you create array for adc values.

Karl Yamashita
Lead III

When there is no voltage to the voltage divider, does the channel read an offset voltage?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.
KnarfB
Principal III

Showing schematics could help. Does the voltage divider have sufficient low impedance? Increase sampling time to the max. Is VDDA stable? You could measure internal VREFINT channel for reference. 

hth

KnarfB 

Yah! it does that. @Karl Yamashita 

Tried that earlier. At that time, it worked perfectly. 2 channels are reading independent voltage when ADC pins are taken out with a wire and connected to Gnd and Vcc. They worked independently.

@SofLit 

So you should read and save the offset voltage before there is any power applied to the voltage divider. 

After when power is applied, you read the voltage divider and you subtract the offset voltage from it. That should be your calculated voltage you'd expect.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

You need to share your schematics and code, so others can help you efficiently ..

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.

@SofLit 
Our projects are going in a hectic schedule. So, using Interpolation corrected the issue to adjust the ADC Voltages as of now. I'll share you the schematics of the same very soon. Also if I find the solution, I'll add as a reply and choose Accept as solution.

Thanking you