Go to Post sometimes you have to dig through the trash and clean off the layers of dirt and grime in order to find diamonds in the rough. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #1   Spotlight this post!  
Unread 01-07-2013, 11:08
TRWSHSHLX TRWSHSHLX is offline
Registered User
AKA: Henry Lei
no team
 
Join Date: Jan 2011
Rookie Year: 2008
Location: OR
Posts: 71
TRWSHSHLX is an unknown quantity at this point
Re: FTC: Using the Hitechnic SuperPro Prototype Board

Quote:
In all my years of coaching ftc, the tetrix encoders could give accurate readings in some matches and completely wring the next match.
"Completely wrong" as in no pattern at all or +/- a few inches up to a feet?

One suggestion is don't draw too much power from the motor controllers at once (like putting full throttle on a six motor drivetrain instantaneously) since that does in fact mess up the encoder count.
__________________
  #2   Spotlight this post!  
Unread 01-07-2013, 11:42
Andrew Lobos Andrew Lobos is offline
FTC4977/FRC225 Alum
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 59
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: FTC: Using the Hitechnic SuperPro Prototype Board

Quote:
Originally Posted by TRWSHSHLX View Post
One suggestion is don't draw too much power from the motor controllers at once (like putting full throttle on a six motor drivetrain instantaneously) since that does in fact mess up the encoder count.
This happens because the encoder counts are stored and read from the motor controllers - if they loose power (or brownout), the count will reset.

My FTC team used encoders to achieve infinite rotation on our swerve drive last year, and we had no issues with the encoders returning the wrong position.

A few more questions -
How old are the encoders you're using? Some of the older packages they made used adhesive backing, which I've seen come loose.

When deciding the encoders are returning incorrect values, are you looking at the value itself, or just seeing the results of an action using the encoders? If you are observing the robot driving different distances, but the encoder values are consistant, your issue may be rooted in how your code decides it is "there".
  #3   Spotlight this post!  
Unread 01-07-2013, 17:50
Mr. 1033's Avatar
Mr. 1033 Mr. 1033 is offline
Registered User
AKA: Paul E. Lathrop
FRC #1033 (Team CLUTCH)
Team Role: Coach
 
Join Date: Jun 2012
Rookie Year: 2003
Location: United States
Posts: 40
Mr. 1033 is a jewel in the roughMr. 1033 is a jewel in the roughMr. 1033 is a jewel in the roughMr. 1033 is a jewel in the rough
Re: FTC: Using the Hitechnic SuperPro Prototype Board

Can you guys show some sample code?

When I say "its random" I mean when they enter autonomous mode sometimes the robot moves correctly, other times it never stops moving, sometimes it moves the opposite direction, and sometimes it barely moves.

Many of my teams use LabView and they always include a "reset encoder" module block before and after every move forward segment of code.

I'd love to iron out these issues and be able to communicate them back to other coaches who are also frustrated about it.

Has anyone used the IR sensors attached to the prototype board rather than the IR sensor from hitechnic?
  #4   Spotlight this post!  
Unread 01-07-2013, 18:01
TRWSHSHLX TRWSHSHLX is offline
Registered User
AKA: Henry Lei
no team
 
Join Date: Jan 2011
Rookie Year: 2008
Location: OR
Posts: 71
TRWSHSHLX is an unknown quantity at this point
Re: FTC: Using the Hitechnic SuperPro Prototype Board

I don't have access to LabView or RobotC currently but the pseudo-code should be:
Code:
reset encoder;
while (encoder<some_value) //assuming positive is forward
{
  motors go forward;
}
motors stop;
Quote:
sometimes the robot moves correctly, other times it never stops moving, sometimes it moves the opposite direction, and sometimes it barely moves.
All of the possibilities above might be related to an encoder problem except moving in the opposite direction. Referring to the pseudo-code above, the motors only go one way (forward). If your teams and other teams are using built-in functions or blocks, then it might be possible that the "block" is not setup correctly (like negative encoder count is forward but a positive encoder count is used hence never reaching the value).

The code above has no feedback control and with a reliable reasonable drivetrain, it should consistently be +/- 1 in. per 2 feet.
__________________
  #5   Spotlight this post!  
Unread 01-07-2013, 18:27
Mr. 1033's Avatar
Mr. 1033 Mr. 1033 is offline
Registered User
AKA: Paul E. Lathrop
FRC #1033 (Team CLUTCH)
Team Role: Coach
 
Join Date: Jun 2012
Rookie Year: 2003
Location: United States
Posts: 40
Mr. 1033 is a jewel in the roughMr. 1033 is a jewel in the roughMr. 1033 is a jewel in the roughMr. 1033 is a jewel in the rough
Re: FTC: Using the Hitechnic SuperPro Prototype Board

Ok. I'll see if the robot c team have the same in their code.

Is there any way to get more precise/repetitive than +/- 1in per 2 feet?
  #6   Spotlight this post!  
Unread 01-07-2013, 20:23
TRWSHSHLX TRWSHSHLX is offline
Registered User
AKA: Henry Lei
no team
 
Join Date: Jan 2011
Rookie Year: 2008
Location: OR
Posts: 71
TRWSHSHLX is an unknown quantity at this point
Re: FTC: Using the Hitechnic SuperPro Prototype Board

Quote:
Is there any way to get more precise/repetitive than +/- 1in per 2 feet?
Yes. Usually with the aid of software feedback control with the famous example being PID. However, just tuning and maximizing the consistency of the drivetrain, battery power, and having a ramping up / down function (to minimize slippage / skid) will be significantly easier and beneficial overall as it will help not only autonomous but also tele-op performances.

Also, in most scenarios +/- 1 in. is more than enough since the field usually have different elements (such as taped lines / walls / IR sensor) to "reset" the robot. With "advanced" implementation techniques (such as mounting the IR sensor on a servo, having multiple IR sensor from different angles, etc.) the IR sensor can be extremely beneficial; even just directly polling from the IR sensor and drive till a certain value is reached is accurate, as long as there is a shield to block out ambient light.
__________________
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 06:58.

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