|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||
|
|||
|
Re: victor 884 basics
Quote:
8 bits of resolution across the entire servo pulse range gives you less than 4 bits of resolution across the active range. To properly run this test, you need at least 9 bits of resolution across 0.5ms-2.5ms, preferably more. apalrd did a great job of explaining what the signal looks like, and you need your test signal to be more precise that the measurement equipment (the vic/jag). Calculate what your test signal resolution is, and use that to predict how many steps a "perfect" (infinite resolution) device would give. If you later measure a number of steps within a factor of 2 or 4 of this, your test signal doesn't have enough resolution. Second, you need a better way of actually measuring the number of steps. Your ears just ain't going to cut it. An honestly, I wouldn't even really trust a method that involves measuring the rotational speed: That would put the motor's imperfections into your measurement of the speed controllers' quality. Stick an oscilloscope across the outputs and measure duty cycle. Plot output duty cycle vs input duty cycle. You should get a piecewise step function. Again, you should have at least 4 input duty cycle points per step, or the test is flawed. |
|
#3
|
||||
|
||||
|
Re: victor 884 basics
There wasn't actually any measurement involved, as I wasn't actually testing how many steps the Victor gave. I had just calibrated the Victor and was turning the pot when I noticed it jumping. The numbers I posted above were merely meant to illustrate the general problem that I was having of an extreme lack of precision in one direction, not as hard data on what was actually happening. Sorry for any confusion there, and thanks for the tips on how to actually measure it.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|