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ā€ (https://www.pololu.com/docs/pdf/0J38/jrk_motor_controller.pdf) and Section 5 (https://www.pololu.com/docs/0J38/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.

ā€“David

Hi, David.

I need to tune PID parameters in such program where I can see the accuracy of selected parameters on graphs: for example http://digital.ni.com/public.nsf/allkb/806F6F0B775FAF32862572FA0052F2AB?OpenDocument, http://zone.ni.com/devzone/cda/tut/p/id/6931.

I thought that jrk can help me. In https://www.pololu.com/docs/0J38/5 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.

ā€“David

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): pololu.com/catalog/product/979 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.

ā€“David

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.

ā€“David

Thank you, David.
In https://www.pololu.com/docs/0J21/7.c 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.

ā€“David

Hi, David

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