View Single Post
  #19   Spotlight this post!  
Unread 15-03-2009, 10:08
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Common failures with TETRIX

Quote:
Originally Posted by alan4cast View Post
13) more servo options, or some way to not reset the encoder position in both lego and drive motors when the program starts running.
Yes, Both the Lego and DC motors use pulse counting encoders, so they don't have any absolute way of detecting their starting position.

You either need to have some way to "home" them, or some external absolute sensing device.

One idea to Home a motor is to add a touch sensor, and run the motor at low power until it hits the sensor (or some other hard stop). The you can reset the encoder. Remeber... use low power !!!! Or, you can reset the encoder every time the arm moves past a light senor.

The other thing to consider is that it IS legal to add the Hitechnic soldered prototyping board, with external sensors ..... like a potentiometer. In theory you could add a feedback pot to an arm to sense the actual position, and just use the encoders for fine speed control.

Servos are great, but unfortunately you can't read their starting position, so your first action has to be to move them to some safe position. If you can always physically place your servo arm in a known position (eg: all the way up or down), then if you can figure out the servo values that correspond to this starting position, that can be your first servo command.... eg: Go to where I know you should be starting.

I do like that you can send the servo to position "0" which means "stay where I last sent you". why? If you don't continually send servo commands, they will droop down after about 2 seconds... so, to prevent this, you can have a loop that runs in the background sending "0" comands, which will keep them wherever they were last commanded. Unfortunately you can't start out by sending "0" commands because there is no "history" and the servo will go to the center.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote