|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Wheel encoder to Jaguar Wiring
Hi Gang,
Has anyone had success wiring a US Digital quadrature encoder to the PID input on a Jaguar? If so, what wiring did you use? The Jag has 5 lines, +5, A, B, I, Gnd. Are the A & B the same A & B from the US Digital? And, do you just ignore the I input on the Jaguar? Once that was done, what PID values did you use to close the loop? TIA, Mike |
|
#2
|
|||||
|
|||||
|
Re: Wheel encoder to Jaguar Wiring
Quote:
|
|
#3
|
||||
|
||||
|
Re: Wheel encoder to Jaguar Wiring
Thanks, that's what I thought. But, I've been completely unsuccessful at closing the loop with the Jaguars and a Mechanum drive. It seems to work OK at very high speed, but I get a lot of backlash at low RPMs. I've tried tinkering with the PID values, but I just can't seem to get a set that even comes close. I'm having better luck with running the encoders to the DS. But, they eat up my DIOs something fierce with 2 DIOs/wheel. I was just trying to see if I'd missed something obvious.
Thanks, Mike |
|
#4
|
||||
|
||||
|
Re: Wheel encoder to Jaguar Wiring
You can use the BDC-COMM application to quickly and easily make sure the encoders are hooked up correctly. Simply hook your computer up to the Jaguar, connect the program to it, and spin the wheel by hand - you should see the encoder counts change. We did that when we were trying to figure out our PID loop a while back.
Or you can get your code to periodically report the speed/distance of the wheels to show how it's working. |
|
#5
|
||||
|
||||
|
Re: Wheel encoder to Jaguar Wiring
We did that too. Everything looked good. But, when you tried to get it to actually work in motion, the wheels started to chatter terribly. It's possible that there was some issue with a couple of the gear boxes. But, there was just no joy :-(. Even when we tried just a P with not I or D, we couldn't get the system to stabilize.
Thanks, Mike |
|
#6
|
|||||
|
|||||
|
Re: Wheel encoder to Jaguar Wiring
kP/gain/Proportional: This does most of the work. The output is proportional to the difference between what you want and what you have. output = (setpoint - process_variable)*kP, also known as gain
kI/Integral: This integrates the error over time, multiplies it by kI, and adds it to the output. Be very careful with this one, you should need a very tiny bit (a decimal with at least 2 0's in front of the digit seems about right). Too much and you will overshoot. Because of how it is designed, it will not stop applying power until it overshoots and unwinds the integral. kD/Derivative: This takes the curve of the past action and accounts for momentum. The faster you have gone, the more this works to slow you down. This is always working against proportional. you might not be "tinkering" with the PID values enough. Try setting kI and kD to 0 and then tuning kP. If it overshoots too much or oscillates, then turn it down. If it dosen't, increase it till it does and dial it in to the perfect number. You probably don't need kI and kD. To give you an idea of scale, my inputs are all scaled to inches/second and the gain is 0.01. I did my math on the cRio (using Victors for output). |
|
#7
|
||||
|
||||
|
Re: Wheel encoder to Jaguar Wiring
Hmm... OK, we tried that. Setting kI & kD to 0 and then trying kP at anything > than .8 caused really bad results (back chatter of wheels) at low RPMs. I have to admit that I'm at a bit of a loss as to what's going on. If I have the kP at .35 and kI=0, kD=.003, it runs well at higher RPMs, but doesn't even come close to max voltage according to BD_COMM. Maybe at IRI I can find someone who's using Jaguars to close the loop and they can enlighten me as to what's going wrong.
Some folks are just saying that the Jags just suck. I'm inclined to give the Jags the benefit of the doubt until I talk with others. Thanks, Mike |
|
#8
|
|||
|
|||
|
Re: Wheel encoder to Jaguar Wiring
What is the Jaguar firmware. Since you indicated you used BDC-COMM, this should be available to you.
|
|
#9
|
||||
|
||||
|
Re: Wheel encoder to Jaguar Wiring
We were using Rev 89 firmware. I just updated them to Rev 91. Where there problems related to the encoders in Rev 89?
Thanks, Mike |
|
#10
|
||||||
|
||||||
|
Re: Wheel encoder to Jaguar Wiring
Quote:
|
|
#11
|
||||
|
||||
|
Re: Wheel encoder to Jaguar Wiring
It figures... That's what we get for not paying much attention to CD lately. I'll give the Jags another try after IRI.
Thanks, Mike |
|
#12
|
|
Re: Wheel encoder to Jaguar Wiring
If you still have access to the robot, can you tell us what BDC COMM says for speed when you apply +12v (or +100%) to the motor?
Also, have you set in BDC COMM the number of lines per rotation (360 for this year's encoder, I believe.) ? |
|
#13
|
|||||
|
|||||
|
Re: Wheel encoder to Jaguar Wiring
250 for the kit encoder from 2009, 360 for 2010.
Last edited by Jared Russell : 14-07-2010 at 14:09. |
|
#14
|
|||
|
|||
|
Re: Wheel encoder to Jaguar Wiring
It probably doesn't hurt to suggest that you probably also want to get the latest BDC-COMM.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Quadrature Encoder Wiring to Digital Sidecar | CrashOverride | Electrical | 7 | 23-06-2010 15:32 |
| CAN Jaguar Enable Control .vi Initial Encoder Position | TonyP | CAN | 0 | 26-02-2010 19:23 |
| Encoder Wiring! | RKElectricalman | Electrical | 2 | 10-02-2007 23:15 |
| encoder wiring | karin l. | Motors | 3 | 07-02-2007 00:14 |
| Encoder Wiring Quesiton | evileye917 | Electrical | 2 | 15-06-2005 15:14 |