Servo smooth degree turn

So I got a project in few months and collecting huge amount of data of different components and It's servo time, I tested 9s servos in the past most people are familiar with 9 grams servo 3 pins, vcc,gnd,signal (pwm)..etc and the inside of the servo a pot that detect angle degree.etc

So long time ago I played with servo just the basic example degree turn so moving the servo by accurate degree it's a big satisfaction :D but even moving it by degree there is a gap between degrees and if you add a Gyro sensor that gap is pretty annoying because it makes the servo to change fast between degrees and it shakes. So is there a way to make the servo to turn the degrees in the same period of time but to be a smoother movement not a sharp movement?

D.60

Hmmm... microseconds...

Split the movement into a sequence of very small moves and put a small delay between each step. Use a for loop to do this. Then use the write microseconds class of the servo driver to get better than degree changes.

Hi, Mate can you read your posts back after you post them, they are very hard to read.

So I got a project in few months. I am collecting huge amount of data of different components and It's servo time, I tested 9s servos in the past most people are familiar with 9 grams servo 3 pins, vcc,gnd,signal (pwm)..etc and the inside of the servo a pot that detect angle degree.etc

So long time ago I played with servo just the basic example degree turn so moving the servo by accurate degree it's a big satisfaction :D But even moving it by degree there is a gap between degrees, if you add a Gyro sensor that gap is pretty annoying. Because it makes the servo to change fast between degrees and it shakes. So is there a way to make the servo to turn the degrees in the same period of time but to be a smoother movement not a sharp movement?

Sorry mate, but I had to, to see what you wanted. Your problem is I gather, servo instructions are in degrees, integers, so you jump from say 5 to 6degrees, you want a smooth transition.

You need to directly control the servo control pulse length, it may give you better resolution. Try here.

https://www.arduino.cc/en/Reference/Servo Tom.... :)

Sorry for my bad post :smiley:
Sometimes i write fast without reading what i wrote and sometimes doesn’t make sense :smiley:

Well I got a servo that turns 1`degree a time with a period of time in between each degree, while I plug
the Gyro and turn the Gyro around the servo turns too but when I stop or try to spin it slowly the servo
start shaking because turning a single degree a time there is a “big gap” between them.

I want to get rid of that shake but to keep the time respond stable not fast and not slow but normal/standart
speed.

I want to use this method on a airplane that I’m building and having shaking servos will make the plane a bit
unstable.

D.60

Hi,

Fine mate, check here.

https://www.arduino.cc/en/Reference/Servo

in particular writeMicroseconds()

Tom..... :)