Go to Post I looked at it and originally thought it was a crazy idea... then I looked at it again and it still sounds like a crazy idea. But crazy ideas tend to produce some excellent results. - Yipyapper [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 27-02-2016, 13:08
Gunnar Frahm Gunnar Frahm is offline
Registered User
FRC #3267
 
Join Date: Feb 2016
Location: Minnesota
Posts: 8
Gunnar Frahm is an unknown quantity at this point
Equal Motor Output with Encoders Help

We have a robotic arm that is going to be moved up and down with the use of 2 CIM motors. The CIM motors have different rpm's or speeds making them fight against each other when they try to move the arm. We are going to mount the versa-planetary encoders on the motors to fix this. I was wondering how you would program it in teleop so that the encoders would make the CIM motors have equal outputs so everything would be in sync. I haven't used PID, but I was wondering if that is how you fix it. Also, if we wire the encoders into the Talon SRX's will we still be able to program with them? We are using labview.
Reply With Quote
  #2   Spotlight this post!  
Unread 27-02-2016, 13:20
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Equal Motor Output with Encoders Help


Please provide a more detailed description of your design.

What do you mean by "The CIM motors have different rpm's"? If both CIMs are attached to the same shaft or same gearbox, they will have the same speed, and they won't be "fighting" each other if both are getting the same command.

Or did you mean to say you have two arms, each powered by one CIM?


Last edited by Ether : 27-02-2016 at 13:24.
Reply With Quote
  #3   Spotlight this post!  
Unread 27-02-2016, 13:28
Gunnar Frahm Gunnar Frahm is offline
Registered User
FRC #3267
 
Join Date: Feb 2016
Location: Minnesota
Posts: 8
Gunnar Frahm is an unknown quantity at this point
Re: Equal Motor Output with Encoders Help

The motors are connected to the same shaft on opposite ends that is supposed to rotate the arm. When the motors run at 100 percent to rotate the shaft one turns at 62 rpm +/- 3 rpm and the other runs at 65 +/- 3 rpm. So, when I move the arm the slower motor drags the other one behind. The arm we are trying to rotate has to be able to lift a lot of weight, so it is a problem when the motors fight each other. I saw something in other threads about calibrating speed controllers. Can you do that with Talon SRX's? We use talons utilizing CAN bus for communication. So far in the user manuals I haven't seen anything about calibrating them.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-02-2016, 14:07
Gunnar Frahm Gunnar Frahm is offline
Registered User
FRC #3267
 
Join Date: Feb 2016
Location: Minnesota
Posts: 8
Gunnar Frahm is an unknown quantity at this point
Re: Equal Motor Output with Encoders Help

I don't know much about master and slaves. But would that setup work with the two motors instead of PID control?
Reply With Quote
  #5   Spotlight this post!  
Unread 27-02-2016, 14:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Equal Motor Output with Encoders Help

Quote:
Originally Posted by Gunnar Frahm View Post
The motors are connected to the same shaft on opposite ends that is supposed to rotate the arm. When the motors run at 100 percent to rotate the shaft one turns at 62 rpm +/- 3 rpm and the other runs at 65 +/- 3 rpm.
1) Where are you getting these numbers from?

2) 62 rpm +/- 3 rpm and 65 +/- 3 rpm share a 3 rpm tolerance band. They may in fact be spinning at the exact same speed. Do you have any other physical evidence that one motor is spinning faster than the other? See #3 below.

3) If the two motors are connected to the same shaft, it is not physically possible for them to spin at different speeds unless the shaft is actually twisting or a belt or gear is slipping.

4) 65 rpm is approx 360 degrees per second. How long is the arm that's connected to this shaft?

Quote:
So, when I move the arm the slower motor drags the other one behind.
If both motors are functional that's not an accurate description of what is happening. One motor may be carrying a bit more load than the other, but it is not "dragging" the other motor.

Quote:
The arm we are trying to rotate has to be able to lift a lot of weight, so it is a problem when the motors fight each other.
One motor may be carrying a bit more load than the other, but the motors are not "fighting" each other: they're both contributing torque to lift the load.

Quote:
I saw something in other threads about calibrating speed controllers. Can you do that with Talon SRX's? We use talons utilizing CAN bus for communication.
Calibration is for PWM. If you're using CAN you don't need to calibrate.


Quote:
I don't know much about master and slaves. But would that setup work with the two motors instead of PID control?
EDIT: saw your 4th post

Using separate PID for each of two motors which are physically connected is probably not the best way to do it.

If the motors are physically connected to each other (as yours are), using master/slave may be appropriate. But this will not solve the problem you have described (excessive loading and shaft bending).




Last edited by Ether : 27-02-2016 at 17:00.
Reply With Quote
  #6   Spotlight this post!  
Unread 27-02-2016, 15:06
Gunnar Frahm Gunnar Frahm is offline
Registered User
FRC #3267
 
