View Single Post
  #5   Spotlight this post!  
Unread 26-03-2002, 09:59
ttedrow's Avatar
ttedrow ttedrow is offline
Herding electrons
AKA: Tim Tedrow
FRC #0281 (EnTech)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Greenville, SC
Posts: 165
ttedrow will become famous soon enoughttedrow will become famous soon enough
Re: Programming Loops

Quote:
Originally posted by Mike o.
Hey all! Alright I have a question about measuring the values in the code. When you put the program into the bot and your using a motor to rotate you put in the number that will rotate the motor the right amount right?
Maybe a little clarification is needed here. When your program outputs a number to the PWM, it applies a voltage to the motor that make the motor turn at a speed for the given load on the motor. If your load on the motor changes so dose the speed. If I understand your question, you want to rotate the motor a certain distance. To do this you would have to have something that could provide a time reference to your program and the motor load would have to remain constant. I’m sure you are starting to see the problems in this method on controlling distance.

Now a better way. As was referred by the other members, feedback control. Try using limit switches or a potentiometer input to limit the travel of the motor. Limit switches can be used if the travel distance is fixed. Potentiometer feedback can be used if the distance will be variable.

I hope this helps