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.

DRV8701: Reading motor current on DRV8701

Part Number: DRV8701

Tool/software:

Hello 

I'm using DRV8701 and i want to read the motor current using ADC on my MCU. /

Currently we drive the motor using fast decay (motor coasting). The datasheet specifies that SO is not valid during brake mode, i assume the SO is not valid during motor OFF (while coasting)? 

Should i read the SO only during the PWM on phase?

  • Hi Alexandru,

    Thanks for your post.

    The datasheet specifies that SO is not valid during brake mode, i assume the SO is not valid during motor OFF (while coasting)? 

    Should i read the SO only during the PWM on phase?

    Yes, correct. You should read the SO only during the "drive" phase of the output to measure the actual representation of the output current. See below figure from the datasheet. When SNSOUT pin is low SO is not valid. Thank you.

    Regards, Murugavel 

  • I understand that the current is not valid when the SNSOUT is low. From my understanding SNSOUT is low when the current is chopped. My question is if the SO pin indicates a valid current reading when the SNSOUT is high but the motor is in OFF phase of the PWM while using fast decay. In other words, does the SO indicate a valid reading while the motor is coasting without being current limited by the driver? 

    I regulate current using a control loop in software, my Vref is set so high that the driver would rarely enter the Ichop mode. I would like to know when to read the SO for most accurate current reading. Currently i use continues ADC sampling and i avg out the readings but i think this can be improved.

  • Hi Alexandru,

    My question is if the SO pin indicates a valid current reading when the SNSOUT is high but the motor is in OFF phase of the PWM while using fast decay. In other words, does the SO indicate a valid reading while the motor is coasting without being current limited by the driver? 

    While the motor drive is OFF and the bridge is in coast (HiZ) there won't be any current flow in the polarity shown in the below snippet. The SO would register an output corresponding to 0 current via the sense resistor. 

    I regulate current using a control loop in software, my Vref is set so high that the driver would rarely enter the Ichop mode. I would like to know when to read the SO for most accurate current reading. Currently i use continues ADC sampling and i avg out the readings but i think this can be improved.

    Our suggestion would be to sample SO during PWM ON time only. 

    Currently i use continues ADC sampling and i avg out the readings but i think this can be improved.

    Yes, especially the zero values pulling the average down can be excluded and the remaining samples would be a better representation of the motor current. Thank you.

    Regards, Murugavel  

  • Thanks for the response, this has solved my question. 

    I think i will phase out the low ADC readings and maybe somehow take in account the motor duty when calculating the avg motor current for the sampled time.