cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure 3 Shunt 3 ADC measurement

JKolj.1
Associate III

Hi,

I have a STM32G491 based design with three differential shunts, routed to the three Op Amps of the MCU. I would prefer to run the Op Amps in standalone mode. This would allow me to have a low pass filter (cap across negative and output) and I would also be able to fine tune the opamp gain. I understand that this is not possible with 2 ADCs due to limitations in amplified signal routing, but it would be possible with 3 ADCs.

It looks like the MCSDK 6.1.1 ships with a promising r3_3_g4xx_pwm_curr_fdbk.c file. How to configure this current measurement topology with the MCSDK 6.x? I have a JSON spec file for my custom inverter board. I am able to generate code for 3 Op Amps + 2 ADCs by using the "ThreeShunt_RawCurrents_Differential_InternalGain" option and STM32G474 as a temporary MCU before importing everything into a STM32G491 project.

Additionally, do you have a specification for (differential) PGA shunt measurement network polarization offset and attenuation calculation, or do I have to simulate the circuit? And is there a plan to include the STM32G491 into the MCSDK in the future?

Thanks, br,

Juha

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello JKolk.1,

First of all, we would like to apologize for the delay in replying to your post.

If your point is still relevant : unfortunately, there is currently no way to configure your system with a 3-ADC current sensing, despite the presence of r3_3_g4xx_pwm_curr_fdbk.c file. This file was not intended to be part of the package and will never be generated.
However, an alternative may be possible with the coming of our next release (MCSDK 6.2) in a few weeks.

Concerning the STM32G491, it will not be added anytime soon, sorry.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

3 REPLIES 3
Gael A
ST Employee

Hello JKolk.1,

First of all, we would like to apologize for the delay in replying to your post.

If your point is still relevant : unfortunately, there is currently no way to configure your system with a 3-ADC current sensing, despite the presence of r3_3_g4xx_pwm_curr_fdbk.c file. This file was not intended to be part of the package and will never be generated.
However, an alternative may be possible with the coming of our next release (MCSDK 6.2) in a few weeks.

Concerning the STM32G491, it will not be added anytime soon, sorry.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hi Gael,

thank you for your reply. We actually developed our own 3-shunt, 3-OpAmp, 3-ADC sampling code and it works great. We had to do some rework to ST code anyway to get oversampled measurements working, since you assume that the sampling time is less than dead time+noise and in our application it's the other way around. We also moved from STM32G491 to STM32G474 due to the missing MCSDK G491 support.

Looking forward to the MCSDK 6.2. I have been waiting for it for a few weeks.. Actually since March or something, when there were some indications that it would launch during the summer/July.

 

Juha

Gael A
ST Employee

Hello JKolj.1,

We are sorry for the delay concerning the MCSDK 6.2 release. Though, we are pleased to announce that you should be able to download our new version this week or at the beginning of next week at the latest.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.