# control system programming

Posted by Jimmy Holmes.

Coach on team #27, Team RUSH, from Osmtech Academy and DaimlerChrysler.

Posted on 3/2/2000 6:26 AM MST

I hope the vast FIRST community can help us with this problem.
We are trying to run two van door motors at the same time using two different speed controllers
and two different pwm outputs on the controller. The problem is they run at two different speeds and cause
our arms to go out of alignment.We had them variable, running off of the same joystick ( pull back they both
go up, push forward they both go down). To solve the problem we made the joystick act like a switch
and changed the max values so they would run at the same speed, but know it is very jerky, (on off,
on off). We want to be able to be variable again but still adjust for the different speed motors. Is there a routine
that we could run in the program that could account for the difference? We know its not a friction issue just the motors
are not the same. I would like to thank you in advance for any help.
Jimmy Holmes Team27

Posted by Mike Gray.

Engineer on team HOT from Huron Valley Schools sponsored by GM Milford Proving Ground.

Posted on 3/2/2000 8:29 AM MST

In Reply to: control system programming posted by Jimmy Holmes on 3/2/2000 6:26 AM MST:

Suggestions:

1. Eliminate the possibility of mechanical problems, with the motor or with the drivetrain.

2. Check for volt drops across terminations.

3. Check the integrity of the suspect speed controller, per InnovationFIRST instructions.

4. If the first three are fruitless, scale the PWM value to the speed controller:

First, determine the speed error. Declare a new variable which will be scaled to reflect the speed error. The new variable will be a transfer function for the faster motor. Perform a slope and intercept (mX+b) transform on the joystick variable and set the new variable equal to it.

Example:

new_variable=joystick / 2 + 64

This example assumes that you want to scale the variable to half-scale. You must add 64 counts so that 127 counts still represents center-stick. If you want 1/4 speed, simply divide by 4 and add 96.

Unfortunately, this method wil not make full use of the faster motor’s potential, but you can’t make the slow motor go any faster than 255 counts.

Even after scaling, the motors may launch unevenly due to variation in static friction. If you need to start the motors many times during a match, static friction may cause the linkage to ‘warp’. I suggest using the x-axis on that joystick to modify the y-axis variables, so the operator can make small corrections to the linkage on the fly.

Hope this helps.

Posted by Joe Johnson.   [PICTURE: SAME | NEW | HELP]

Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.

Posted on 3/2/2000 9:03 AM MST

In Reply to: Re: control system programming posted by Mike Gray on 3/2/2000 8:29 AM MST:

I think you are in for some real problems if the difference in motor speed is enough to bend your arm out of shape.

As a team that has had two motors driving 1 arm from different sides of the robot for 5 years now, I have a LOT of experience in this area.

Our standard has always been that, in such cases, the mechanism between the motors/gearboxes must be able to tolerate the motors driven in OPPOSITE directions without damage. I will admit that at times we have had machanism that didn’t particularly LIKE such treatment, but never any that would suffer any permanent deflection (at least not by the time we were done with them).

This standard has served us well.

If you are having problems with the simple differences you have from the manufacturing tolerances of the motors, what are you going to do when one side of the arm catches on the goal or when some other robot loads one side of your arm or if you overload your motors and one motor’s breaker trips slightly before the other?

Clever software is at best a band-aid to cover lack of rigid hardware.

I may be wiser to remove one of your motors and use the weight to stiffen up the hardware on your arm thus allowing the load to be driven from one side.

My advice, for what it is worth.

Joe J.

Posted by Mike Gray.

Engineer on team HOT from Huron Valley Schools sponsored by GM Milford Proving Ground.

Posted on 3/2/2000 9:32 AM MST

In Reply to: Clever Software is no substitute for Rigid Hardware posted by Joe Johnson on 3/2/2000 9:03 AM MST:

You are right Joe. Software should never be used as an attempt to ‘fix’ a poor mechanical design. Software can however enhance greatly a good design.

In '98, we used parallel 4-bar linkages driven by separate motors. Warping was actually a feature, in that the end-effector could be skewed up to 30 degrees simply by driving the linkages at different rates.

