How connekt Pololu Jrk USB Motor Controller to 3pi Robot?

Hello everyone! :slight_smile:

I have read “Pololu Jrk USB Motor Controller User’s Guide” ( and Section 5 ( but I can’t understand how to connect Pololu Jrk USB Motor Controller to 3pi Robot :frowning:
Please, help me.
I want to tune PID parameters for this robot on it’s max speed.

Help, please

Hello, Sholom.

To tune the 3pi’s linefollowing PID parameters, you can just edit the program on the 3pi. A good starting point would be to see if you can compile the 3pi-linefollower-pid example in the Pololu AVR C/C++ Library and get it to run on your 3pi. Then you can try modifying it. You wouldn’t need a jrk.

The 3pi robot has its own processor and motor drivers built in; the only reason to connect a jrk to a 3pi is if you wanted to add a third motor to the robot.


Hi, David.

I need to tune PID parameters in such program where I can see the accuracy of selected parameters on graphs: for example,

I thought that jrk can help me. In the last example plot shows a well-tuned system. This is exactly what I need.
Уou suggest me to edit the program on the 3pi but I am not satisfied with the method of trial and error.
What advice?

Sorry for my English. I do not know it very well :slight_smile:

Many 3pi users don’t see a graph while they are tuning their PID constants but they still produce good results. If you want to make a graphing system, I would recommend getting a Wixel Pair + USB Cable and an m3pi Expansion Kit for 3pi Robot. You can use these items to make a wireless serial link to your computer. Then you would write a program on the 3pi that reports variables to the computer, and write a program on the computer that graphs the results. This would be a lot of work.

The jrk is not a good option because it is designed to to control only one motor, and it has no support for reading the QTR reflectance sensors on the 3pi. You would have to do a lot of tricky electronics work to get to the point where the jrk’s PID algorithm is controlling your 3pi, and once you get there it is not so useful because you would have to have a USB cable attached to your robot to debug it while it is following the line; the jrk has no feature for storing data and uploading it to the computer later.


Oh, thank you!

You recommend me to get a Wixel Pair + USB Cable and an m3pi Expansion Kit for 3pi Robot. But in shops of our country there are no such components.
Can I use Wixel Programmable USB Wireless Module (Fully Assembled): instead of them?

Thanks in advance

Yes, you could use those items instead, but you would also need some basic things like female headers and wires for making the connections, and resistors for making the voltage divider between on the 3pi’s TX line.

We do ship internationally so you could order directly from us.


I am limited in time and I have less than one month. So I can not order directly from you. Also shipping is expensive compared to the price of these Pololu components.
Would I need these basic things (female headers and wires for making the connections, and resistors) if I’ll have m3pi Expansion Kit for 3pi Robot and Wixel Programmable USB Wireless Module (Fully Assembled)? Electronics is not easy for me so [quote]…resistors for making the voltage divider between on the 3pi’s TX line.[/quote] is a problem for me.

I live in Ukraine, m3pi Expansion Kit for 3pi Robot I found in Russia. Wixel Pair I can’t found in our region :frowning:

No, the m3pi Expansion Kit contains all the hardware you need to connect a 3pi to a Wixel. It has the voltage divider built in. It doesn’t matter whether you get a Wixel pair + USB cable or just get two assembled Wixels; you should be able to find the required USB A-to-Mini B cable at a local computer store. Please note that with any of these options, you will need to know how to solder.

If you are limited in time, I think you really should reconsider your desire to graph the 3pi’s line following behavior. It’s a very cool idea, but once again, there is no existing software to support that, so you will have to write the 3pi firmware AND write a graphical user interface on the computer. I’m not sure how experienced you are in writing software, but even for an expert I think that it would take a LOT more time to build and debug that system than it would take to just manually tune the PID parameters by looking at the 3pi’s behavior and making changes to the code based on that.


Thank you, David.
In you wrote:

How do you achieve this? Ву: (?)

Can you give some basic rules for tuning the PID by which you are guided to achieve maximum speed of 255 on courses with 6"-radius curves?

I’ll be very grateful

It’s been a while since I’ve done that, and some people might correct me on this, but if I recall correctly:

  1. It’s easy to get the robot to follow a straight line, but the turns are where you will have trouble.
  2. If your robot veers too far to the left during a right turn, you might need a higher proportional or derivative term.
  3. If your robot kind of oscillates back and forth after taking a turn, you need a higher derivative term.
  4. The integral term usually isn’t needed.


Hi, David

I am very grateful for advices and answers to my questions. Thanks a lot :slight_smile: