Yeh,
I am going to wake up at 3am tomorrow with it all worked out.
Keith
Yeh,
Hi Keith, for the maths, if it helps - take this example.Keith Baxter wrote: ↑Sat May 15, 2021 12:51 pm Hi,
O well. The more I think about this the more I see why peeps steer away. It is far to complicated for most.
I will set up some simplified code so that working out all the math and variables is simply entering a few parameters. Something that definitely needs to be addressed IMHO.
Keith
Hi again and good morning Keith.Keith Baxter wrote: ↑Sat May 15, 2021 1:50 pm Hi,
Another Q...
From an accuracy point of view and thinking about 3D printer steppers. The stepper needs to rotate more than it moves the axis. Servo moves a ( pointer, trim-wheel, aileron and rudder (in a RC plane) etc) ----Yes I understand the difference between servo's and steppers.
In other words the smaller gear should be on the servo and the bigger gear on the pointer. NOT?
Why would the designer of the instruments opt to stress the servo buy having a 1 to 2.5 ratio? Is it for accuracy or speed?
Keith
Code: Select all
Servos are controlled by pulse width, the pulse width determines the horn angle.
A typical servo responds to pulse widths in the range 1000 to 2000 µs.
A pulse width of 1500 µs moves the servo to angle 0. Each 10 µs increase in pulse width typically moves the servo 1 degree more clockwise. Each 10 µs decrease in pulse width typically moves the servo 1 degree more anticlockwise.
Small 9g servos typically have an extended range and may respond to pulse widths in the range 500 to 2500 µs.
Why do people think servos are controlled by duty cycle? Because servos are typically given 50 pulses per second (50 Hz). So each pulse is potentially a maximum of 20000 µs (1 million divided by 50). A duty cycle is the percentage on time. 100% will be a 20000 µs pulse, way outside the range accepted by a servo.
Do some calculations at 50 Hz for sample pulse widths.
500 / 20000 = 0.025 or 2.5 % dutycycle
1000 / 20000 = 0.05 or 5.0 % dutycycle
1500 / 20000 = 0.075 or 7.5 % dutycycle
2000 / 20000 = 0.1 or 10.0 % dutycycle
2500 / 20000 = 0.125 or 12.5 % dutycycle
Don't use dutycycles, if possible use pulse widths, and think in pulse widths. If you send pulses at 60 Hz by duty cycle the servo will go to the wrong position.
Hi Keith,Keith Baxter wrote: ↑Sun May 16, 2021 9:50 am Joe,
I am just going to confuse all even more.
What is a horn angle ?
What is µs ?
What is this guy talking about???
KeithCode: Select all
Servos are controlled by pulse width, the pulse width determines the horn angle. A typical servo responds to pulse widths in the range 1000 to 2000 µs. A pulse width of 1500 µs moves the servo to angle 0. Each 10 µs increase in pulse width typically moves the servo 1 degree more clockwise. Each 10 µs decrease in pulse width typically moves the servo 1 degree more anticlockwise. Small 9g servos typically have an extended range and may respond to pulse widths in the range 500 to 2500 µs. Why do people think servos are controlled by duty cycle? Because servos are typically given 50 pulses per second (50 Hz). So each pulse is potentially a maximum of 20000 µs (1 million divided by 50). A duty cycle is the percentage on time. 100% will be a 20000 µs pulse, way outside the range accepted by a servo. Do some calculations at 50 Hz for sample pulse widths. 500 / 20000 = 0.025 or 2.5 % dutycycle 1000 / 20000 = 0.05 or 5.0 % dutycycle 1500 / 20000 = 0.075 or 7.5 % dutycycle 2000 / 20000 = 0.1 or 10.0 % dutycycle 2500 / 20000 = 0.125 or 12.5 % dutycycle Don't use dutycycles, if possible use pulse widths, and think in pulse widths. If you send pulses at 60 Hz by duty cycle the servo will go to the wrong position.