Velocity control while stopped with Jrk

We have a robot that climbs a pole using 3 arms each with multiple DC gearmotors driving Urethane wheels. An Arduino Mega2560 receives commands from an RC controller and sends serial commands via Tx/Rx to 3 daisy-chained Jrk controllers. One motor on each arm is equipped with an encoder that is used to provide a digital frequency signal to the Jrk controller.

Sensors on the arm are used to detect if the robot is climbing off-center and used in a feedback loop (loop closed through the Arduino) to maintain the robot centered on the pole. When we push the throttle forward, the robot climbs and descends when we move the throttle in reverse. When we leave the throttle in the neutral position, we would like the robot to remain stationary on the pole. However, it appears the Jrk controller disables the speed control loop when the serial input is 0. What we want is that the Jrk will continue to drive PWM duty cycle (and therefore current) as required (subject to preset limits) so as to maintain the speed at 0 (and thereby maintain robot position on the pole). What we observe is that with a command of 0, the robot slowly descends due to gravity overcoming the gearmotor friction. If we command “+1” speed command, the robot will slowly ascend.

In a previous version of the robot, we used open-loop control of the drive motors and used a small positive command to the motor driver to maintain position. With closed-loop speed control, a non-zero positive command causes the robot to ascend (as it should). However a command of “0” should cause the robot to hold position, not disable the servo action.

Is there any way to have the Jrk maintain servo control with a command of “0” speed? For various reasons, it is not practical to either add brakes or use the Jrk in a closed-loop position servo.


Thank you for describing your system and the problem in detail. When the set target is 2048, the jrk does not have a good way of telling whether the encoder ticks are going forward or reverse, so it would not know which way to correct the motor output. The way the firmware on the jrk handles this case is by setting the duty cycle to 0 when the set target is 2048, which by default pulls both of the motor outputs low to brake the motor. Unfortunately, it sounds like the tachometer feedback on the jrk was not designed with this kind of system in mind, so I do not think it can do it properly if the weight of the robot pulls it down when the motors are braking.

By the way, your robot sounds really neat! we would love to see pictures and video of it; do you have information like that posted anywhere?