cancel
Showing results for 
Search instead for 
Did you mean: 

ICS negative gain - how to?

mikemike9141
Associate III
Posted on September 27, 2014 at 14:10

I am currently trying to deploy the STM32 foc library (v3.4 currently, v4.0 available not not tried yet) on a custom designed board.

The motor does not startup, and I have tracked down the problem to a polarity mismatch in the ICS current measurement. In my design, current flowing out of the motor into the inverter has a positive sign. The library expects it the opposite way.

As that polarity is now given (and was also necessary due to layout constraints) and I do not want to add an inverting buffer - is there a way to modify or fool the library to accept that negative gain? For example, inverting ADC readout for the respective channels. Or can I just set ''AMPLIFICATION_GAIN'' to a negative value?
4 REPLIES 4
Gigi
ST Employee
Posted on September 29, 2014 at 09:09

Ciao Frank

I don't know if setting negative amplification gain is feasible.

For sure you can go in the code and change the get phase current function reverting the polarity.

Let say that you find there

I = ADC sample - OFFSET

you need to change in

I = OFFSET - ADC sample

Ciao

Gigi

mikemike9141
Associate III
Posted on September 29, 2014 at 09:48

Gigi, thanks for that. This means that I have to obtain the library source code.

Gigi
ST Employee
Posted on September 30, 2014 at 08:46

Yes Frank,

but if you have a concrete businnes opportunity you will not have any problem to get it from the nearest ST contact in you region.

Ciao

Gigi

mikemike9141
Associate III
Posted on September 30, 2014 at 09:44

I have just done that yesterday. Thanks again Gigi,

Frank