Go to Post Please try to apply GP to situations where it makes some sense, as otherwise you're just diluting the meaning. - Kevin Sevcik [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 02-04-2006, 21:57
TimCraig TimCraig is offline
Registered User
AKA: Tim Craig
no team
 
Join Date: Aug 2004
Rookie Year: 2003
Location: San Jose, CA
Posts: 221
TimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to behold
Re: Scaling

Quote:
Originally Posted by ForgottenSalad
By that I mean what I would have to add to the pwm01 = p1_y;
You need to provide a "transfer function" which will convert the joystick setting to PWM output for the Victor speed controller. It could look something like the following:

pwm01 = PctSpeedToPWM(p1_y);

Be advised that the response of the Victor speed controllers is HIGHLY nonlinear with respect to the PWM input values. From my tests, it's essentially exponential, that is, linear when plotted on semilog paper. The actual curve is dependent on robot weight, wheel friction, drive train friction, etc, so your mileage may vary. On our robot we get about 90% of speed at 44% of PWM range. I've attached a picture of the measured data.

On our robot, we use table of points forming a piecewise linear function that is interpolated. This allows much greater sensitivity under joystick control than using the straight IFI default code method you currently have. By playing with the transfer function, you can make the robot speed linear (or very nearly) with respect to the joystick. Biased so that it's less sensitive at low speed, for instance doing fine aiming in this year's game or tweaking putting a tetra on the goal in last year's game. Or it could be twitchy at low speed and have more sensitivity at high speed if you need it.
Attached Thumbnails
Click image for larger version

Name:	SpeedVsPWM.jpg
Views:	63
Size:	53.0 KB
ID:	4200  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scaling algorithms rhobincu Computer Graphics 1 10-10-2005 13:25
VEX 2005 = Mini FRC 2004 Joe Johnson FIRST Tech Challenge 12 08-04-2005 17:22
Example gyro code released. Kevin Watson Programming 60 17-03-2005 18:32
Scaling Values in the Control Program archiver 2000 15 23-06-2002 22:24
Scaling on motors Jeff Waegelin Motors 2 13-01-2002 23:07


All times are GMT -5. The time now is 00:46.

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