cancel
Showing results for 
Search instead for 
Did you mean: 

FOC 4.0 problem with ADC?

kovac
Associate II
Posted on August 08, 2014 at 12:31

Hello,

I would like to use the latest FOC library for small PMSM motor. I'm using STM32F303VCT6 MCU and I would like to use internal PGA. But motor doesn't run at all. Start sequence starts, but with very high current consuption (higher that I set in WB). I finaly fount that probably AD converter doesn't give a correct value. I see it mainly on Vbus voltage measurement. Measured value is not correct. It shoul be ~325V but reading from MCU give me a value ~189V and it fall down to ~21V after few seconds. Voltage on board is corrent, also MCU ADC works correct - I mean nothing is damaged on the board. I've check it with modified example project in StdLib for STM32F3 and it converts value from Vbus pin. So it seems to me, that something is wrong with setting of AD converter in library. ADC does not measure correct values of Vbus and probably also phase currents and that's why motor has during start so big current consuption and doesn't run. 

I'm attaching my settings in WB. 

Maybe I sould mention, that I use KEIL MDK to compile library.

Any help/tips would be helpfull.

Thanks. Daniel   

#foc-adc #mcu #foc-adc #foc #foc-adc
18 REPLIES 18
hassanbhutta91
Associate II
Posted on December 20, 2014 at 18:08

thank you very much Daniel sir

hassanbhutta91
Associate II
hassanbhutta91
Associate II
Posted on February 07, 2015 at 06:45

dear daniel , please tell me whether i have to use batch build or just build for compiling the project? i am using web distribution library not confidential

kovac
Associate II
Posted on March 03, 2015 at 16:11

Hello Raza,

 I'm sorry but I will not help you with this question. I'm using KEIL not a IAR compiler. I think, you should follow instruction included in library. It doesn't depend on whether you use web or confidential version.

 Daniel

hassanbhutta91
Associate II
Posted on March 05, 2015 at 14:10

kindly tell me where are the insturction in the libraray?

 one last question 

is current sensing feedback is necessary for the pwm generation?

because when i download the code into the controller ,no pwm generated at the gpio pins

kovac
Associate II
Posted on March 12, 2015 at 12:14

You will find instruction in readme file or there is a doc folder with nice pdf file called Quick Start for STM32 PMSM MC Library v4.0.pdf. There you will find a lot of information how to use library. Beside of these, there is a lot of trainings especially for FOC library. As I remember, two years ago I visited one of these trainings. These time it was in Prague in Czech republic. As I remember there were more trainings around the world. Please try to check ST web.

Current measurement is essential for control.

Daniel

hassanbhutta91
Associate II
Posted on March 13, 2015 at 11:44

hassanbhutta91
Associate II
Posted on March 13, 2015 at 11:45

okay.

but in my country there is no training institutes of stm library.even there is only a small office , that is only for sales of hardware. please can you tell me.. Is there any tutorials (vedios) at any website? 

Laurent Ca...
Lead II

Adding of "STM32 Motor Control" topic".

Best regards.