Go to Post Is there a way to spotlight an entire thread? - ctt956 [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-12-2002, 09:33
Fares Fares is offline
Registered User
#1009 (Vikings)
 
Join Date: Dec 2002
Location: Georges Vanier S.S (Toronto)
Posts: 5
Fares is an unknown quantity at this point
How do you set a speed limit on the servo

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.
  #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'..."
  #3   Spotlight this post!  
Unread 31-12-2002, 19:50
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,519
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Fares,
Do you mean servos or the EduRobot motors?
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #4   Spotlight this post!  
Unread 31-12-2002, 20:51
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Quote:
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.
Errr just a little note there not known as PWM signals there known as PPM. PWM is what speed controllers use to modify speed of a motor while PPM is the pulses used by radio controlled units to give servo's their position commands.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill
  #5   Spotlight this post!  
Unread 31-12-2002, 21:39
Fares Fares is offline
Registered User
#1009 (Vikings)
 
Join Date: Dec 2002
Location: Georges Vanier S.S (Toronto)
Posts: 5
Fares is an unknown quantity at this point
hey guys thanks for the input , well what i am getting from u is that there is no easy way of coding the speed of the motors. Am i right? i have been trying to reduce the speed , there is no way to gear it down , and i don't think i can reduce the speed of the relays can i ? i am talking about the EDU motors , we are not sure what to do as the servo we have is just too fast and uncontrollable
  #6   Spotlight this post!  
Unread 31-12-2002, 21:44
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,519
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Quote:
Originally posted by Fares
hey guys thanks for the input , well what i am getting from u is that there is no easy way of coding the speed of the motors. Am i right? i have been trying to reduce the speed , there is no way to gear it down , and i don't think i can reduce the speed of the relays can i ? i am talking about the EDU motors , we are not sure what to do as the servo we have is just too fast and uncontrollable
Okay, this changes things a bunch. The EduRobot motors are not servos at all. Servos have potentiometers and mechanical stops. The Edu Motors do not. You should be plugging the motors into the PWM outputs on the controller, not the relay outputs. Then, the default code will run them at variable speed according to how you move the joystick. Treat the Edu Motors just as you would a normal DC motor hooked up to a PWM speed control. The only difference is that the speed control is internal in the Edu Motors.

<edit>It is okay to plug the motors into the relay outputs but you will only get the maximum speed like you described</edit>
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004

Last edited by sanddrag : 01-01-2003 at 00:09.
  #7   Spotlight this post!  
Unread 01-01-2003, 15:04
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
Yep, it is PWM...

Quote:
Originally posted by wysiswyg
Errr just a little note [they're] not known as PWM signals [they're] known as PPM. PWM is what speed controllers use to modify speed of a motor while PPM is the pulses used by radio controlled units to give servo's their position commands.
Sorry, but that is NOT correct for our purposes. Pulse Position Modulation is where the TIMING of pulses carry the information. IOW, exactly WHEN a pulse comes through is important.

Yes, a standard model radio control system's CARRIER ENCODING uses PPM, but that is NOT true of the servos themselves. In fact, we do not use PPM at ALL in this contest because the Ewave radios used here are packet radios, not standard radio control model radios.

A servo uses PWM, or Pulse WIDTH Modulation, where "how WIDE the pulse is" carries the information. A positive going 5V pulse WIDTH represents where you wish the servo to end up. A 1ms pulse represents full one way, and a 2ms pulse means full the other way. A 1.5ms pulse represents the center position.

The decoder in a standard radio control receiver converts the transmitted PPM signals into PWM for the servo, often with a very cheap and simple SIPO shift register chip. The Robot Controller uses a dedicated PIC micro (which we can't see) to decode packet data, which are then shipped into STAMP variables for us by the SERIN command.

Quote:
Originally posted by sanddrag
Okay, this changes things a bunch. The EduRobot motors are not servos at all. Servos have potentiometers and mechanical stops. The Edu Motors do not. [...] It's OK to plug them into the relay outputs
Actually, they ARE still "modified servos". They did the old modeler's standard trick of cutting out the limit tab and replacing the pot with a pair of fixed resistors. This makes it BELIEVE you are AT the center position at all times, AND converts the servo into a gearmotor. Now when you send it anything OTHER than a 1.5ms pulse (a 127 value), the motor desperately tries to "fix a bad position", running forever one way or another. The "panic level" (motor speed) is proportional to how far "wrong" it thinks it is. This old trick is also what a Victor emulates, with the addition (to prevent stall currents) that it won't move at all unless you're at least asking for 10% motor power.

You are right that you MAY plug the EduRobot multi-speed motors into the Relay Outputs as well, only getting full on one way or the other. IFI did a special additional circuit in the multi-speed motors to emulate a Spike. It automatically recognizes WHICH kind of signal it's getting (PWM/Victor, or Voltage/Spike) and "does the right thing". VERY cute... You can't do that with a servo you modified yourself. They'd only respond to the PWM signals, and might burn out if attached to the Relay Output connector. Similarly (in reverse) if you made a Spike emulator circuit for a gearmotor.

BTW, that is also why they have four pins on their motor connectors instead of three. To emulate a Spike, you need FOUR wires (logic/motor power, forward, reverse, and ground). See the Edubot documentation (EDU_Robot_Controller_Reference_Guide.pdf) on the IFI site for more information.

- 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'..."

Last edited by kmcclary : 01-01-2003 at 15:08.
Closed Thread


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 04:30.

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