Thread: Tuning PID Code
View Single Post
  #11   Spotlight this post!  
Unread 26-01-2007, 12:36
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 750
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Tuning PID Code

Yes you can.

You'll need 3 100K pots.

See this document:
http://www.ifirobotics.com/docs/lega...-2004-2-17.pdf


PDF Page #5

Each port provides four analog inputs. These inputs are typically connected to joysticks and potentiometers, providing an analog input ranging from 0 to 254 (in software) that is transmitted to the Robot Controller. In the event that an analog input is less than 0.05V, a value of 127 will be generated. This ensures that when a joystick is unplugged, the corresponding output on the Robot Controller will not go to a full reverse condition. Each port provides +5V Aux, used for wiring to potentiometers or other sensors. The wiring diagram for a potentiometer is shown below. Always use 100kΩ potentiometers.

You'll need to "borrow" a joystick port. And then scale your PID to something different like 0-254 instead of 0-1024 like you would see on the analog port of the RC.


WARNING....UNPLUG....PID pots when in competition.....LOL....


WARNING #2....Make sure that your values default to 0 when radio drops...because by default they go to 127.

I like the pots onboard the robot the best, when robot was up on blocks. Though the below picture looks "kewl" from the OI, RC tuning from the analog was my favorite....
Attached Thumbnails
Click image for larger version

Name:	oi4.jpg
Views:	110
Size:	90.2 KB
ID:	4942  
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369

Last edited by Chris_Elston : 26-01-2007 at 12:42.