2025-02-10 02:26 AM - edited 2025-02-12 06:05 AM
Dear community
I would like to ask regarding ADC raw value for current sensing in STSPIN32G4. As we can see on below image the raw value of ADC1 CH3 and ADC2 CH12 is always in range of few hundreds. FYI, the motor is in rotating mode. We can see from the PWM duty cycles, it is changing every time.
When measured using multimeter for phase current W, the current is always alternate from +3.5A to -1.2A which make sense. but the ADC raw values keep in hundreds. I was expecting it alternate from > 2048and < 2048.
ADC resolution is 2^12.
2048 = 0A // >2048 = +A //2048 = -A
But the ADC readout values are always less than 2048, or more specifically, they fluctuate between 172 and 208.
We have attached our ADC.c file. Could you kindly point us in the right direction?
Any guidance would be greatly appreciated.
many thanks!!!