View previous topic :: View next topic |
Author |
Message |
chtham
Joined: 02 Nov 2005 Posts: 3
|
Speed and postion control servo at the same time? |
Posted: Wed Nov 02, 2005 11:53 pm |
|
|
It's quite tricky to control the speed and postion of a RC servo at the same time.
Last edited by chtham on Fri Nov 04, 2005 12:55 am; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Thu Nov 03, 2005 12:42 am |
|
|
Strictly speaking, you can control only one of the two, because speed is a derivative of the position. Tell us more. |
|
![](templates/subSilver/images/spacer.gif) |
chtham
Joined: 02 Nov 2005 Posts: 3
|
servo problem |
Posted: Thu Nov 03, 2005 1:04 am |
|
|
Hi,
My final goal is to control multiple servo (the speed and position) serially. First i need to control only one. I understand that a servo rotates 180 degree on a 2ms pulse width and a 0 degree on a 1ms pulse width ; 1.5ms pulse width as center (90 segree). Pulse period is 20ms (50 Hz).
I got an idea that is from 0 degree to 180 degree, it will rotates at maximum speed. So, i need to slowly increment the pulse width to make it rotate slowly.
The problem occurs when i want it to rotate the 1st 90 slow and the 2nd 90 fast.
Thank you for your reply. :-) |
|
![](templates/subSilver/images/spacer.gif) |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Thu Nov 03, 2005 1:22 am |
|
|
Instead of giving your servo one 90deg comand, give it multiple commands (1deg, 2deg, 3deg...) at the desired rate. |
|
![](templates/subSilver/images/spacer.gif) |
hillcraft
Joined: 22 Sep 2003 Posts: 101 Location: Cape Town (South africa)
|
Servos |
Posted: Thu Nov 03, 2005 11:25 am |
|
|
Servos generally only move about 120 degrees. The movement speed of the servo is a function of the capability of the servo. I use a high speed digital JR servo for the tail rotor of my helicopter. This allows the tail to react very quickly. A normal off the shelf servo is too slow for proper tail control when a fast gyro is used. You must take a close look at comparative servo spec sheets to get an idea of which servo you should be using. Another thing to remember is that a standard servo is pulsed at 20ms intervals. This means a change of position command can only be given every 20ms which also limits the travel speed of the servo. Another thing to remember is that the travel speed of the servo is also determined by the load on the servo. |
|
![](templates/subSilver/images/spacer.gif) |
sseidman
Joined: 14 Mar 2005 Posts: 159
|
|
Posted: Thu Nov 03, 2005 12:12 pm |
|
|
I don't think you can get enough access to the "guts" of an RC servo to do what you want to do. The problem is that the control algorithm is rather hidden from the user, and all you can do is modify the input.
Servos have a pot in them that is used to control the width of a one shot. This width is compared to the width of the input pulse, internally, and the output of this process is used to drive the servo.
Of course, you can capture the pot and the motor inputs, throw out the rest of the servo "guts", implement your own h-bridge, and control the servo yourself.
Short of this, you need to use the idea of sequential "go to" sort of commands, like recommended earlier, though this might very well prove unsatisfactory. |
|
![](templates/subSilver/images/spacer.gif) |
chtham
Joined: 02 Nov 2005 Posts: 3
|
servo |
Posted: Fri Nov 04, 2005 12:20 am |
|
|
I'm using a standard Hitec (HS-311) servo. I've tested it. It can rotates from 0 to 180 deg. Or another way to say is plus or minus 90deg.
I'm using a PIC16F877, 4Mhz crystal, and CCS -PCM version 3.15... |
|
![](templates/subSilver/images/spacer.gif) |
|