cancel
Showing results for 
Search instead for 
Did you mean: 

My question is : can the C produced by the ST Motor Control Workbench be modified by to permit all 3 inverter currents to be measured by the same ADC, for example ADC 1? This would result in a 200ns delay for the 2nd measurement, and 400ns delay for 3rd

PBroo.2
Associate

Messieurs,

I am using the ST NUCLEO-F303RE together with an X-NUCLEO-IHM08M1 and the ST Motor Control Workbench (STMCW) to drive a BLDC motor using ST code.

In addition, my company has designed its own motor control board for driving two BLDC motors using the same STM32F303RET6 processor. I hope, for prototype purposes, to use some of the ST motor control code in the company motor control board.

However, I may have an issue with the ST code because of the ADC allocation.

In the X-NUCLEO-IHM08M1 the inverter currents are measured by bridge leg shunt resistors and fed to operational amplifiers with a gain of 5.18.

The STMCW allows for selection of the ADC channels with the NUCLEO-F303RE board for measuring the inverter shunt currents, for example :-

Ch phase U      ADC1_IN1 (A0)

Ch phase V      ADC12_1N9 (C3)

Ch phase W      ADC12_IN8 (C2)

What is apparent is that the choice of ADC channels is as follows

   (a) 1 fast channel from ADC1

   (b) 1 connected channel from ADC12

   (c) 1 other channel

I assume that (a) and (b) are to permit simultaneous analog to digital conversion of at least 2 inverter currents at the same time.

The ADCs are very quick - 200ns conversion time.

The PWM switching frequency on my board is in the range 50-100kHz. The ripple current is quite small.

My question is : can the C produced by the ST Motor Control Workbench be modified by to permit all 3 inverter currents to be measured by the same ADC, for example ADC 1? This would result in a 200ns delay for the 2nd measurement, and 400ns delay for the last current measurement, which I think is acceptable.

Cordialement,

Patrick Brooking.

1 ACCEPTED SOLUTION

Accepted Solutions
Ozone
Lead II

> My question is : can the C produced by the ST Motor Control Workbench be modified by to permit all 3 inverter currents to be measured by the same ADC, for example ADC 1?

You misunderstand the terminology used by ST.

>  (b) 1 connected channel from ADC12

The term 'ADC12_' means the analog input can be connected to either ADC1 or ADC2.

All three inputs are connected to the same ADC.

For a conclusive answer, one would need to check the source code.

This MCU is capable of an interleaved mode, utilizing 3 ADCs to achieve a higher sampling rate.

View solution in original post

3 REPLIES 3
rpip.1
Associate III

i don't konw which method foc or common 6-step you are using. you can use one trigger signal to trig one adc sample these three current ,data transmitted by dma. but actually you just need to mearure two current at the same time , casue Kirchhoff law is avaliable.

Ozone
Lead II

> My question is : can the C produced by the ST Motor Control Workbench be modified by to permit all 3 inverter currents to be measured by the same ADC, for example ADC 1?

You misunderstand the terminology used by ST.

>  (b) 1 connected channel from ADC12

The term 'ADC12_' means the analog input can be connected to either ADC1 or ADC2.

All three inputs are connected to the same ADC.

For a conclusive answer, one would need to check the source code.

This MCU is capable of an interleaved mode, utilizing 3 ADCs to achieve a higher sampling rate.

Laurent Ca...
Lead II

The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 MC SDK). 

Best regards

Laurent Ca...