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.

DRV8837: Clarification on Current Limit Feature

Part Number: DRV8837
Other Parts Discussed in Thread: DRV8833, TIDA-00757, TPS62745

Hello,

I have question regarding the DRV8837 from related question that I linked here. It is said that in order to detect stall condition it can be configured with a resistor and feed the sense voltage to the microcontroller ADC.

For the DRV8837, you can calculate how much current you will see in a stall condition and add a sense resistor between the GND pin of the device and GND. Then, by measuring the voltage across it with an ADC, you can find out if the stall current is reached. Note that doing this adds voltage offset to the ground of the device, so you must account for it in the rest of your pin voltages (e.g. nSLEEP).

It seems to me this method works to determine stall condition at instant. However my requirement needs to limit the current to the motor. My device is a smart lock uses 4 AA batteries and drive a mortise lock. For example when the motor hits something and the current goes up, I want the motor to be able to deliver up to a maximum constant torque with a certain current value (around 1.2 A) for up to 200 ms before I determine that my smart lock hits a stuck condition.

Because sometimes it can be the lock cylinder itself that is quite hard to be driven and I don't want the motor to draw current as much as it wants because when my device battery voltage already on low level like 5V, without current limit the battery drop voltage will be too big to make the whole system resets.

With that being said, DRV8837 satisfies my need for small package 2x2 mm, the pricing and minimum pin control.

  1. Are there any methods/suggestions to current limit this driver instead of just detect max current at instant?

Thank you,
Pranata

  • Hi Pranata,

    Let's have a discussion on this topic.

    If you are able to add a sense resistor to sense the motor current in an equivalent voltage, then amplify that voltage with an external CS amp with a desireable gain setting to a MCU ADC can interpret the value, you can then set your software to have a frequently (you can determine frequency) looping ADC sampling/storing that represents the current through the motor. When a ADC sample storing occurs, check if this ADC reading passes a threshold. If it does, you can enter a condition in the software to regulate the PWM's duty cycle to the percentile where the current is reached for a duration of 200ms. The 200ms can be set with a timer. I think this solution requires the least amount of hardware cost.

    Note that this first option adds software development cost and risk

    A second option that is more hardware oriented would be to utilize a DRV IC with integrated regulation. An great example is the DRV8833. Note that the IC cost is twice as much as the DRV8837, but your only software would be an interrupt service routine. 

    Please, let me know if it is acceptable, if you wish for a more hardware oriented solution, and any other input you may have.

  • Hi Hector,

    Thank you for the suggestions that you give. My PCB board doesn't have that sense resistor on DRV8837 that feeds to the ADC, it is referenced from TIDA-00757 with some changes such as using the combo MSP432 + CC264R2 as its main and bluetooth network processor.

    Currently the way that I do to protect this stall is by monitoring the battery voltage coming from VIN_SW on TPS62745 buck converter. A high priority task is run when the motor turns on. This monitoring task runs at 30ms period and when the battery voltage drop to a certain level that is 3.6 V then it will shut down the motor.

    From your suggestions, I will try to update the motor control logic by regulating the PWM's duty cycle when battery voltage hits certain level.

    1. Pardon me if this question is so simple. Is there a method to determine the best PWM frequency for a particular motor? Right now I'm just experimenting by changing it hard-coded on the source code. Do you have any rule of thumb about it?
    2. I think the method to current limit using PWM might work if the frequency fast enough to hold the motor at steady state. Please advise if my understaing about it is wrong.

    Thank you Hector,
    Pranata

  • I think I find a good reference here:
    https://www.precisionmicrodrives.com/content/ab-022-pwm-frequency-for-linear-motion-control/

    I will try to calculate and do the current control using PWM duty cycle (lets try from 20% to 100%) and see if the drop voltage on battery can be controlled.

    Regards,
    Pranata

  • Hi Pranata,

    I am not sure if you have a bulk capacitor in your PCB. If you are monitoring the battery voltage for the current threshold, note that you may have other loads in your system that pull current and a bulk capacitor provides instantaneous current for the motor. Hence, if you have a bulk cap, monitor the current after the capacitor.

    The criteria for selecting the best PWM frequency is based on use case. In most cases 20 to 40kHz is desired to get out of the audible band and minimize switching losses. In other cases, it is important to PWM in the audible range so people can hear the motor. It really depends on what is required on the end application.

    The important thing about the current regulation is that you need to keep it below the current limit you need to not pass. So you can determine through testing what PWM duty cycle you need to be on when the current limit is passed.

  • Hi Hector,

    Thanks for the heads-up regarding the current. Yes the board has bulk capacitor on the batteries before the input to buck converter. I will check the schematic again just to make sure if it is measure after the capacitor.

    Got it about the PWM frequency. I will experiment based on your suggestions and advise. Let me close this thread.

    Thank you,
    Pranata