G2 24v19 "current sense output" to sense a stopped motor


I have a motor controller driving 2 simple 12v dc motors. The interface is via CanBus and getting this to work with a PC has had some issues. The OEM is not interested in helping me retrofit their product.

My idea was to replace the controller with 2 Pololu G2 24v19’s over USB. The only real issue i am having is that the original controller is actually able to sense when the motors hit their stops due to the current spike and after that only allows you to reverse the motor. From what i can see this would not be a standard feature for the 24v19’s. Is there a way to use the “current sense output” and if it exceeds a to be determined value it will stop movement and only allow the motor to be reversed(or vise versa).


The Simple Motor Controller (SMC) G2 does not have a feature like that. You can set a current limit threshold that will cause the motor driver to use current chopping to actively limit it, but it will not prevent you from moving the motor in that direction again. you might be able to read the current variables using the get variable command and write your own handling for disallowing the motor to move further in that direction. You can find more about the available variables in the “Controller variables” section of the Simple Motor Controller G2 user’s guide; the “Current limiting and measurement” is at the end of that section.

However, please note that we typically do not recommend using a stall condition to detect the end of your range of motion. Stalling a brushed DC motor can quickly damage it and can potentially put a lot of stress on the gearbox and the electronics. Instead, you might consider using limit switches. The limit switch feature on the Simple Motor Controller G2 will prevent the motor from running in the configured direction when the switch is triggered. You can find more information about this option in the “Configuring a limit or kill switch” section of the same user’s guide.