JRK current draw Issue when changing directions

I’m using the JRK (pololu.com/catalog/product/1107.) I have a 10k pot wired up to it for analog control, with the PID control turned off. Additionally, I set the acceleration to 1, max is 600.

I’m running into the issue that the switching power supply I’m using (mpja.com/prodinfo.asp?number=16918+PS) throws an internal fuse when I change directions, this only happens if the motor is initially spinning quickly in one direction, and I move the pot past its neutral point so that the system will run in the other direction. This doesn’t happen if the motor is running at low speeds, I can move the pot back and forth over the neutral point with no problem at all.

I played around with different software settings but couldn’t seem to resolve it. Do you have any suggestions? It seems like it shouldn’t happen if I have the acceleration set to 1. I would expect the system to ramp down and then ramp back up slowly, since it works well at low speeds. But instead the fuse is triggered the second I turn the pot over it’s neutral point (~2.5V) quickly. I’m wondering if there is maybe a bug in the acceleration algorithm.

Do you have any suggestions as a temporary fix? Putting a power resistor or a large inductor in series was suggested to help prevent surges. Any other thoughts?

Additionally, I noticed that my pot (linear rotary) drives to the max/min over a very small physical range. I have the on board 5V and GND wired to the pot, so I assume this is the correct power supply. In other words, the board’s sensed position goes from 0-4095 while the pot turns from its 100-200 degree range. The 0-100 and 200-300 degree range is saturated.

John

The Jrk’s acceleration limit parameter only limits the increase of motor speed, not its decrease. The “Motor Options” section of the user’s guide says:

Max. acceleration limits the amount that the duty cycle can change by in a single PID period. For example, if there is an acceleration limit of 10 in both directions, and the current duty cycle is 300, then the duty cycle in the next PID period is limited to be within -10 to 310.[/quote]

So even with your acceleration limit of 1, the jrk can go from a duty cycle of say 400 (out of 600) to a duty cycle of -1 on the next PID period, -2 on the next period, -3 on the next period and so on. This means that the jrk will be driving the motor in a direction that opposes its inertia. The stall current of the motor is 5A and your power supply only provides 3.33A so this could break the fuse.

To avoid this problem, try setting the “Brake Duration” parameter to something non-zero. Then, instead of going from 400 to -1, the jrk will operate at a duty cycle of zero (actively braking the motor on the jrk 21v3) for the amount of time specified in the brake duration parameter before it switches directions. While the duty cycle is zero, the motor will slow down due to the braking, but it can not draw any current from the power supply.

Regarding your input: If the output voltage on your pot doesn’t change in the ranges 0-100 degrees and 200-300 degrees, then there is nothing the we can do to fix it, but it seems unlikely that the pot would be designed that way. Have you looked at a graph that shows Input, Target, and Duty cycle while your turn the pot through its full range of motion? What are your input scaling settings? To get the input working nicely in your system, you should change the Input Scaling parameters so that the max input value (~4095, 5V) gets scaled to a target of 2648 (duty cycle +600, full forward), while the min input value (~0, 0V) gets scaled to a target of 1448 (duty cycle -600, full reverse).

-David

Having no deceleration/accelation ramp when reversing directions is non-optimal from the mechanical standpoint, this could cause really a high torque that could cause shearing, and other mechanical failures.

Since I’m not in PID control mode, it would be nice if the voltage was just increased/decreased at a steady rate using the MCU’s clock and a gain in the JRK configurator (which is what I originally assumed would be the case.)

I watched the current on a multimeter and it doesn’t seem to spike, instead it seems to drop down to 0 momentarily, that being said maybe it spikes but the spike is faster then my meter can sense. Maybe its the back EMF that causes the issue.

With regard to the pot, 3.3V or greater shows as Input = 4095. Any voltage below 1.7V shows as Input = 0. So the scaling doesn’t get me very far.

How odd. We use a variety of industrial motor controllers in my lab, and every one that offers acceleration control uses that same acceleration setting for deceleration as well. I would have assumed that was how the JRK was supposed to work as well. For robotic applications I can see how it would be desirable to have it both ways, either smooth deceleration or immediate hard braking. Maybe a future firmware update could give you the option (separate deceleration parameter, immediate brake command, something like that).

-Adam

P.S. This new line of Pololu products based on the USB-enabled PICs looks awesome (not to mention small and inexpensive), and the configuration programs are gorgeous. Looking forward to playing with my black Friday Micro Maestro!

Hi just an update, I grabbed a couple power supplies that were laying around that could handle up to 6A, and the issue was resolved. I definitely agree with Adam, a firmware update to give some acceleration/deceleration mode options would be great.

I was reading the target value and not the input value by accident, so the remapping of the pot resolved that issue. Sorry about the confusion there.