Go to Post Ask the right questions and you can get the right answers. - Chief Hedgehog [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 13-02-2016, 14:10
Pumatron Pumatron is offline
Registered User
FRC #5918
 
Join Date: Feb 2016
Location: Missouri
Posts: 3
Pumatron is an unknown quantity at this point
Run Motors at the Same Speed

Hi,

We're in our first FRC this year and as expected we are completely new to Labview. What we're trying to do now is have the motors run at the exact same speed. I'm not entirely sure as to how to do this and we're coming up with theories but nothing has worked so far. Could anyone direct us to fixing this issue?
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2016, 14:23
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Run Motors at the Same Speed

You can feed each of the speed controllers the same value from a joystick, but the whole chain from the motor to the wheels on the carpet introduces error.

- the speed controllers must be identically calibrated
- the motors will vary within manufacturing tolerances
- the motors may have a design bias to turn better forward than they do backwards
- the gear trains the motors drive will have varying efficencies, binding, grease, tooth engagement, etc.

To match motor speeds in code through the whole chain you would need sensor feedback from something like an encoder or potentiometer.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 13-02-2016 at 15:09.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2016, 14:40
Pumatron Pumatron is offline
Registered User
FRC #5918
 
Join Date: Feb 2016
Location: Missouri
Posts: 3
Pumatron is an unknown quantity at this point
Re: Run Motors at the Same Speed

We currently are running on 4 motors (looking to use a Y cable instead of four individual cables) with Victor SP speed controllers. Our Left motors are inverted and the Right motors are not. We do have encoders and may use them. How would we apply them via the code?
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2016, 15:24
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Run Motors at the Same Speed

I don't expect encoders to be terribly reliable going over the rough defenses.

To match speeds you could use a PID vi to modify the motor speeds on each side to track a desired speed.
In other words, speed up a motor if it's going slower and slow down a motor when it's going too fast. Or let one motor run according to the joystick setting and have the other motor match speed with joystick input modified by a PID check.

I'd suggest playing with PID on a standalone motor first to let you get the hang of what it is doing and how it works.

Do a search on PID in the whitepapers here on CD to start with the basic concepts.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2016, 18:47
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,112
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: Run Motors at the Same Speed

To ensure that motors always run at the same speed, the simplest option is to have them physically connected together.

What do the motors you're trying to synchronize do? What are the consequences of one being slightly slower than the other?
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2016, 18:48
Pumatron Pumatron is offline
Registered User
FRC #5918
 
Join Date: Feb 2016
Location: Missouri
Posts: 3
Pumatron is an unknown quantity at this point
Re: Run Motors at the Same Speed

We're trying to get our robot to move completely straight. Such as in autonomous one motor may move faster than the other (even though their values are the same) and knock it off course.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2016, 19:08
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Run Motors at the Same Speed

I'd try using a gyro like the one FIRST Choice gave to everyone.

It's free and easy to integrate into the robot (plug & code).

And for driving straight it's terrific.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2016, 23:10
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,112
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: Run Motors at the Same Speed

Yep. Use a gyro to sense the direction the robot is facing, and use the difference between that and the desired direction to adjust the motors so the robot turns toward the target direction.

One of the best software tools for doing that is PID control on the X axis "steering" input of an Arcade Drive function.
Reply With Quote
  #9   Spotlight this post!  
Unread 18-02-2016, 13:46
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 243
BitTwiddler is on a distinguished road
Re: Run Motors at the Same Speed

Quote:
Originally Posted by Alan Anderson View Post
Yep. Use a gyro to sense the direction the robot is facing, and use the difference between that and the desired direction to adjust the motors so the robot turns toward the target direction.

One of the best software tools for doing that is PID control on the X axis "steering" input of an Arcade Drive function.
Hmm. You've given me "plan B". Good idea.
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 04:20.

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