Go to Post At first blush, people don't need to know about GP any more than they need to know gear ratios, screw classifications, or LabVIEW. It's about Inspiration. It's about Recognition. It's about Science and Technology. That's all it's For; any more than that is just gravy. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Control System
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
  #7   Spotlight this post!  
Unread 14-01-2005, 10:30
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Adjusting Sensitivity/Scale of Controls

Quote:
Originally Posted by ConKbot of Doom
Ive been looking at this problem, but rather than a software solution, I would be interested in a hardware solution. Ive been looking at using a potentiometer as a solution.

I would set up a resistor divider to get .5vcc from the OI and send that to pin 1 on the pot, the signal from the joystick would go to pin 3 and pin 2 would go to the input on the OI. That way the driver could adjust the scale quickly, from no scaling to locked at 127

I know the rules prohibit messing around inside joystick, but allow a custom control box, so I would think that a box in the middle would be in a bit of a grey area. Can anyone lend any clarification to this? I just think that why should we devote processor cycles to something that can be done in hardware so simply. Plus I'm more comfortable with electronics than coding, so I'm sure that plays a role in it too.
Tristan Lall did this to our robot last year using software. We use the older black Flightsticks which have a wheel on them. In fact, the default code still shows variables like "p1_wheel" from these old joysticks =).

The wheel worked as a speed limiter which would scale the total range of the joystick down. Our reason for this was to demo the robot to children, and allow them to drive without fear of breaking things.

I believe this code is UNTESTED, so programmer beware. However the concept alone should prove useful:
Code:
temp_scale_long = (unsigned long) (p1_wheel * 3) >> 2 + 64; //So what if it's stepwise? (Just say no to floats.)
  temp_tankx_long = (signed long)p1_x - 128;
  temp_tankx_char = (unsigned char)(((temp_tankx_long * temp_tankx_long * temp_tankx_long * temp_scale_long)  >> 22) + 128);
  temp_tanky_long = (signed long)p1_y - 128;
  temp_tanky_char = (unsigned char)(((temp_tanky_long * temp_tanky_long * temp_tanky_long * temp_scale_long)  >> 22) + 128);
  pwm01 = pwm03 = pwm05 = Limit_Mix(2000 + temp_tanky_char + temp_tankx_char - 127);
  pwm02= pwm04 = pwm06 = Limit_Mix(2000 + temp_tanky_char - temp_tankx_char + 127);
FYI, we did this in ADDITION to our cubic transfer function, and here Tristan (who once was a driver for Team188) has modified our tank drive code for his preferred one-stick drive.

Hope this helps!

-SlimBoJones...
 


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
Controls for a Crab Drive Ein Control System 22 26-01-2005 20:31
1992 Controls Venkatesh Electrical 6 03-10-2004 22:04
[FVG]: Controls Round C1 Mike Ciance FIRST-related Organizations 18 29-07-2004 20:44
[FVG]: Controls Round B1 Mike Ciance FIRST-related Organizations 18 08-07-2004 09:32
Monkey controls robot with thoughts Jeff Rodriguez Math and Science 7 13-10-2003 14:29


All times are GMT -5. The time now is 07:18.

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