View Single Post
  #1   Spotlight this post!  
Unread 05-04-2011, 17:25
Thomas DeSilva's Avatar
Thomas DeSilva Thomas DeSilva is offline
Programming Fury
FRC #1983 (Skunkworks)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Des Moines, WA
Posts: 22
Thomas DeSilva is on a distinguished road
Re: victor 884 basics

I'm using the Cypress PSoC 5 PWM functionality to send pulses. I think part of my problem was that I was using just about the default PWM configuration that they have, which was running on 8-bit resolution off a 15kHz clock. I haven't tested it yet, but I changed the resolution to 16-bit and the clock speed to 3.8MHz, which (since it's just doing integer math on the clock counts and the "on-times" that I give it) should increase the variance in the outputs while keeping the period about the same. What I'm confused about now is why it gave so many more steps in one direction than the other.

Eric, I have the Victor driving a CIM on a 12:1 P80 using PWM values that I adjusted using input from a linear potentiometer, and I could tell about how many different speeds it was going by listening to the gearbox and watching the output shaft. Not exactly scientific, but it was precise enough for my needs. On the FRC robots that I've worked on, I've never noticed a problem with smoothness of speed changes, so it must be a problem with either how I'm handling the PWM--very likely, I've never done anything with PWM deeper than WPILib's Set()-- or the specific Victors that I'm using.