View Single Post
  #1   Spotlight this post!  
Unread 10-09-2008, 13:17
Andy A. Andy A. is offline
Getting old
FRC #0095
Team Role: Coach
 
Join Date: Jun 2001
Rookie Year: 2001
Location: New Hampshire
Posts: 1,014
Andy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond repute
Servo 'smoothing'

Ok guys, heres an off season question-

I'm a mechanical engineer who's gotten roped into programming. I'm using a 2008 IFI control system to control a small robot during it's prototyping stages. Later on we'll use a much simplified embedded controller, but right now I like the IFI equipment because it was cheap, familiar to me and offered all the capability I needed.

I am controlling a servo powered 'pan/tilt' platform, sometimes under scripted routines and sometimes under 'manual' control with some pots. I've run into a big 'jitter' problem. I'm assuming the pot's being used on the OI side of things float around a bit and that variation shows up in the servos as jitter (bounces around a position rapidly and seemingly randomly). I know that the servos them selves are fine because if I generate the pwm value in code they hold position with no jitter.

I'm stuck with the pots and servos I have, but I need to smooth out these jitters so the platform I'm moving is steady even when under 'manual' control. So I am I right assuming I need some sort of algorithm that takes the analog inputs from my crummy pots and smooths them out. Or maybe a function that checks my input value, evaluates it for a delta and only updates the PWM signal if that delta exceeds a value? If I can eliminate the jitter with out any loss of speed or range in the servo, fantastic.

Right now the pwm values are hooked directly to the analog inputs. I have some functions that limit their range and add a dead band, but none of my smoothing code attempts have done any good.

As a good friend of mine once said about my programming ability '(I) know just enough to be dangerous'. I'm really out of my clueless when it comes to PID loops, look up tables, interrupts and advanced stuff like that. My gut tells me there is a really simple way to do this, but anything beyond programming my coffee maker is over my head. So, small words and patience are always appreciated when I venture into this forum.

Thanks guys. You never appreciate your teams programmers till you don't have one around anymore. I know I'm missing them now.

-Andy A.