For '99, I used 2 sets of compound 4-bar linkages to for the extensible member, each driven by a window lift motor. Learned a lot about motor variation, as ‘warp’ or ‘skew’ was not desired. Chose to match motors or adjust drive ratios rather than ‘fix’ the thing with software.

Posted by Patrick.

Coach on team #409, Flaming Eagles, from Oak Grove High School and NASA Ames Research Center.

Posted on 3/2/2000 6:34 PM MST

In Reply to: Re: Clever Software is no substitute for Rigid Hardware posted by Mike Gray on 3/2/2000 9:32 AM MST:

I hate to see all of you stressing like this, but have you considered using 2 speed controllers but only 1 pwm output? Included in the electronics bag should be a pwm cable that has red, black ad yellow instead of red, black and white. This cable plugs into pwm or realy outputs and splits into 2 outputs to a speed controller/spike. This calibrates the 2 victors exactly the same. That is what we are doing and have no problems with different speeds whatsoever.

-Patrick Wesonga
Team 409
Oak Grove High School
San Jose, California

Posted by Jerry Eckert.

Engineer from Looking for a team in Raleigh, NC sponsored by .

Posted on 3/2/2000 9:06 PM MST

In Reply to: THE SOLUTION IS ACTUALLY VERY EASY posted by Patrick on 3/2/2000 6:34 PM MST:

:
: I hate to see all of you stressing like this, but have you considered using 2 speed controllers but only 1 pwm output? Included in the electronics bag should be a pwm cable that has red, black ad yellow instead of red, black and white. This cable plugs into pwm or realy outputs and splits into 2 outputs to a speed controller/spike. This calibrates the 2 victors exactly the same. That is what we are doing and have no problems with different speeds whatsoever.

Unfortunately, this solution doesn’t address speed differences caused by variances in the mechanical assemblies, including the motors.

Posted by Dung Cao.

Engineer on team #397 from Flint Southwestern Academy and Delphi Automotive - E&C.

Posted on 3/2/2000 9:16 AM MST

In Reply to: control system programming posted by Jimmy Holmes on 3/2/2000 6:26 AM MST:

Another thing you can do is to calibrate the speed controller with the joystick you are planning to use. I found after calibration, the two speed controller will output the same PWM to both motors. The innovation FIRST web site has the documents on the 883 and how to calibrate it.
Good luck

: I hope the vast FIRST community can help us with this problem.
: We are trying to run two van door motors at the same time using two different speed controllers
: and two different pwm outputs on the controller. The problem is they run at two different speeds and cause
: our arms to go out of alignment.We had them variable, running off of the same joystick ( pull back they both
: go up, push forward they both go down). To solve the problem we made the joystick act like a switch
: and changed the max values so they would run at the same speed, but know it is very jerky, (on off,
: on off). We want to be able to be variable again but still adjust for the different speed motors. Is there a routine
: that we could run in the program that could account for the difference? We know its not a friction issue just the motors
: are not the same. I would like to thank you in advance for any help.
: Jimmy Holmes Team27

Posted by Raul.   [PICTURE: SAME | NEW | HELP]

Engineer on team #111, Wildstang, from Rolling Meadows & Wheeling HS and Motorola.

Posted on 3/2/2000 2:57 PM MST

In Reply to: control system programming posted by Jimmy Holmes on 3/2/2000 6:26 AM MST:

I fully agree with JJ’s and other’s suggestion to make your mechanism more rigid. However, I also assume that it may be too large of a design change to make at the competition site.

If you can still find a way, I would still try to put a rigid member from one side to the other that will force the motors to follow each other and thus they will in effect be working in parallel.

You said that it is not a friction problem in your mechanism. Did you know that the Van door motors have an adjustment screw for the worm gear tension? So, if all else fails, you can play with the tension on it until both motors are running the same.

Posted by Justin Stiltner.

Student on team #388, Epsilon, from Grundy High School and NASA, American Electric Power, Town of Grundy.

Posted on 3/3/2000 8:38 PM MST

In Reply to: Adjustment Screw on Motors. posted by Raul on 3/2/2000 2:57 PM MST:

What exactly does this screw do ?

Justin Stiltner
Team 388

Posted by Raul.   [PICTURE: SAME | NEW | HELP]

Engineer on team #111, Wildstang, from Rolling Meadows & Wheeling HS and Motorola.

