Go to Post "Why even bother building a robot if we're not gonna win?". The answer? To learn and grow. - MrBydlon [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 06-12-2011, 02:04
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Grabbing oblong objects

Quote:
Originally Posted by theprgramerdude View Post
Do you know why your first derivative potentiometer readings may be unstable? I'd recommend trying to instead take the average derivative over a period instead, so either integrate a few derivative values and divide with respect to time, or just take the readings from the potentiometer at a much slower rate (I'd recommend the first one if your ADC+Pot combo is possibly the issue and you have the compute power, it essentially equates to crude oversampling).
The HiTechnic prototype board has 10bits of ADC resolution.

Quote:
Originally Posted by Hitechnic.com;
The prototyping board update rate may be controlled within a range of 4-100 milliseconds per sample.
So, it can do 10 - 250 samples per second.
The code that I tested was sampling every 10 ms, or 100 times a second.

The mechanism is using a 270 degree linear 10k Ohm potentiometer, and uses almost all of that range ( > 230 degrees)
through gearing, and actual movement range.
with that, there are about 3.79259 ticks per degree on the pot.

While running, the velocity would be about 3 ticks per cycle.
The problem arises when it is not moving, as there are a few readings that have near the same values as when it is not moving.

I will try it with a longer sampling time, in an attempt to get more ticks per cycle, which should allow a better distinction between moving and not moving.

The question then becomes: how do I use the velocity readings to change the setpoint of the PID controller?
I would imagine that a timer would be needed, as I don't want it to think that it was stalled right when it started moving and thus immediately change the setpoint and not move.
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
 


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 18:50.

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