cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX:STM32G431CUB3 Using OPAMP + ADC for Current Sense of Motor Control

AaronChang
Associate

Hi Sir

AaronChang_0-1723796722377.pngAaronChang_1-1723796740919.png

I am currently encountering a problem in the current detection part of the FOC. The circuit uses the G431 internal OPA PGA for signal amplification processing and connects it to the ADC channel. However, I have been unable to read the correct value in my current attempts.
I have changed to using ADC injection conversion alone, using the PWM signal as the injection conversion signal, and using the power supply to directly input voltage to the ADC pin to make sure that the ADC related code is normal.
Later, I will create a separate project for the OPA code with the following settings:

AaronChang_2-1723797043192.png

AaronChang_3-1723797084531.png

No matter how the input voltage changes, the output remains at 3.3V.

 

 

0 REPLIES 0