Go to Post A robot with hands would be cool! - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 13-01-2012, 18:47
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,946
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: Motor speed control uning Jaguar

Quote:
Originally Posted by jwakeman View Post
Another thought I had was to wire in both the PWM and the CAN. Then only use the CAN bus to control the robot. The PWM would be there as a failover drive system.
R61 B says if you are using PWM then you cannot have anything in the other ports which includes canbus

R61 A also would prohibit the PWM connection if you are using canbus since there is no way for you to turnoff the PWM signal.

I expect if you tried to do it the Jag would default to one ignoring the other completely.

The Jag firmware 101 (another thread) seems to have fixed an issue with the canbus. A trashy signal use to take the Jag offline until a power reset. It now will try to reset itself.
  #17   Spotlight this post!  
Unread 20-01-2012, 19:37
mbushroe mbushroe is offline
Registered User
FRC #2840
 
Join Date: Jan 2009
Location: Phoenix
Posts: 16
mbushroe is an unknown quantity at this point
Re: Motor speed control uning Jaguar

I have downloaded the specs for the Black Jaguar to research exactly that question. The spec sheet claims 1 million transitions per second. So the 250 counts per revolution is 4 transitions per line, so 1000 transitions per second. That means that it should handle 1,000 revolutions per second, or 60,000 RPM.

My problem is getting a feedback signal to the Jaguar. Currently I have a left over magnetic encoder, but so far the Jaguar has refused to display a speed or position signal from the magnetic encoder output, which means the PID just ramps up until the Jaguar limits out.

Mike


Quote:
Originally Posted by Jared341 View Post
Regarding speed sensors: An encoder is a good fit for this task. However, keep in mind how fast your wheel will be spinning.

Let's say your shooter is powered by a CIM and a 1:1 ratio. You will see ~5000rpm speed on the shooter wheel.

5000rpm is 83.3 revolutions per second. If you use the kit of parts encoders (250 counts per rev), that is more than 20,000 counts per second. In theory, the FPGA can count upwards of 39,000 counts per second. So this arrangement would work if you are doing speed control on the cRIO, but if you wanted to go to, say 10,000rpm on the shooter wheel, you would want a lower resolution encoder. I am not sure about the capabilities of a CAN Jaguar when it comes to maximum encoder rate.

In 2006, we made our own encoder by using an IR reflective sensor (like the ones Banner or Rockwell makes) with strips of reflective tape on the shooter wheel to trigger the counting. This method would of course work in 2012, as well.
  #18   Spotlight this post!  
Unread 20-01-2012, 20:03
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,599
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Motor speed control uning Jaguar

Quote:
Originally Posted by mbushroe View Post
My problem is getting a feedback signal to the Jaguar. Currently I have a left over magnetic encoder, but so far the Jaguar has refused to display a speed or position signal from the magnetic encoder output, which means the PID just ramps up until the Jaguar limits out.
What is the interface of the magnetic encoder? Most I'm familiar with are an analog interface that isn't compatible with the jaguar.
  #19   Spotlight this post!  
Unread 24-01-2012, 16:46
mbushroe mbushroe is offline
Registered User
FRC #2840
 
Join Date: Jan 2009
Location: Phoenix
Posts: 16
mbushroe is an unknown quantity at this point
Re: Motor speed control uning Jaguar

That would explain the problem. The magnetic encoder I am using generates 2 analog signals that are in quadrature. I thought that the Jaguar could handle that from some of the documentation, but perhaps not. I also tried using the digital Index pulse only, but so fat have not gotten that to work.

The 5/16 inch bore digital encoder should arrive today, and I will try again with that.

Mike
  #20   Spotlight this post!  
Unread 24-01-2012, 20:43
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Motor speed control uning Jaguar

Quote:
Originally Posted by FrankJ View Post
Rule 61 seems pretty clear to me. You can use either Can-Bus or PWM, but not both on the same Jaguar.
I completely agree.

Now I wonder if you can run some Jags on CAN and other jags on PWM, on the same robot. The rules appear to not prevent this, so long as one OR the other is used, never both.

You definitely can't use both PWM and CAN on a single Jaguar. I'm not sure it would even work.


Encoders: This Thread has more info on the same topic.
__________________

I am N2IRZ - What's your callsign?
  #21   Spotlight this post!  
Unread 28-01-2012, 14:59
mbushroe mbushroe is offline
Registered User
FRC #2840
 
Join Date: Jan 2009
Location: Phoenix
Posts: 16
mbushroe is an unknown quantity at this point
Re: Motor speed control uning Jaguar

The larger shaft size digital encoder arrived finally, and I got it mounted. Using 2 lantern batteries, and they frequently over current/under volt and crash the Jaguar, requiring a full reset and start from scratch (Note to TI developers, please PLEASE add a save current configuration so that we don't have to reenter EVERYTHING after each reset?).

As long as there were no sudden jumps, it works on digital using the 'encoder' input. I did have to swap the motor leads. I am not sure if 'encoder inverted' would work as well. I also found that at low rpm, like below 100, the TI firmware does not handle speed measurements correctly. Each encoder pulse causes a sudden huge jump up in speed, causing the PID to immediately stop or even reverse (and cause weak batteries to under volt and crash the Jaguar), then go back to zero and let the PID integrate back up. An integration term of 0.0002 is too small to affect the output, 0.003 will ramp up a volt or two per second. With a 15Khz PWM rate, the PID equations may be run at the same speed, and long gaps of time steps with no encoder pulses confuse the firmware. Instead of measuring time between pulses to handle slow speeds, I think they are counting pulses per time period and doing some averaging. All this really means is that direct shaft connection to a drive wheel may require a VERY high line per revolution count, but high motor speeds should be ease to work with. I got up to 1700 rpm before the batteries lost it, and logging 20 times a second and it was stable to a few rpm.

The next big problem is that the WindRiver user's guide has sections for serial and I2I interface, but they are blank, no text. And looking in the code files, there are blocks for Jaguar (PWM mode only), Victor, PID (software version only), serial interface (raw interface), PWM, but nothing that uses the serial interface to control the internal PID in Jaguar. Does anyone know where there is code interface between the cRIO and the Jaguar in C++?

Mike
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 15:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi