cancel
Showing results for 
Search instead for 
Did you mean: 

Current limitation

luter
Associate II
Posted on March 02, 2006 at 07:41

Current limitation

2 REPLIES 2
luter
Associate II
Posted on May 17, 2011 at 10:19

Hello.

Looking code example of bldc sensor control from st7 i was a little bit confused. In mtc.c file, MTC_StartMotor function i found following code :

// Init of MTC peripheral hardware registers used modified during run-time

#if (DRIVING_MODE == VOLTAGE_MODE)

MCPVL = mem_MCPVL; // current limitation - Voltage mode

MCPVH = mem_MCPVH;

#endif

and in MTC_Settings_Sensor.h :

#define mem_MCPVL ((u8)136) // Setting of PWM duty cycle use for current limitation in voltage mode Low Register

#define mem_MCPVH ((u8)8) // Setting of PWM duty cycle use for current limitation in voltage mode High Register

As i understood MCPV register sets duty cycle during over current. But i did not find any notice about it in datasheet. is it true or not?

gaetano
Associate II
Posted on May 17, 2011 at 10:19

Hi Luter,

in fact, you cannot find this kind of information in the datasheet.

The firmware implementation is just one way to create a current refrence threshold to be given at one of the inputs of embedded current comparator put inside MTC peripheral (MCCREF pin).

In fact, by filtering the PWM V signal at the output of pin MCPWMV through a low pass RC filter, you create the reference level for the maximum allowed motor current when in voltage mode.

This threshold level can be changed as you want by just setting the duty cycle value of PWM signal.

If you look at the ST7MC Starter Kit board, you could choose another way to fix this reference: use the potentiometer P1 and move the jumper W12 in the 'Adjustable'' position. In this case you can forgot abot PWM V and set the reference by acting on the trimmer pot.

Best regards,

Tanio