### Author Topic: how to control the speed of a servo  (Read 2448 times)

0 Members and 1 Guest are viewing this topic.

#### aruna1

• Supreme Robot
• Posts: 381
• I'm an Ordinary guy
##### how to control the speed of a servo
« on: January 13, 2009, 07:09:23 AM »
well i guess we cant do it with PWM coz Servos use PWM to position change,so how to controll the sped of a servo?
thanks
I'm Me

#### izua

• Supreme Robot
• Posts: 682
##### Re: how to control the speed of a servo
« Reply #1 on: January 13, 2009, 07:36:35 AM »
Instead of sending 1 signal to move of 2000 us when your servo is at 1000 us, you send intermediary signals: 1000, 1100, 1200, 1300, etc. The distance between these signals determines your speed. If your speed is low, you will have to use intermediary more points: 1000, 1001, 1002, 1003 so the servo won't jerk.
« Last Edit: January 13, 2009, 07:37:08 AM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

#### aruna1

• Supreme Robot
• Posts: 381
• I'm an Ordinary guy
##### Re: how to control the speed of a servo
« Reply #2 on: January 13, 2009, 07:39:55 AM »
Instead of sending 1 signal to move of 2000 us when your servo is at 1000 us, you send intermediary signals: 1000, 1100, 1200, 1300, etc. The distance between these signals determines your speed. If your speed is low, you will have to use intermediary more points: 1000, 1001, 1002, 1003 so the servo won't jerk.

ahh i didn't get it can you explain it more simply? I'm new to servos and never have used one.I'm trying to learn theories
and can you take a look at this
http://www.societyofrobots.com/robotforum/index.php?topic=6500.0

« Last Edit: January 13, 2009, 07:41:22 AM by aruna1 »
I'm Me

#### izua

• Supreme Robot
• Posts: 682
##### Re: how to control the speed of a servo
« Reply #3 on: January 13, 2009, 11:31:54 AM »
Meh. Ok, so you keep sending a servo the same signal at 50 hz, right?
Now, let's say you are sending it 1000 us, so it's on one extreme. If you send start sending it 2000us instead, it will move at full speed at the other extreme.

You want to control this speed.
So, instead of sending it 2000us, you will send it 1005, and wait 5 times the frequency. Next, you send it 1010 and wait 5 times the frequency. You the send 1015 and wait 5 times the frequency. You will reach 2000 slower than maximum speed, thus, you have obtained your goal: controlling the servo's speed.

The increments between successive steps (1000, 1005, 1010 or 1000, 1001, 1002) and the delta t (time difference) between signal changes will determine the final speed.
Got it?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

• Supreme Robot
• Posts: 11,663