Posted on 3/3/2000 9:52 PM MST

In Reply to: Re: Adjustment Screw on Motors. posted by Justin Stiltner on 3/3/2000 8:38 PM MST:

I believe it is intended by design to allow the manufacturer to install the worm gear and adjust the free play and/or backlash on the worm gear. But it also can be used to induce extra friction and help to prevent backdriving (which is what we often do).

Some may argue that this will artificially reduce the life of the worm gear. However, in 1998 we relied exclusively on this feature to prevent our lift from sagging when extended and holding up our cage full of balls. We were in several matches that year (including a run of 8 straight matches in the elimination rounds) and never had a failure. We just had to tweak the tension periodically.

Raul

Posted by Justin Stiltner.

Student on team #388, Epsilon, from Grundy High School and NASA, American Electric Power, Town of Grundy.

Posted on 3/4/2000 4:08 PM MST

In Reply to: Re: Adjustment Screw on Motors. posted by Raul on 3/3/2000 9:52 PM MST:

Hmmm
you may have just saved me from doing a lot of fabracating at regionals.

Thanks

Justin Stiltner
Team 388

Posted by Joe Johnson.   [PICTURE: SAME | NEW | HELP]

Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.

Posted on 3/4/2000 5:09 PM MST

In Reply to: Re: Adjustment Screw on Motors. posted by Justin Stiltner on 3/4/2000 4:08 PM MST:

One option we explored last year when we discovered to our shame and horror just how backdriveable the Delphi Power Sliding Door Motors were, we too looked at the option of overtightening the screw on the motor armature.

It may work in the case you are looking into because you are really only trying to match free speeds,

BUT…

… I have a word or two of caution for teams trying to use such methods as a means of not falling when their robot is hanging:

Be careful.

There are two problems you can run into.
#1, you can easily loose 50% of the output of your motor this way – even if you can afford the loss of stall torque, that is a lot of heat into those motors. If it is a motor you use a lot during a match you will run the risk of tripping the internal circuit breaker on the Delphi Power Sliding Door Motor (the same holds true for the window motor and the seat motor by the way).

#2, Even if you can stand the loss of output and the heat in the motors, you can tighten them so tight that if something DOES backdrive the motor (another robot trying to pull you off the bar, for example the plastic worm gears or the even the motor shafts can be damaged. Again, using our robot last year as an example, we tightened the nut so tight at one point that we could not backdrive the motor even with the weight of the robot working against it BUT our nice double D shaft looked like a piece of saltwater taffy after a match or two. Even our team, with as relatively easy access to spare power sliding door motors as we have, thought this was an unreasonably short motor life A redesigned mechanism allowed us to sleep at night without fear of having to replace motors rapidly.

Just a message from a team that has been there and done that. Take it for what it is worth.

Joe J.

Posted by Nate Smith.

Other on team #66, GM Powertrain/Willow Run HS, from Eastern Michigan University and GM Powertrain.

Posted on 3/4/2000 6:06 PM MST

In Reply to: Loosing output & breaking worm gears posted by Joe Johnson on 3/4/2000 5:09 PM MST:

: … I have a word or two of caution for teams trying to use such methods as a means of not falling when their robot is hanging:

Just a quick tip if anybody is using the van door motors to hang(like we are)…if you’re looking for an easy way to keep from sinking when you stop lifting yourself up, just set the speed controllers to turn the electronic braking on(the jumper on the left two pins), and you’ll hang there forever…we’ve got a 130lb machine, and we hung there for a long time…as long as you don’t unplug the battery, that is… =)

Nate
See everybody at Ypsi!

Posted by Joe Johnson.   [PICTURE: SAME | NEW | HELP]

Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.

Posted on 3/4/2000 8:16 PM MST

In Reply to: If using the van door motors to hang… posted by Nate Smith on 3/4/2000 6:06 PM MST:

As big of a fan of dynamic braking as I am, this too has its limits as I have discussed elsewhere on this forum.

It can do wonders if you are in the ballpark. If not, go to a non-backdriveable mechanism.

Again, just one man opinion.

Joe J.

Posted by Nate Smith.

Other on team #66, GM Powertrain/Willow Run HS, from Eastern Michigan University and GM Powertrain.

