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.

DRV8876: Simulation of Current Measurement

Part Number: DRV8876
Other Parts Discussed in Thread: DRV8874-Q1

I am using the spice model to simulate the DRV8876 in PWM mode.  The sleep input is high as is IN1 and IN2 is toggled to create the PWM timing.  PMODE is pulled up with a 10K resistor and IMODE is pulled down with a 62K resistor. 

Vref is driven to ~1V by a resistor network from 3.3V, 10K pullup and a 4.3K pull down.  IPROPI has a 1K to ground to turn the current into a voltage mapping 1 amp to 1 volt.  The load is drawing a variable current between 50 and 90 mA.  However, when I examine these signals IPROPI has virtually zero voltage on it (993pV) while Vref has the expected 992 mV.  The similarity of these numbers was suspicious so I changed Vref to be 1.65V and it adjusted.  IPROPI also changed to 1.651nV. I changed the value of the resistor on IPROPI from 1K to 1Meg and the IPROPI current remained at 1.651pA while the voltage increased to 1.651 uV. 

Clearly there is a connection between the Vref voltage and the IPROPI current.  I've checked my design for an unintentional short by name and these signals are not connected to each other or anything else.  Can this be a flaw in the model?  The comments in the model would seem to indicate the IPROPI current sensing is functional. 

* A. Features that have been modelled
*	1. Control Mode
*	2. Current Senses

I suppose I may have not used the model correctly.  The control inputs are set at constant levels and the sleep_n pin starts low and after 100 us is brought high to trigger the mode controls being read.  Any ideas?

  • Hi Rick,

    Please give me a day to research your questions. Expect a reply from me by 3/16 or earlier.

  • Hi Rick,

    Clearly there is a connection between the Vref voltage and the IPROPI current.

    Vref and IPROPI currrent are related by the following equation: I_TRIP=Vref/(A_IPROPI x R_IPROPI). In your case, R_IRPOPI=1kΩ, Vref=1V, and A_IPROPI=1000 (µA/A). So the Itrip limit will be set to 1A. This means that the current limit is set to 1A. So the maximum V_IPROPI=(IPROPI x R_IPROPI)=(1A x 1000 (µA/A)) x 1000Ω=1-V.

    So there current and V_IPROPI will be 1-A to 1-V mapped as you explained. So for a 50mA current, V_IPROPI should be 50mV. I believe there might be an issue with the circuit or the model. Can you send me a screenshot of your model? if possible, can you provide a simulation showing output current, V_IPROPI, and I_PROPI?

    The control inputs are set at constant levels and the sleep_n pin starts low and after 100 us is brought high to trigger the mode controls being read.  Any ideas?

    What do you mean by constant levels? Are you referring to voltage level? I think it will be more clear to me if you can share your schematic and show a simulation showing nSLEEP, IN1, IN2, OUT1, OUT2, and V_IPROPI.

  • Yes, by constant levels I mean the voltage level is constant until after 1 ms.  At 0.1 ms sleep changes to allow the mode inputs to be read.  After than at 1.0 ms IN2 starts toggling at 100 kHz, 50/50 duty cycle. 

    Here is the schematic and the simulation plots.

    Strange.  I can't find a way to upload an image.  I did it the other day in another thread, but when I click Insert and Image, it only allows typing a URL. 

  • I see another thread titled "DRV8876: IPROPI simulation malfunction" where it is mentioned the IPROPI output does not work.  No one at TI provided any direct information about the issue but they said TI doesn't support their models anymore.  Is that really true?  TI no longer supports simulation models?

  • I uploaded the simulation files in the other thread (DRV8876: Asymmetric Tpd between INx and OUTx) since this thread won't let me upload anything.  I'd really like to get the IPROPI pin working.  Gauging from an earlier thread on IPROPI not working I'm think this is a long shot. 

  • Hi Rick,

    I received the information on the other post. I give instructions on how to upload images and files on that post for your future reference. 

    Please give me two days to look at the model and schematic to figure out how to fix the IPROPI issue. expect a reply from me by 3/19 or earlier.

  • The uploading issue is not fixed here.  I still have the same problem of not seeing an "upload" button.

  • Rick,

    Can you clear your browser's cache and cookies and try again?

  • I've already tried that.  There is a warning on every page to clear the cache and cookies.  Seems TI is having trouble with their site.

    In fact, it is hard to get rid of that message.  It returns constantly. 

  • Just an update from my end.  I've been running the simulation and IPROPI current will vary, but it appears to be adding the currents in both OUT1 and OUT2 even when the currents are not supposed to be added such as in slow brake mode.  However, even that does not fully explain the IPROPI current that shows in the simulation.  

  • Hi Rick,

    Thanks for the update. There seems to be something not right with the model. I also ran a couple simulations and notice similar issues with the IPROPI current. I will try to get in contact with someone in our team who may be able to understand this problem. I will reply back by 3/23 or earlier. Thank you for your patience.

  • I think I figured out a problem with the IPROPI current.  For some reason the current out of the VREF pin matches the current on the IPROPI pin exactly.  If the voltage on VREF is set by a resistor divider this current changes the voltage on the VREF pin. 

  • Another issue with the simulation is the IPROPI pin seems to sink current as well as source it.  This results in the voltage on the pin going significantly negative.  If this also happens in the real chip it will damage chips attached to this I/O.  I don't see anything in the manual indicating a limit on the current at this pin or the voltage.  Can the DRV8876 drive the IPROPI pin negative?

  • Hi Rick,

    The internal current mirror circuit only measures current that flows from the drain to source of the FETs. The current on IPROPI will be 0-A if current flows from source to drain. So the current on IPROPI will always be positive and the minimum value will be 0-A when the bridge is in the decay phase. The voltage on IPROPI pin should not become negative.

    I think this might be an issue with the model. I will look into this as well.

  • When you find the model is not correct, will TI fix this?  Are there other motor controllers that have current measurement where the simulation works correctly?

  • Hi Rick,

    I've been looking at the model in more detail and it seems that the IPROPI is not working properly. However, I did find a way to get it working. The schematic below has been been working for me (I have a DRV8874-Q1 on this schematic but has same behavior as the DRV8876). To get it to work, you have to place the load in both OUT1 and OUT2, as shown below, rather than connecting the load between OUT1 and OUT2. So you have to duplicate the load in both OUT1 and OUT2. The other characteristics of the model should be the same with this configuration. I suggest testing with a simple resistive load first to check functionality and then placed your desired load.

    I hope this works for your validation purposes. If you need further testing, you can get an EVM.

  • I see the voltage on Vref is about 0.25V which is not correct.  It should be 1V.  Instead it seems to track IPROPI.  This prevents the current limit from being tested.

    Is TI planning to fix this model?

  • Hi Rick,

    Thank you for pointing this out. I totally missed this when I was doing the simulation. i did further testing and I think the issue is using a resistor network to set VREF. When I set Vref using a DC supply, the measurement on IPROPI seems to be correct as shown in the schematic below. Can you try this in your simulation?

  • You have not answered my question.  Is TI going to fix the Spice simulation model for the DRV8876/4?

  • Rick,

    At the moment, we don't have an immediate plan to fix the model. However, I will talk to our team if we can make a plan to fix the model. It's going to take quite some time until the model is fixed so at the moment the only option to validate this device is with an EVM. I apologize for that.