Go to Post At a much more pragmatic level, organization is what seperates a team full people with really cool unrealized dreams and a team that is trying to figure out it's alliance picks. - phrontist [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-09-2016, 13:59
RacerX's Avatar
RacerX RacerX is offline
Registered User
FRC #0948 (NRG948)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2013
Location: Bellevue
Posts: 26
RacerX is on a distinguished road
Encoder Question / Recomendation

Quick question on encoders and sensor from a mentor new to the encoder and sensor world.

We have an actuator arm that moves plus or minus 90 degrees. Our current set up from last season's game has a small encoder, I am guessing a US Digital MA3, mounted in the end of the hex shaft that rotates the actuator arm. The end of the hex shaft was drilled to accept the shaft from the encoder. During most of the year we seemed to battle the actuator arm not holding values, likely due to the encoder not being secured in its bracket, or slipping in relation to the hex shaft. As a last resort, everything was epoxied in place to try and maintain position. Unfortunately, things are still moving, so now is a good time to try something different.

If you had a hex shaft that was rotating an arm approximately 90 degrees, what would you recommend for an encoder or sensor, and how would you recommend attaching the encoder or sensor to the end of the hex shaft?

Any suggestions or recommendations are appreciated. Again, just trying to get up to speed as kids have graduated, and some mentors have moved along.

Thank you for your help,
Reply With Quote
  #2   Spotlight this post!  
Unread 14-09-2016, 14:00
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,499
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: Encoder Question / Recomendation

I have a fantasy where someone makes a Hex Bore encoder that is fully sealed and supported by bearings.

This would let pretty much any team put an encoder on any system w/o much hassle.

Really would be an encoder for the people.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-09-2016, 14:08
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is offline
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 822
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: Encoder Question / Recomendation

I'm a big fan of a 10-32 tapped hole in the end of the shaft, a 10-32 screw with loc-tite (or a lock nut) in it, and surgical tubing stretched over the screw on one end and the encoder on the other. If the encoder is mounted properly and not damaged, it should spin very freely and the surgical tubing grip is more than enough to ensure 1:1 rotation on the arm. The tubing also allows for some axial misalignment which is common on FRC robots.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 14-09-2016, 14:10
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,906
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: Encoder Question / Recomendation

For something moving less than a full rotation, I would use a potentiometer. It has the advantage of giving an absolute measurement. You still have the issue of having to lock the shaft and securely mounting the potentiometer body.
__________________
If you don't know what you should hook up then you should read a data sheet

Last edited by FrankJ : 14-09-2016 at 14:16.
Reply With Quote
  #5   Spotlight this post!  
Unread 14-09-2016, 14:11
bobbysq bobbysq is offline
Registered User
FRC #4646 (Team ASAP)
Team Role: Leadership
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 282
bobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud of
Re: Encoder Question / Recomendation

If it's only going to be moving 90 degrees, a potentiometer would probably work better for your purpose. You would also probably need to make an adapter of some sort to connect the potentiometer shaft to your arm, since they typically come with a round shaft with a flat slot.
Reply With Quote
  #6   Spotlight this post!  
Unread 14-09-2016, 14:24
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,259
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Encoder Question / Recomendation

Quote:
Originally Posted by Ty Tremblay View Post
I'm a big fan of a 10-32 tapped hole in the end of the shaft, a 10-32 screw with loc-tite (or a lock nut) in it, and surgical tubing stretched over the screw on one end and the encoder on the other. If the encoder is mounted properly and not damaged, it should spin very freely and the surgical tubing grip is more than enough to ensure 1:1 rotation on the arm. The tubing also allows for some axial misalignment which is common on FRC robots.
1/4-20 works too. I second this approach.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #7   Spotlight this post!  
Unread 14-09-2016, 14:40
RacerX's Avatar
RacerX RacerX is offline
Registered User
FRC #0948 (NRG948)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2013
Location: Bellevue
Posts: 26
RacerX is on a distinguished road
Re: Encoder Question / Recomendation

Thank you for the suggestions thus far.

Again, learning so excuse any dumb questions.....

Would a potentiometer have the same programming as the encoder? Would it always know where say zero degrees is and where 90 degrees is, and everything in between? Or, would we have to set zero each time?

I thought I heard something about that with different types of sensors???
Reply With Quote
  #8   Spotlight this post!  
Unread 14-09-2016, 14:41
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Encoder Question / Recomendation

Quote:
Originally Posted by RacerX View Post
Would a potentiometer have the same programming as the encoder? Would it always know where say zero degrees is and where 90 degrees is, and everything in between? Or, would we have to set zero each time?
You'll read the position of the potentiometer (pot) using the analog in. The output is 0-5 Volts (assuming you use the 5V source on the roborio). You'd have to calibrate it yourself for 0 degrees but after that it shouldn't change.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #9   Spotlight this post!  
Unread 14-09-2016, 14:46
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,738
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Encoder Question / Recomendation

for that use, I prefer a potentiometer, as it's the easiest for getting an absolute position reading out of. And if you set it up correctly, you can get it mounted without too much difficulty.

The key for mounting is planning ahead. You really just need to ensure that the hole in your mounting plate is aligned with the shaft. There are several ways to do this, depending on the exact situation, but I find it's easiest to get everything set up and then drill through everything all at once with a pilot hole, then use that as your center to enlarge everything to the sizes you need for shaft, bearing, potentiometer, etc.

After that, you just need to put a hole in the middle of the shaft with a lathe, if you have one. If not, surgical tubing does work great for joining those together!

May potentiometers also have a flat on one side of their shafts - this is a great place to locate a set screw, ensuring the shaft and potentiometer rotate together.

Many potentiometers are also designed for easy stable mounting, by having a small raised peg to one side of the shaft - you just need to drill a small through-hole for that, and the potentiometer won't move once it's mounted!


Whenever possible, I like to add limit switches to both extremes as well. It'll help make sure your arm doesn't tear itself apart if the potentiometer fails!
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #10   Spotlight this post!  
Unread 14-09-2016, 14:46
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,044
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder Question / Recomendation

Quote:
Originally Posted by RacerX View Post
During most of the year we seemed to battle the actuator arm not holding values, likely due to the encoder not being secured in its bracket, or slipping in relation to the hex shaft
What led you to conclude that the likely culprit was the sensor, and not, say, your controller?


Reply With Quote
  #11   Spotlight this post!  
Unread 14-09-2016, 14:47
AlexanderLuke's Avatar
AlexanderLuke AlexanderLuke is offline
Do More. Less Time.
FRC #0696 (The Circuit Breakers)
Team Role: Leadership
 
Join Date: Apr 2014
Rookie Year: 2013
Location: La Crescenta
Posts: 58
AlexanderLuke is a splendid one to beholdAlexanderLuke is a splendid one to beholdAlexanderLuke is a splendid one to beholdAlexanderLuke is a splendid one to beholdAlexanderLuke is a splendid one to beholdAlexanderLuke is a splendid one to beholdAlexanderLuke is a splendid one to behold
Re: Encoder Question / Recomendation

Quote:
Originally Posted by marshall View Post
1/4-20 works too. I second this approach.
I approve as well.

We have prototyped this method before, but have not battle tested it through actual competition.

Here is another recent thread on mounting encoders.
__________________
2014-Present ~ Team 696: The Circuit Breakers - Student Leader and President, Drive Coach, Mechanical Designer
Reply With Quote
  #12   Spotlight this post!  
Unread 14-09-2016, 14:51
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,738
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Encoder Question / Recomendation

Quote:
Originally Posted by RacerX View Post
Would a potentiometer have the same programming as the encoder? Would it always know where say zero degrees is and where 90 degrees is, and everything in between? Or, would we have to set zero each time?
programming is different. A potentiometer is an analog device. As you rotate the shaft, the voltage of the output changes incrementally. WPILib actually has a rather nice class (AnalogPotentiometer) that can be used for this - when you create the instance, you can specify the range of the potentiometer (They're sold as 270 degree, 360 degree, 3600 degree, etc) and an offset for where you want 0 to be. That way when reading values you'll get them right in degrees, positive or negative.

Oh, and another benefit to potentiometers... being analog devices, they're really easy to verify functionality with a multimeter!
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #13   Spotlight this post!  
Unread 14-09-2016, 14:51
RacerX's Avatar
RacerX RacerX is offline
Registered User
FRC #0948 (NRG948)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2013
Location: Bellevue
Posts: 26
RacerX is on a distinguished road
Re: Encoder Question / Recomendation

Quote:
Originally Posted by Ether View Post
What led you to conclude that the likely culprit was the sensor, and not, say, your controller?


Very good question. Unfortunately, I do not have a good answer as I was going with what others had said.

Trying to learn as quick as I can..... How best to check that, to confirm just what is the issue?
Reply With Quote
  #14   Spotlight this post!  
Unread 14-09-2016, 14:56
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,738
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Encoder Question / Recomendation

Quote:
Originally Posted by RacerX View Post
Very good question. Unfortunately, I do not have a good answer as I was going with what others had said.

Trying to learn as quick as I can..... How best to check that, to confirm just what is the issue?
That's an interesting question. The easiest way is to have your programmers write a little test program (or debug code in your real program) that spits out what angle it thinks the arm is at. Rotate the arm to one extreme and record the value somewhere, then rotate it to the other and record it. That gives you values for 2 fixed, known points of reference. Then drive around, play the game a while until you think things are off, and repeat the test. Are the values the same (or at least very close to the same), or are are they different?

Do that several times and you might notice a pattern that shows slippage in the system.

If, on the other hand, the values at the extremes stay the same but you notice the arm is "drooping" from where it should be, or oscillating around where it should be, that would indicate an issue with your feedback loop in maintaining the proper position, not an issue with the sensor.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #15   Spotlight this post!  
Unread 14-09-2016, 15:04
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,906
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: Encoder Question / Recomendation

I prefer the 360 to the 270 degree potentiometers. The 270 ones have a hard stop that can break in your mechanical guys are careless on the installation. On the 360 ones you have to be sure that the usable range doesn't include the 0 to 360 cross over. The other thing to watch for is the two types of potentiometer: linear and logarithmic. You want a linear one for positioning.
__________________
If you don't know what you should hook up then you should read a data sheet
Reply With Quote
Reply


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 17:13.

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