View Single Post
  #22   Spotlight this post!  
Unread 28-02-2004, 01:15
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: pic: Mini-Arm - Controller

Quote:
Originally Posted by mightywombat
How did you guys do it? Is it as simple as finding the difference between the actual and the requested pot values, dividing by a constant and adding the signed int to 127? I'm still working on code for a model, right now we are using joysticks and probably will for competition but its a project of mine.... How do you do it?
We control a single rotating arm with a similar setup. The drive
to the motor is derived from the difference of the values returned
by the pots. This produces a torque on the motor that is proportional
to the error. The result, if you increase the gain to get good precision,
is a harmonic oscillator. If you run in to that, you add a damping force
derived from speed of the arm, calculated by reading its position on two
(or more) successive radio packet cycles between the OI and the RC.
The arm then behaves as a damped harmonic oscillator. With well
chosen damping it won't oscillate at all. Use quality pots that do a good
job of maintaining continuity as they are turned.