Go Back   VEX Forum > Official VEX Technical Support > UNOFFICIAL Answers - Ask the Community!

UNOFFICIAL Answers - Ask the Community! Community Members can provide UNOFFICIAL answers to the questions from the "locked" forum above.

Reply
 
Thread Tools
  #1  
Old 02-24-2012, 10:34 PM
Jacob Wall Jacob Wall is offline
Junior Member
VEX # 4770
 
Join Date: Oct 2011
Location: Kirkland, WA
Posts: 15
Question A potentiometer to encoder conversion in ROBOTC?

So, I've run into a slight problem with my team. We have a system with four motors, and we need to be able to synchronize those motors, however two are monitored by a potentiometer, while two are monitored by an encoder. I was wondering if there was a way to convert the output from the potentiometer and the encoder into some sort of common units, so we can perform the necessary calculations and apply them to the motor? How is the output of the potentiometer compared to the output of an encoder?
Reply With Quote
  #2  
Old 02-24-2012, 10:48 PM
magicode's Avatar
magicode magicode is offline
Senior Member
VEX # 4542
 
Join Date: Sep 2010
Posts: 608
Images: 8
Re: A potentiometer to encoder conversion in ROBOTC?

I don't have the answer, but you can find out pretty easily. Push a shaft through an encoder an a potentiometer at the same time. Then find out how much the potentiometer moved vs. how much the encoder moved. I've done this and it works nicely. The potentiometer may not be exactly linear, so depending on how precise you need this to be, you can turn it to several increments and check the values, or better yet, write a program to do it for you.
__________________
It's not a bug, it's a feature.
Reply With Quote
  #3  
Old 02-24-2012, 11:18 PM
devinc devinc is offline
Senior Member
VEX # 569C
 
Join Date: May 2010
Location: Murrieta,CA
Posts: 524
Images: 1
Re: A potentiometer to encoder conversion in ROBOTC?

please do not tell me this 4 motor system happens to be on a drive or on something that runs in more that 270 degrees. I have seen way too many people put a potentiometer on a wheel on their drive, and they always wonder why it won't work.
__________________
569A, B, & C Mentor
Reply With Quote
  #4  
Old 02-25-2012, 02:41 PM
MarkO's Avatar
MarkO MarkO is offline
Senior Member
 
Join Date: Aug 2006
Location: Albany, Oregon, USA, North Western Hemisphere, Planet Tera
Posts: 2,340
Images: 10
Re: A potentiometer to encoder conversion in ROBOTC?

Quote:
Originally Posted by devinc View Post
please do not tell me this 4 motor system happens to be on a drive or on something that runs in more that 270 degrees. I have seen way too many people put a potentiometer on a wheel on their drive, and they always wonder why it won't work.
I don't have the Vex Potentiometers, but if there like typical Potentiometers, they will Break, if Exceeded.

Quote:
Originally Posted by magicode View Post
I don't have the answer, but you can find out pretty easily. Push a shaft through an encoder an a potentiometer at the same time. Then find out how much the potentiometer moved vs. how much the encoder moved. I've done this and it works nicely. The potentiometer may not be exactly linear, so depending on how precise you need this to be, you can turn it to several increments and check the values, or better yet, write a program to do it for you.
The "Real World", unlike Programming is Rarely Perfect...

Because of of the Linearity of the Potentiometer, and the "placement repeatability", some other sorts of Parameters may be needed to provide a Complete Solutions to this problem..

First, the Encoders are always Relative to the starting Count, Usually from Zero, to the MAX VALUE of your Travel, where as the Potentiometer will Start with a High Value or Low Value, depending on how they are Installed and Move to the Opposite Value..

Also, due to Backlash, you might get Different Results from the Encoders and Potentiometers when reaching the Same Point, depending on the Direction of Travel.

Encoders will Most Likely need a Limit Switch at Each End of the Travel, so as to know when you reached it.

A "placement repeatability" test can be formed, Say for Instance, if You Know your Encoder is Started at Zero, and counts through 1267, you run the Travel from One Limit Switch to the Other, Multiple Times. If the Counts consistently reach Zero and 1267, at the Respective Ends, your "placement repeatability" is Really Good. If it is kind of close, say it Varies at the Zero End from +5 to -7, you then have a Range that you know is "close" to the End", and any Points in the Middle of Your Travel, can be OFF by that Range...

Potentiometer might need Limit Switches as well, and a "placement repeatability" test can be performed on them as well.

If you have "placement repeatability" Issues, and Limit Switches at Both End of Travel, you might need to:

Reset the Encoders to Zero and Always Count Up, rather than Count Back Down, and have Separate "Look-up Tables", for each Direction.

Sample the Potentiometer at the Limit Switch when at Each End of Travel and have Separate "Look-up Tables", for each Direction.

If "placement repeatability" is Off by a Range that is within your Margin of Error, there is not likely much reason to change anything..

Then by Making a Table to match the Encoders and Potentiometers values at the same Position/Location, you can then know when your Motors are at the correct place..

Good Luck in getting everything working..



( A Critical Example of "placement repeatability" is in Pick-n-Place machines, especially ones that assemble very small electronic devices...)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

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


All times are GMT -6. The time now is 11:42 PM.


VEX and VEX Robotics are trademarks or service marks of Innovation First International, Inc.
Copyright © 2002-2013. All Rights Reserved. VEX Robotics, Inc. is a subsidiary of Innovation First International, Inc.
All other product names/marks of others are the property of their respective owners.