Go to Post Ya know...sometimes, design specs get changed at the last second. Or the market changes while you weren't watching. It Happens. - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #16   Spotlight this post!  
Unread 29-01-2007, 13:55
slimemonkey slimemonkey is offline
Registered User
FRC #1015 (Pi Hi Samurai)
Team Role: Programmer
 
Join Date: Mar 2006
Location: Ann Arbor, MI
Posts: 10
slimemonkey is an unknown quantity at this point
PWM to velocity?

One more question about the encoder module..

I couldn't find the actual python code anywhere online...

We have been able to set up the PID module for the power to each motor. The joysticks decide the value to be reached and the pwm values change until that value is reached.

Our next task is how to use a velocity target value and connect that to the motor output (based on the error velocity value).

We plan on doing this using potentiometers to determine the velocity...can anyone help us on somehow reaching the target velocity by altering the pwm output on the motors?
  #17   Spotlight this post!  
Unread 30-01-2007, 12:36
ScottWalls ScottWalls is offline
Registered User
FRC #0245 (AdamBots)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2003
Location: Rochester Hills
Posts: 31
ScottWalls will become famous soon enoughScottWalls will become famous soon enough
Re: Adams Coprocessor Solution

I'll scour around for some of the old encoder modules, although I don't recommend you use them just yet.

You intend to use potentiometers to figure out velocity? I would recommend that you use encoders to control velocity, as potentiometers deal more with position. However, if you would still like to use potentiometers, Post again and I can walk you through code to do so.

Also, for reference, that application of PID is not terribly useful in any real application, although it is fine to test that PID functions. This is because to use a PID loop here is to match joystick output to voltage, which is already perfectly responsive. To add a PID loop only lowers this responsiveness. A more appropriate use of PID would be to match joystick input to velocity output on the motors given by encoders. In this way, you could move the joystick to a position to attain a given velocity, meaning even if there is some resistance against your robot, the PID loop would compensate for it (less driver control).
  #18   Spotlight this post!  
Unread 30-01-2007, 17:17
slimemonkey slimemonkey is offline
Registered User
FRC #1015 (Pi Hi Samurai)
Team Role: Programmer
 
Join Date: Mar 2006
Location: Ann Arbor, MI
Posts: 10
slimemonkey is an unknown quantity at this point
Re: Adams Coprocessor Solution

Thank you for the tip about the encoders.

We decided to match the joystick to the voltage only temporarily to test the PID loop, and until we had a way of measuring the velocity of the wheels. Our main problem is this:

Once we have a set velocity based on the joystick, by how much do we increment the pwm to each motor to reach this velocity? The PID loop will tell us the error in the velocity and the correction value in terms of velocity right? How do we translate this in terms of change in pwm to each motor?
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Vex Brain as FRC Coprocessor Tom Bottiglieri General Forum 25 18-04-2006 22:36
VEX + Coprocessor? ForgottenSalad FIRST Tech Challenge 4 13-04-2006 17:45
Offboard coprocessor! Ben Englert Programming 19 28-03-2006 18:34


All times are GMT -5. The time now is 03:57.

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