Detecting stalled rotor with DRV8833

Hi folks!

Embarking on my first motor project to replace the factory controller in a small toy dinosaur with an arduino. The toy has five brushed DC motors providing locomotion and various effects. Each of the motors operates a small geared actuator and all have stops in each direction (e.g. the output side of the gearbox only moves 90 degrees or so before hitting a stop).

I ordered a handful of the DRV8833’s to get something on the way, but I’m interested in some thoughts on using them. Essentially I need to be able to determine when to change direction when the motor has reached the end of its travel.

One thought was to use the ADC in the arduino to monitor the driver, probably at the current sense (with appropriate resistor in place) but potentially at the output side as well. If that doesn’t work I was thinking of calibrating each motor by running it into the stop at one end of travel for 1-2 seconds at boot and just use blind timing from that point forward.

Any suggestions?



It might be possible to monitor the current to detect when the motors are in a stall condition and adjust appropriately using a DRV8833 (with the indicated traces cut and sense resistors added) and an Arduino. However, I would generally recommend against stalling motors as much as possible. Stalling DC motors can be rough both mechanically and electrically on the motor and could easily lead to damage.

Do you know how the toy originally operated? Some toys might have built-in slip clutch mechanisms that prevent the motor from actually stalling. An alternative solution might be to use some kind of limit switches to know when the motors reach an end point.


Great info, thanks Brandon!

The dinosaur is like this one:

I tried driving the motors with my power supply and it will just sit there and pull full current once it hits the stops. I think I’ll be able to drive it mostly with a timed loop (walking, swinging tail, swinging head, jaw) only relying on the current sense if something happens that throws the phase of the timer loop out of the range of motion.

Limit switches are definitely an option as well, if this route doesn’t work that’s probably what I’ll do next. I wonder if i could wire them three-way-switch style to set the inputs on the driver (who needs pwm, pedal to the metal). :slight_smile:

Thanks again!