This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sampling window for shunt current measurement



Hi,

I have read a lot about shunt current measurement in the InstaSpin Foc/Motion user's guide (spruhj1d). There, the advantages and disadvantages of the two shunt technique are explained in detail. From the picture below we see that the measurement must be done in the middle of the period. The pwm module of the InstaSpin projects are configured as up down counters, as long as I know. Therefore I would conclude the the current measurement should begin close before the pwm counter reaches its period counter value (In the middle of the picture below). If we start sampling the adc  channels at counter equal period we can only use the half of the possible sampling window.

 

 

Question 1:

The pwm modules of the InstaSpin Motion labs are configured to generate a SOC pulse at counter equal zero. See for that the picture below which comes out of hal.c of the InstaSpin lab 10c.

Why is the pwm module set to CounterEqualZero instead of CounterEqualPeriod? With the configuration CounterEqualZero I assume that the sampling is done in the wrong moment.

Question 2:

How can I start the current sampling with the increasing slope of that low side fet which has the shortest on time?

In other words, how can I use the full time of the sample window?

 

Thanks for your reply

 

Timon