|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Slowing Down Drive Motors
This is team 1611 "rookies" having a little trouble with the single joystick method of control.When a direction is used the motors "jump" to an almost to fast speed but still allows for a top speed with gradual acceleration, the problem is trying to get rid of this "jump" through programming.Iv'e allready lowered the speed_setting to its lowest of 127 any suggestions?
|
|
#2
|
|||||
|
|||||
|
Re: Slowing Down Drive Motors
Our programmers used something they referred to as a "drivemap" to scale the accelleration gradually. I have no idea how to do such a thing, but from my understanding it was some sort of table of values that they came up with
|
|
#3
|
|||
|
|||
|
Re: Slowing Down Drive Motors
Quote:
|
|
#4
|
|||||
|
|||||
|
Re: Slowing Down Drive Motors
Quote:
Although it could theoretically do it, the PIC in the RC isn’t exactly up for exponential equations. What we have done every year is a lookup table... it takes more effort then writing an equation; you need to come up with a chart with 127 (or 256, depending on how you write your code) like this made up example: Code:
int speed[] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,7,8,9,10,11,12,13,14,15,17,19,21,24....
Code:
p1_y = speed[p1_y]; this also gives you a chance to tweak your robots response time and "aggressiveness" best of luck -- jsd |
|
#5
|
||||
|
||||
|
Re: Slowing Down Drive Motors
Instantiate two ints named temp15 and temp16. After the limit mixing functions have run, do this:
Code:
temp15=(int)pwm15-127; temp16=(int)pwm16-127; pwm15=(int)(.007874*pow(temp15,3)/fabs(temp15)+127); pwm16=(int)(.007874*pow(temp16,3)/fabs(temp16)+127); |
|
#6
|
|||||
|
|||||
|
Re: Slowing Down Drive Motors
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 drive motors VS 4 drive motors | Conor Ryan | Motors | 9 | 19-01-2005 22:35 |
| What motors do you use to drive your robot? | _GP_ | General Forum | 25 | 25-01-2004 21:14 |
| How many motors are you using to drive? | Joseph F | Motors | 18 | 16-10-2002 21:24 |
| Looking for practice motors & extra tape drive parts? | archiver | 2000 | 1 | 23-06-2002 22:54 |
| "Motors and Drive train edition" of Fresh From the Forum | Ken Leung | CD Forum Support | 6 | 29-01-2002 12:32 |