Posted by Joe Johnson, Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.
Posted on 4/15/99 6:44 PM MST
In Reply to: Re: Drill Motor Inconsistency posted by Jerry Eckert on 4/15/99 5:27 PM MST:
One possible SW fix would be to slow down the fast motor, not ideal but better than driving in circles.
Here is how I would appoach it to keep from being locked into on particular motor pair (assuming that you don’t want to have to reprogram with each motor change).
I propose that you define two ‘special modes’ for you controller. A rocker switch works just fine.
While the rocker is rocked forward, use the value of an non self-centering pot (Wheel1 for instance) to modify the full forward value of one motor or the other (e.g. pot values above 128 would reduce the high value of the RH motor, while values below 128 would reduce the high value of the LH motor).
Write the values to EEPROM space while the button is held down (at fewer than 20 writes per second it would take forever to reach the write limits of the EEPROM).
While the rocker is rocked back, use the value to modify the full reverse value of one value or the other. (using the same technique as above).
Then, each time through the main loop, scale the values of the outputs to these motors by the values stored in EEPROM.
Essentially, you need define a piecewise linear function that scales the outputs so that 128 maps to 128 and 254 maps to the appropriate value determined while in adjustment mode(s). 0 similarly scales to the adjusted value from the EEPROM.
To tweek the motors, drive the machine forward while in ‘forward adjust’ mode, using the pot to get the machine to go straight. Do the same for reverse.
When you let go, your controller knows how hard to drive each motor in order to have the speeds match.
Pretty cool…
Joe J.
P.S. I know that something like this works because we do a similar scaling in order to ‘zero’ our joysticks. We got tired of ripping off the tape we have covering the trims on the joystick in order to prevent our robot from drifting off on us. It really works well. If you see Jeremy ‘The Stamp2 Guru’ Husic in the pits, I am sure he’d show you the code and give you a demo. JJ.