Hello everyone! ![:slight_smile: :slight_smile:](https://forum.pololu.com/images/emoji/twitter/slight_smile.png?v=5)
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: :frowning:](https://forum.pololu.com/images/emoji/twitter/frowning.png?v=5)
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: :slight_smile:](https://forum.pololu.com/images/emoji/twitter/slight_smile.png?v=5)
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: :frowning:](https://forum.pololu.com/images/emoji/twitter/frowning.png?v=5)
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:
- Itās easy to get the robot to follow a straight line, but the turns are where you will have trouble.
- If your robot veers too far to the left during a right turn, you might need a higher proportional or derivative term.
- If your robot kind of oscillates back and forth after taking a turn, you need a higher derivative term.
- 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: :slight_smile:](https://forum.pololu.com/images/emoji/twitter/slight_smile.png?v=5)