Join Date: Feb 2016
Location: Minnesota
Posts: 8
Gunnar Frahm is an unknown quantity at this point
Re: Equal Motor Output with Encoders Help

Answers to your questions.
1) We used a handheld digital tachometer to measure each motors RPM individually at free speed. The RPM hovered in those ranges for each motor.
2) The shaft is in fact twisting a bit. We are worried that the couplings are going to break as a result of this.
4) The arm we are moving is a "boom-like" structure 48.5 inches long and made out of aluminum. The fulcrum where the motors (connected by the shaft) are an inch from the end. Just moving the arm is heavy enough, but it is more so when there is a load on the end of it. This is a video of our robot when we were using a snowblower motor to pivot the arm. The snowblower motor ended up not giving as much lift power as we wanted. https://www.youtube.com/watch?v=YJ1LrNceyyI
5) We were not using PID at all. Just normal select triangles for buttons to create an output.

Last edited by Gunnar Frahm : 27-02-2016 at 15:11.
Reply With Quote
  #7   Spotlight this post!  
Unread 27-02-2016, 15:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Equal Motor Output with Encoders Help

Quote:
Originally Posted by Gunnar Frahm View Post
1) We used a handheld digital tachometer to measure each motors RPM individually at free speed. The RPM hovered in those ranges for each motor.
The free speed of a CIM is not 63 rpm. What exactly were you measuring?

Quote:
5) We were not using PID at all. Just normal select triangles for buttons to create an output.
The free speed of each motor being slightly different does not mean the motors are "fighting" each other when physically connected to the same shaft and being given the same open-loop command. Each of the motors is trying to lift the load. One is not "dragging" or "fighting" the other.

Quote:
4) The arm we are moving is a "boom-like" structure 48.5 inches long and made out of aluminum. The fulcrum where the motors (connected by the shaft) are an inch from the end. Just moving the arm is heavy enough, but it is more so when there is a load on the end of it.

2) The shaft is in fact twisting a bit. We are worried that the couplings are going to break as a result of this.
Not good.

Did you use the JVN spreadsheet to calculate how much torque that 48" arm is exerting on the shaft (and on the gearbox output stage?). If not, I recommend you go back and do that before doing anything else.


Reply With Quote
  #8   Spotlight this post!  
Unread 28-02-2016, 19:42
Gunnar Frahm Gunnar Frahm is offline
Registered User
FRC #3267
 
Join Date: Feb 2016
Location: Minnesota
Posts: 8
Gunnar Frahm is an unknown quantity at this point
Re: Equal Motor Output with Encoders Help

1)We have gearboxes on the CIMs which makes the rpm slower.
2)Also, our mechanical team made a bench-top robot testing out the arm, and it seemed mechanical wise they found the gearbox was binding up causing the motors to fight. They fixed this and now it seems we do not have to do anything fancy with programming. Although, I think we will still do a master and slave setup with the talon srx's just in case.
3)The mechanical team did in fact use the spread sheets to see if the gearboxes with CIMs would be sufficient to lift the arm. When tested it did in fact lift it. It was fairly smooth and there was no binding.
Now the question is if we will be able to use the encoders as a limit switches for the arm.
Another thing that happened is the arm backdrives down to starting position. Would using the brake/coast mode on the talon fix this? or would we have to program a button that just exerts enough power to keep it stable?

Last edited by Gunnar Frahm : 28-02-2016 at 19:45.
Reply With Quote
  #9   Spotlight this post!  
Unread 28-02-2016, 21:38
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Equal Motor Output with Encoders Help

Quote:
Originally Posted by Gunnar Frahm View Post
1)We have gearboxes on the CIMs which makes the rpm slower.
What gearboxes are you using, and what gear ratio?


Reply With Quote
  #10   Spotlight this post!  
Unread 03-03-2016, 06:55
Gunnar Frahm Gunnar Frahm is offline
Registered User
FRC #3267
 
Join Date: Feb 2016
Location: Minnesota
Posts: 8
Gunnar Frahm is an unknown quantity at this point
Re: Equal Motor Output with Encoders Help

Turns out we use Mini CIMs that have 100:1 versa planetary gearboxes from vex. They are 3 stage with a 1/2" hex output shaft. The encoders we have are versa planetary encoders that fit right in with the gearbox.
Reply With Quote
  #11   Spotlight this post!  
Unread 03-03-2016, 14:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Equal Motor Output with Encoders Help

Quote:
Originally Posted by Gunnar Frahm View Post
Now the question is if we will be able to use the encoders as a limit switches for the arm.
Normally you don't use encoders as limit switches. You use them to provide a feedback signal (a.k.a "process variable") to a closed-loop controller, like a PIDF for example.

Quote:
Another thing that happened is the arm backdrives down to starting position. Would using the brake/coast mode on the talon fix this?
It might, depending on a variety of factors. It would be simple enough to try.

Quote:
...or would we have to program a button that just exerts enough power to keep it stable?
I suppose you could do that. Most teams would use a position closed-loop controller as described above.


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 08:08.

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