Go to Post Just the fact we were selected to compete in the eliminations energized the kids more than anything I had seen - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 01-03-2013, 20:46
AsianRookie AsianRookie is offline
Registered User
AKA: Steven/Tim
FRC #0321 (Robolancers)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2007
Location: Philadelphia
Posts: 31
AsianRookie is an unknown quantity at this point
Re: Encoder getRate question

Quote:
Originally Posted by F22Rapture View Post
Nope. DistancePerPulse is the distance in units that your robot travels, per pulse. So what you need to do is take the circumference of your wheels and divide that by the resolution of your encoder (usually 360 or 250) to give you the distance that your robot will travel forward for every "pulse" of the encoder.

So if you're using 6" wheels, that would give you a circumference of ~18.85 inches. For every turn of your robot's wheels, your robot will travel roughly that distance. So you take the number of pulses per revolution of the encoder, and divide 18.849556 by that number, to give you the distance per pulse of the encoder.

I don't think gear ratio factors into it, since I'm 99% sure the encoder shaft is linked to the output shaft rather than the input gears. This can be fairly trivially tested though I suppose. Or just look up the gearbox manual.
Well, the encoder is on a different shaft than the motor because we didnt have a way to mount it directly to the motor shaft. Thanks for the clearing though.

Quote:
Originally Posted by Ether View Post
You do not want to use getRate() with a 360 CPR encoder with 4X decoding at shooter wheel speeds.

Do this instead:

1) Connect only Channel A of the encoder to the DSC, and use an up/down counter (from the Counter class) set to count up only. Leave Channel B disconnected.

2) Set the FPGA sampling ring buffer size to 120.

3) Use the counter class's getPeriod() to get the period, then calculate rpm = 60/(360*period)
Thanks for the tip, I will try that when I get in my school on Monday.
Reply With Quote
 


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 12:57.

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