Go to Post Regardless of the next course of action, getting steamed and angry will benefit nobody. And coming from me, that has to mean something. - Lil' Lavery [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #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.
  #2   Spotlight this post!  
Unread 05-04-2011, 18:34
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: victor 884 basics

Quote:
Originally Posted by Thomas DeSilva View Post
... 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.
... I was hoping that you had actually measured the number of speeds. This is an extremely flawed test plan.

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   Spotlight this post!  
Unread 05-04-2011, 18:54
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

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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi