Go to Post Why is it OK to be "elitist" when we select people to be on a team to hit rocks with sticks, but not OK when we try to reach the special group of students that embody the intellectual capital that will define the future of this country? - dlavery [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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
  #4   Spotlight this post!  
Unread 04-12-2015, 18:18
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: 6,988
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: How to use encoders

Quote:
Originally Posted by pribusin View Post
My team has never used encoders.
Encoders are scary at first, but really are not difficult. Basically, an encoder of the type I think you have (you don't state it, but connected to a TB is likely a US Encoder) gives out X number of pulses for each revolution, from 2 different outputs. You count pulses to determine movement, limited by the number of pulses per revolution*

2 outputs allow you to determine direction, not just movement.

Counting the pulses and comparing that to time allows you to determine speed.

It is possible to count the pulses, including the direction information, and know the absolute position of the arm. I think a Potentiometer may be a better choice, however, since it is better suited to position sensing because of its greater sensitivity to small movements and its lack of dependence upon counting (which, if fouled up, becomes inaccurate). Also, see the * note for a discussion of resolution. A potentiometer is also simpler to program, since it uses an analog input, the voltage being related to the arm position. The downside is you mount it on the arm, not the gearbox.

As for programming, there is sample code as others mentioned, but basically you count pulses and keep track it them. I can't help you with Talon programming; I suggest you use the Talons as motor controllers only until you get some experience, since LV is more easily troubleshot.

*If you have an encoder that delivers 128 pulses per revolution (PPR), the best you can get is to detect 1/128th of a revolution. This may limit what you can accomplish.
2 outputs are not in-phase with each other, but they are digital pulses, so if one output signals before the other, you are sure it is going in one direction, and if the other output signals before the first, then it is going in the other direction. This works pretty well, by the way.

Try things, explain the problems encountered here, we'll help.
__________________

I am N2IRZ - What's your callsign?
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 05:01.

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