how to choose the shunt resistor value of half bridge motor drive circuit?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to choose the shunt resistor value of half bridge motor drive circuit?

Jump to solution
2,254 Views
NoahXu
Contributor III

i use 0.0005Ohm , the motor cannot drive.

The sampled current  value captured by freemaster is attached.

when i use the 0.002Ohm resistor, the motor can drive. 

what is the reason?

NoahXu_0-1705412281982.png

NoahXu_1-1705412481643.png

 

 

 

0 Kudos
Reply
1 Solution
2,232 Views
RadekS
NXP Employee
NXP Employee

Hello NoahXu,

The principles for Shunt selection are nicely described in application note AN5207: Hardware Design Guidelines for S12ZVM. See chapters 7.5 and 7.6 (pages 34~38).


The shunt ressitance must be selected wisely and in considering to following input circuit.
Too high shunt resistance will consume too much energy while too small shunt resistance will not generate enough voltage to overcome the noise.

Unfotunately you didn't specified how you changed the scale in your project. When you change the shunt, you have to recalculate the HW scales.
In MCAT -> Parameters tab is "I max" parameter, that refers to theoretical current that causes 5V at ADC input.

So, if you use shunt with 4-times smaller resistance and simultaneously you do not change the attenuation of the current amplifier, you need to set the I max 4 - times higher.
For example:

RadekS_0-1705489191766.png

The hardware scale is not updated run-time, therefore you have to generate new static configuration file, build project again and flash into MCU.
For that click on "Store Data" button (picture above), followed by "Generate Configuration File":

RadekS_1-1705489377611.png

I hope it helps you.

Best regards

RadekS

 


 

View solution in original post

0 Kudos
Reply
5 Replies
2,232 Views
RadekS
NXP Employee
NXP Employee

Just note: The attached FreeMASTER screeshot shows the speed and not the currents.

0 Kudos
Reply
2,233 Views
RadekS
NXP Employee
NXP Employee

Hello NoahXu,

The principles for Shunt selection are nicely described in application note AN5207: Hardware Design Guidelines for S12ZVM. See chapters 7.5 and 7.6 (pages 34~38).


The shunt ressitance must be selected wisely and in considering to following input circuit.
Too high shunt resistance will consume too much energy while too small shunt resistance will not generate enough voltage to overcome the noise.

Unfotunately you didn't specified how you changed the scale in your project. When you change the shunt, you have to recalculate the HW scales.
In MCAT -> Parameters tab is "I max" parameter, that refers to theoretical current that causes 5V at ADC input.

So, if you use shunt with 4-times smaller resistance and simultaneously you do not change the attenuation of the current amplifier, you need to set the I max 4 - times higher.
For example:

RadekS_0-1705489191766.png

The hardware scale is not updated run-time, therefore you have to generate new static configuration file, build project again and flash into MCU.
For that click on "Store Data" button (picture above), followed by "Generate Configuration File":

RadekS_1-1705489377611.png

I hope it helps you.

Best regards

RadekS

 


 

0 Kudos
Reply
2,225 Views
NoahXu
Contributor III

Hi, Radek

thanks for your remind, but i already took the scales into consideration.

in the cotrol algrithom, i arealdy changed the I_max value from 62.5 A to 250A.(you can calculate the gain and offset according to my circuit.)

now the problem is when use the 0.002Ohm resistor the motor can run while the 0.0005Ohm resistor cannot run.

is that related to the filtering capacitors i set here?

 

NoahXu_0-1705563696238.png 

NoahXu_1-1705563711743.png

 

 

0 Kudos
Reply
2,165 Views
RadekS
NXP Employee
NXP Employee

Hello NoahXu,

I am still quite confused by the combination of your posts. 
In the FreeMASTER thread, you wrote that you use S12ZVM RDB EWP design that has 10mOhm shunt.
In the thread related to shunt filter https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-choose-the-shunt-capacitor-value-of-... you show an amplifier input circle completely different than the circuit in this thread.
Could you please specify exactly on what board (schematic) you are working?

Anyway, both schematics are incorrect.

In case of schematic here:

  • There missing resistor between 2.5V reference divider (1.) and the possitive input of OPAmp (2.). This resistor should be 10k for a case when both R90 and R91 are assembled and gain 50. Or it should be 20k or a case when one of R90 and R91 is not assembled and gain 25. 
  • Anyway, the 20k/20k divider is quite week and you need at least some capacitor to help covering the spikes in consumption. For reference stibility, I would like to recommend at least 10 times smaller resistors in divider in compare with resistor on the output of voltage divider.
  • EVDD is also not ideal source here since output transistor drop depends on the output current. From my point of view, the VDDX looks like better option. Adding an additional voltage follower between voltage reference and current measurement circuit is an ideal option. Just be aware, that we cannot use internal OPAmp since this is not stable at the gain=1.

 RadekS_0-1705929621079.png

as an example of correct minimum circuit scheme I can use here the EWP design where I am talking about missing R14 in your design (just ignore the values)

RadekS_1-1705929914779.png

 

  • The capacitors itself has quite low effect. It is just low-pass filter. You may tune this circuit, but you need to watch the results on the scope. Anyway, first you have to fix the issue with 2.5V reference.
  • According your schematic, you use 1% resistors. Since the gain depends directly on resistor ratio, you may expect limited accuracy of current measurement.  

 

In the case of schematic on thread https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-choose-the-shunt-capacitor-value-of-...

  • I can see the same issue with missing resistor between voltage reference and possitive input of OPAmp. For measurement of diferential signals, we need a symetrical design. The resistor between voltage reference should have the same value as resistor in negative feedback (here R36) for easy calculation of the gain. 
  • I do not undertood why did you added R38 and R39 for IDCB.
  • R26/R28 divider is not symetrical, therefore you have to be prepare, that the default software might not be prepared for such offset value (0.997V).
  • According your schematic, you use 1% resistors. Since the gain depends directly on resistor ratio, you may expect limited accuracy of current measurement.  
     
    Best regards
    RadekS
2,160 Views
NoahXu
Contributor III

Hi, Radek

the schematics post in this thread is what i designed.  for designs attached in other thread is what i referenced.

1) seems i missed the resistor in the divider. thanks for your remind.

2) divider resistor value , you mean it is to too big so the current will be too small?

3)VDDX as divider source, good suggestion. voltage follower, good suggesion.

4)resistor tolerance, i will change to smaller ones like 0.1% to check.

5)R38 R39 , it is used to calc the dc line current. it is a integral circuit.

6)R26 R28 , for one application which need different voltage bias.

at last,thanks for your review.

 

 

0 Kudos
Reply