Posted on 3/4/2000 8:25 PM MST

In Reply to: helps but not a panacea posted by Joe Johnson on 3/4/2000 8:16 PM MST:

We’ve got both van door motors on the opposite ends of a winch spool, that uses small-diameter (1/4’ or 3/16’, not sure which) spectracord attached to a hook made from 1/4’ aluminum plate. Our winch mechanism is mounted in the center of a piece of 1/4’ aluminum angle that spans the rear of our machine. We weigh in at ounces under 130, and the braking is enough for us…so I’m happy with it =)

See everybody in Ypsi!

Nate

Posted by Justin Stiltner.

Student on team #388, Epsilon, from Grundy High School and NASA, American Electric Power, Town of Grundy.

Posted on 3/4/2000 9:15 PM MST

In Reply to: Works for us… posted by Nate Smith on 3/4/2000 8:25 PM MST:

we have the speed controller set to break but the motor still backdrives and I dont think that we will be able to tighten that screw enuff and then still raise our arm so we will still need to fabracate a breaking system for it.

Does anyone have a suggestion on how to stop a sproket?? ill give a dew to you if we use your idea and your at the mid atlantic regional… were not attending the nationals unfortunally

also is anybody looking for extra drill,window,or seat motors and has fisher price or van door motors to trade then e-mail me!! [email protected]

Justin Stiltner
Team 388

Posted by Rick Berube.

Engineer on team #121, Rhode Warriors, from Middletown H.S…

Posted on 3/5/2000 4:33 PM MST

In Reply to: Re: Works for us… posted by Justin Stiltner on 3/4/2000 9:15 PM MST:

How about drilling a slot in your sprocket and using a servo to insert a pin. Spring load the pin so if it stikes the solid part of the sprocket, it will be a simple matter of turning the sprocket another turn or so (1/2, 1/4 turn depending upon how many slots you drill/cut) before the pin pops in. You’ll need to drill/cut the slot(s) at radius along an arc to allow easy insertion of the pin (much like the main sprocket on a bicycle).
On either side of the sprocket, ensure the pin is up against an appropriate mechanical stop when the sprocket comes to rest on it. You’ll need to make sure the servo is not the object handling the load and that the pin and stops are rugged enough to handle the load on them! I am also assuming that in your design you can afford a turn of your mechanism w/o it slipping too much, and that the sprocket will be slipping relatively slowly compared to the servos ability to insert the pin as teh sprocket back-turns.

My first thought was to use the solenoid from a pneumatic valve, but I don’t think you are allowed to dismantle one to use it. Also I don’t know what the throw on it would be, or the diameter of the pin itself. Probably too small judging by the size of the valves.

Hope this helps,

Rick

Posted by Joe Johnson.   [PICTURE: SAME | NEW | HELP]

Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.

Posted on 3/5/2000 8:16 AM MST

In Reply to: Works for us… posted by Nate Smith on 3/4/2000 8:25 PM MST:

Whether or not dynamic braking works or not is all determined by efficiency and ratio.

Unless the cable takes some goofy routings, I suppose we can say your cable is about 90% efficient.

The weight of your machine is 130 lbs. Using a 1/8 inch radius, this translates to 16 inch lbs of torque, but because of the 90% efficiency and the two motors, each motor see less than 7 inch lbs.

I can’t recall the exact numbers but I have a vague recallection that it takes about 1 Newton-meter to backdrive those motors (without dynamic braking). 9 inch-lbs is about 1 Newton-meter.

SO… As you can see, your machine was right on the ragged edge of backdriving without dynamic braking. Dynamic braking provide extra bit you needed to keep from falling off the hill.

If on the other hand, your machine put 14 inch pounds of torque on those Delphi Power Sliding Door Mechanism, all the dynamic braking in the world was not going to keep you from falling.

Joe J.

P.S. I almost hate to share this with folks at this moment, but I was withing a eyelash of getting two electro-mechanical brakes donated to the kit in 2000 (at the time I had no indication that hanging would be part of the game, I just thought it would be a cool addition to the kit). Only a freakishly unluck chain of events managed to prevent it from happening. Ah well, better luck next year. I am also hoping to get some electro-mechanical clutches donated as well – give me time…