View Single Post
  #3   Spotlight this post!  
Unread 13-02-2012, 12:25
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: using the pid module

Quote:
Originally Posted by cajsc View Post
I'm a mentor of a rookie team and everything is going well by now.
But we're trying to use a PID to self-balance the robot in the ramp using a Gyro to do so with no luck.

Can somebody give me an advise for it??
.

We are going to try this but have not gotten around to it yet. Is the gyro working by itself? Note that it needs to be mounted vertically (in the X-Z plane) to accomplish your task. Are you using LabView or C++ or Java?

The basic approach is to use the gyro as the feedback (with the level setting as the setpoint) and your wheels as the actuator. Set the proportional gain very low - make sure the robot is moving in the correct direction. Then slowly raise the gain till you get a good rate of closure on the setpoint. Use the D gain for dampening any oscillation you get around the setpoint and the I gain for fine tuning the final position (where the servo settles). I suspect you might need no D gain since weight of the robot itself dampens the servo.

HTH
__________________
Fast, cheap or working - pick any two!
Reply With Quote