cancel
Showing results for 
Search instead for 
Did you mean: 

Bus voltage sensing is not accurate and undervoltage fault

Randy1
Associate III

Hi,

I use a stm32f446ze to run two BLDC motors. I used the STMCWB monitor with UART port to see the bus voltage sensing there is an error of 1V and it always start with an undervoltage fault. I verified the output of the voltage divider and it's the good value. I tried to decrease the minimum voltage to avoid this fault but it didn't work.

Does anybody know what's going on ?

4 REPLIES 4
cedric H
ST Employee

Hello Randy,

I think it could be worth to check that your voltage divider is properly configured.

You can check in the generated power_stage_parameters.h file the following #define :

#define VBUS_PARTITIONING_FACTOR  XXXX /*!< XXXX expresses how  much the Vbus is attenuated before being converted into digital value */

I can also suggest you to measure the voltage directly at the ADC input pad, and check if the value read is in line with the ADC data register.

the ADC data registers are stored into a rolling buffer called RealBusVoltageSensorFilterBufferM1 that is accessible through your debugger.

If you are in dual motor setup, the same is available for motor 2 : RealBusVoltageSensorFilterBufferM2.

Hope it helps

Cedric

Randy1
Associate III

Hello

VBUS_PARTITIONING_FACTOR is the good value I recalculate it. I measured the value before and after the voltage divider and I found the same factor... However, the value in the monitor on STMCWB is truncated if the real value is 38.7V it will display 38V instead of 39 I measured several times and this is what happen always.

And I've always this warning when I build the project:

Description Resource Path Location Type

'BusVoltageFaultsFlag' may be used uninitialized in this function [-Wmaybe-uninitialized] mc_tasks.c line 1086 C/C++ Problem

I don't know what cause these problems

Any Idea ?

Regards

Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards

luukredstone
Associate II

Did you find the problem because I have got the same error?