I Do Not Understand how Current Limiting in Datasheet works

I bought a Toshiba TB67H420FTG motor control board from pololu, found here.

I have read through the datasheet but I do not understand about the current limit control (among other things I might ask about later). I want to set a current threshold in the arduino program that shuts the motor off when a specific threshold value is hit.

I thought that I would measure the Vref as an analog input to the arduino and do some some math conversions to determine the current the motor is using. But after more reading and research, I now think that a person codes the Vref as an output to the driver board to start tell the driver when to start "chopping" the current (or power??).

I am unsure how this works. Can someone please explain? I want to stop the motor when a threshold is hit, but maybe I bought the wrong driver to do so? Or does the chopping stop it? My understanding of chopping is pulsing it to slow it down. Can a MOTOR STOP THRESHOLD be programmed in the driver itself by using the Vref or any other method?

As always, thanks for the wisdom you are about to impart on me!

Sounds like a great question for Pololu.

LO1, LO2 Error Output has over current flag.

I don't think you can do that. The shutdown is a hard limit is specified on page 17, parameter ISD, typical value = 6A.

Setting VREF can only be used to set a peak current below ISD.

If you want to have a programmable current shutdown limit, you will need a different IC.

any other method?
You can measure the motor current with an appropiate current sensor. Then cut power to the driver

Looking at the datasheet, my guess is that between the transistors and pin RSAGND and RSBGND resistors are placed. The voltage drop over each resistor is measured and compared to VREFA or VREFB, regulating the throughput down if necessary. The formula is given in the datasheet.

kmin

Yes I saw this. But I am unsure if it a preset flag, or if I can fine tune it to my preferences. And I also don't understand how to use it if I can fine tune it. If it is a preset value that I cannot change, it might burn out a motor.

bobcousins

So will adjusting the VREF change the hard limit? Is that what you are saying?

That is what I am starting to think...No big deal. For this particular piece of code I am writing, the overcurrent is probably not important. I am writing this code for practice to learn. I have an old linear actuator to control with it. I just wanted to include over current protection so I could put the motor in a bind and see if it stopped before it smoked!

jim-p

Yes I can certainly do that. Or maybe get another motor driver. In the near future I will do one or the other. I just meant any other method with THIS particular motor driver.

stitech

I saw those formulas in the datasheet before I bought the motor driver. That is how I thought I would control the overcurrent shutoff. But when I started to code it I went back to the datasheet to find the formulas and decided that my original thinking was incorrect. Which I still do think I was wrong.

cedarlakeinstruments

Yep...I think your right.

Read the data sheet. I expect it gives a signal if current is higher that set by Vref.
So it could be used as a trigger to turn motors off in your code.

LO1 Error output 1: drives low when an over-current or over-temperature fault occurs. Otherwise, the board pulls this pin up to VCC.

Changing the current setting is possible.

Simple answer is No

I am saying the exact opposite...a hard limit means it cannot be changed, it is built in to the driver IC. This limit, ISD, is designed to protect the driver IC.

VREF is a variable limit less than ISD, which is used to limit current to the motor, for the purpose of protecting the motor.

Thanks for clarifying. So using the VREF formulas I can set something similar to a "max acceptable current" and send that info to the motor driver. But without an external current sensor or different driver, it does not seem as if I can send a signal back to arduino that the threshold has been reached.

As already pointed out that is correct.

10-4. For now I am going to play around with what I have. I will start it out simple with just some directional control. Then add in some speed control. And at some point add in some current measurement. I have some old cheap gate openers with bad boards. Eventually I want to use the arduino to make some controllers. I want to install these in the pastures so my dad and uncle do not have to mess with the gates in icy weather.

Contrary to what @bobcousins thinks, I think there's only one over current detection system, controlled by VREF, and LO1 is pulled low when over current occurs.

Way I read that, you must monitor both signals. LO1 could indicate over current OR over thermal - you resolve which it is by the state of LO2.
In other words, it's four possible conditions are indicated by the two digital signals.

Yes, reading both outputs gives more info, but if you decide to read only LO1 it still indicates you're pushing the thing too hard.

Yes, but I was responding to your indication that it "shows overcurrent", which is not necessarily the case, thermal conditions might be such that the device is within current range, but unable to cool, which could confuse the user to no end - "but i know it's not overcurrent, I measured it". Think of a 7805 regulator with 12V input - it can suffer overheating well within it's 1.5A rating, if you do not heatsink it. That's all I was suggesting. Anyway, it's your game. Have fun.

Ok forgive the ignorance here.

If I digital read LO1 and it is LOW and at the same time digital read LO2 as HIGH, that means an overcurrent has been detected?

So can I use the VREF formula to set the max current?

No, it's controlled by the parameter ISD

You can also see on the block diagram ISDA/ISDB detection is not connected with VREF.