Skip to main content
alessandro239955_stm1
Associate III
July 24, 2020
Solved

I can't set the opamp gain higher than 16 with B-G431B-ESC1 and Motor Control Workbench.

  • July 24, 2020
  • 4 replies
  • 2692 views

Hi all,

I probably found a bug in the Control Stage - Analog Input and Protection.

Choosing a gain higher than 16 doesn't change the gain (32 and 64). The gain changes properly if a gain between 2 and 16 is selected.

Best,

Alessandro

This topic has been closed for replies.
Best answer by cedric H

Hello Alessandro,

"Since we are measuring the current on the low side of the mosfet, in reality the voltage across the shunt will only be positive."

This statement is not correct.

In FOC with three shunts topology, you will see negative current at shunt level. If you do not trust me, do not hesitate to check by yourself with a scope. ( Look carefully during open loop phase, and at high power)

Anyway, increasing the OPAMP gain without changing the polarization circuit may be dangerous for your board. I will ask for a change in the configuration tool to lock the UI. Today it is true that you can wrongly think that it is configurable.

Regards

Cedric

4 replies

Laurent Ca...
Senior III
September 14, 2020

Dear alessandro239955_stm1

Do you have still this problem to solve?

Best regards

Laurent Ca...

JA.1
Associate III
September 23, 2020

This issue is indeed still happening..

Laurent Ca...
Senior III
September 23, 2020

Dear @Community member​ 

As this post is mentioned as an eventual bug, I am coming to open an internal ticket about.

I will come back to you soo to infrome you the resuting analyse and if a fix will be integrated in next SDK version (5.4.5).

Important: I need the SDK version on which this bug has been seen (it is mandatory to open an internal ticket).

Best regards

Laurent Ca...

JA.1
Associate III
September 23, 2020

SDK version 5.4.4.

cedric H
Technical Moderator
September 23, 2020

Hello JA.1

The ESC board is designed to be used with a gain of 16. Even if it is possible to change the gain of the OPAMP by software, it will not lead to a working configuration.

The reason behind is that for FOC control, we need to measure positive and negative current. As the ADC is able to measure voltage between 0 to 3,3 Volt, we have to polarize the amplification circuit to have roughly 1.65Volt at the output when there is no current.

Increasing the gain will increase the polarization voltage and the voltage at ADC pin will be over than 3.3V and may destroy your IC.

If you want to change the OPAMP gain anyway, you must change also the polarization circuit. Is it something you plan to do ? Soldering components on this tiny board is something I really do not recommend.

Increasing the shunt value could be a solution, but be careful the board is very small and dissipating more power in the shunt may require passive cooler.

(It requires also soldering new shunts but it is a little bit more doable)

Hope it helps

Regards

Cedric

alessandro239955_stm1
Associate III
September 23, 2020

Hi Cedric,

I am not too convinced about your statement.

Since we are measuring the current on the low side of the mosfet, in reality the voltage across the shunt will only be positive. I have modified the circuit so that the positive current will give me 0 to 3,3V and it works. I basically doubled the accuracy and made the sensing tuning much simpler.

The dual current direction makes sense only if the shunt resistors are placed in line with the motor phases. In that cases the polarity of the current matters and a polarized opamp is required.

Best,

Alessandro

cedric H
cedric HBest answer
Technical Moderator
September 24, 2020

Hello Alessandro,

"Since we are measuring the current on the low side of the mosfet, in reality the voltage across the shunt will only be positive."

This statement is not correct.

In FOC with three shunts topology, you will see negative current at shunt level. If you do not trust me, do not hesitate to check by yourself with a scope. ( Look carefully during open loop phase, and at high power)

Anyway, increasing the OPAMP gain without changing the polarization circuit may be dangerous for your board. I will ask for a change in the configuration tool to lock the UI. Today it is true that you can wrongly think that it is configurable.

Regards

Cedric