Go to Post I'm intrigued by the possibility of Mayan stadium sports, minus the whole sacrificing part. - AlecMataloni [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
  #2   Spotlight this post!  
Unread 31-12-2002, 19:45
kmcclary's Avatar
kmcclary kmcclary is offline
Founder 830/1015;Mentor 66/470/1502
FRC #0470 (Alpha Omega Robotics)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 1994
Location: Ann Arbor, MI
Posts: 491
kmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond repute
Re: How do you set a speed limit on the servo

Quote:
Originally posted by Fares
hey guys , we are pretty new to this and we are trying to gear down one of our servos . We are not pretty sure how to do that , and i have been trying to use Robogui to do it but it doesn't seem to do anything or i guess i am not doing the right thing what is the code to gear down the servo, we 've been looking around and we don't know what the maximum number is and the lowest number etc... if you guys are able to help that will be great.
Servos are a controlled by specifying a "target position", and sending a series of PWM pulses to "jerk" it toward that position. As the actual PWM signals to the servo are generated by separate circuitry in the RC and are NOT under your control, you CAN'T simply reduce the number of PWM pulses to slow it down.

There are still two primary ways I can think of off the top of my head to slow down servo travel:

1) GEAR IT DOWN (for real) on the servo output with gears! For every 2:1 geardown, you get 1/2 the speed. The disadvantage is that you also reduce the total end to end travel by the same amount.

2) "Walk" the servo slowly in software, by gradually incrementing and sending a new "target position value" over MANY loops.

Example: Assume the servo is at position 100 now (range is 0-255) and wish to end up at position 200. If you increment the output position value by ONE each loop it will take you 100 loops, or roughly 2.5 seconds to get there. If you wish faster travel simply increment by a larger amount per loop. For slower travel, take several loops to increment the output by one with an additional "factor counter" variable.

Fractional increments can also be done this way... For example: For every three loops, increment the desired target position by two.

In all cases, once done you keep resending the final target position value for each loop thereafter.

Does this make sense to you?

- Keith
__________________
Keith McClary - Organizer/Mentor/Sponsor - Ann Arbor MI area FIRST teams
ACTI - Automation Computer Technologies, Inc. (Sponsoring FIRST teams since 2001!)
MI Robot Club (Trainer) / GO-Tech Maker's Club / RepRap-Michigan) / SEMI CNC Club
"Certifiably Insane": Started FIVE FRC teams & many robot clubs (so far)!
2002: 830 "Rat Pack" | 2003-5;14: 1015;1076 "Pi Hi Samurai" | 2005-6: 1549 "Washtenuts"/"Fire Traxx"
2005-(on): 1502 "Technical Difficulties" | 2006-(on): FIRST Volunteer!
2009-(on): 470 "Alpha Omega" | WAFL | Sponsor & "Floating Engineer" for MI Dist 13 (Washtenaw Cnty)
2011: 3638 "Tigertrons" | 2013-(on): 4395 "ViBots" | 2014-(on) 66 "Grizzlies"
"Home" Teams: 66, 470, 1076, 1502, 4395
Local FIRST alumni at or coming to Ann Arbor (UM/EMU/WCC/Cleary)?
...We Want YOU as a Mentor! Please email me for info!
Support CDF Reputation - If a posting helped, thank 'em with rep points!
"It must be FRC build season when your spouse and children become 'Action Items 8 & 9'..."
 


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
"Automatic Transmission" Madison Technical Discussion 70 24-11-2003 09:03
speed controllers & circuit breakers deuceswild Electrical 2 15-01-2003 14:46
Power, speed, and torque... AGH Gui Cavalcanti Technical Discussion 5 10-11-2002 19:02
Calibrating speed controllers and joysticks thedillybar Technical Discussion 4 11-02-2002 13:24
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 16:45.

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