Go to Post When is comes down to it, remember what FIRST is really about, it is about those students and helping to inspire them - E3 Robotics Ctr [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 06-02-2015, 21:02
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Encoders for Equalizing Motor Speeds

Hello all. I've read around a bit about encoders, but I haven't seen any advice on how to use them to equalize two motors' speeds. I have a lift powered by two motors. I'd like them to lower and raise at the same rate. However, they are slightly different, and manage to get very off from each other after a few runs.

Can I use encoders to solve this problem? If so, how?
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2015, 21:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoders for Equalizing Motor Speeds

Quote:
Originally Posted by btcshields6 View Post
I have a lift powered by two motors. I'd like them to lower and raise at the same rate.
Will your design allow the two motors to be mechanically linked, perhaps with a shaft, so that they must both spin at the same speed?


Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2015, 21:21
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Unfortunately no....the motors are opposite each other on the robot, each controlling the z axis movement of the arms, so that we can lift the totes.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2015, 21:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoders for Equalizing Motor Speeds

Quote:
Originally Posted by btcshields6 View Post
Unfortunately no....the motors are opposite each other on the robot, each controlling the z axis movement of the arms, so that we can lift the totes.
Can you post a picture?
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2015, 22:11
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Click image for larger version

Name:	ImageUploadedByTapatalk1423278872.992426.jpg
Views:	79
Size:	249.6 KB
ID:	18186

It's a bit hard to tell, but the two motors running on the lead screws at the front are what I'm talking about.
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2015, 22:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoders for Equalizing Motor Speeds


What motor controllers are you using?

What encoders?

Are encoders wired to the RIO or the motor controllers?


Reply With Quote
  #7   Spotlight this post!  
Unread 07-02-2015, 07:41
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
I don't actually have the encoders on yet. They'll be AS5145Bs. I have Talon SRs, so I don't know whether I'll need to hook the encoders into them or the Rio. I've never used an encoder before.
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2015, 09:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoders for Equalizing Motor Speeds

Quote:
Originally Posted by btcshields6 View Post
I have Talon SRs, so I don't know whether I'll need to hook the encoders into them or the Rio.
In that case, you'll have to connect encoders to RIO. TalonSR does not have encoder input.


Quote:
I don't actually have the encoders on yet. They'll be AS5145Bs.
Here's a tutorial to get those encoders up and running:

http://wpilib.screenstepslive.com/s/...control-system

Then we can talk about control strategies to synchronize the actuators.



Last edited by Ether : 07-02-2015 at 09:15.
Reply With Quote
  #9   Spotlight this post!  
Unread 07-02-2015, 09:31
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Re: Encoders for Equalizing Motor Speeds

We had some trouble with a very similar encoder last year because our application made it difficult to get the magnet lined-up perfectly with the sensor on the encoder. If it is out of alignment, it will give bad values. If your application is similar, you may wish to use a potentiometer instead. The number of turns it would have to make could be a deciding factor, as continuous rotation potentiometers are expensive. Wiring and programming* are the same, so you can swap it out if you have a problem. We did.
*you will probably need to tweak the values, depending on the potentiometer you choose.
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #10   Spotlight this post!  
Unread 07-02-2015, 10:41
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Encoders for Equalizing Motor Speeds

That's a tricky bit of hardware you have there. I'd seriously look into a way to mechanically link the two sides so they are synchronized automatically. Would there be room for a chain between them at the top, or at the bottom?

Failing a hardware solution, then encoders can work. Assuming the two sides start out in the same position, you need to "slave" one side to the other. Control one side however you want, and use its encoder value as the set point of an algorithm that controls the other side to get the other encoder to match. Since you're using lead screws, there won't be significant inertia in the system, so a simple proportional controller (drive the motor faster when it's far from target, and slower when it's close) ought to be sufficient.

I'd actually add some "feedforward" so the second motor gets some of its control from the same signal that runs the first one. That should keep them close, and the leveling control algorithm just has to account for small errors.
Reply With Quote
  #11   Spotlight this post!  
Unread 13-02-2015, 00:35
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Thank you all for your advice here. The situation has changed. As of Saturday, we will only have one screw. So this issue has gone away. But thanks!
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 21:31.

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