Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Feedback from Jrk 21v3 with Python


I see in the Users’ Guide for the Jrk 21v3 that I can use Python’s GPIO.PWM to control my linear actuators with a frequency of 20khz and a duty cycle of -600 to 600, but how do I get feedback from the controller using Python?



It sounds like you might be misunderstanding the information in the jrk user’s guide. The jrk does not accept duty-cycle PWM signals as an input. The jrk supports an analog voltage input, RC hobby signals, TTL serial signals, and USB control.

If you are using a Raspberry Pi, you could daisy-chain the 3 jrk controllers and have the first jrk in the chain connected to the Raspberry Pi either by USB (or through the TTL serial pins). Information about how to daisy chain the jrk controllers can be found in the “Daisy-Chaining” section of the jrk user’s guide. To command each jrk in the chain individually, you will need to change the device numbers for each to unique values. Then you can communicate with the jrk via serial using the Pololu Protocol commands explained in the “Using the Serial Interface” section of that same guide. You can find the command for reading the feedback in the “Variable Reading Commands” section.

We do not have any specific examples that use Python with the jrk, but this writeup uses a Raspberry Pi to control one of our Maestro servo controllers (which use a protocol similar to the jrk’s but with different commands), so you might consider using that as a starting point.