FYI: Adafruit SoftServo library test

Fyi I downloaded the Adafruit SoftServe library for my new Trinket, here.

Quick test so far as shown attached: 90 degrees gives a 1500us pulse as you can see, and (bottom right of shot) it’s repeated at (near enough) 50Hz as expected.

soft servo 1500.jpg

Hi, I have a same experience. Library is generating pulses from 1000us to 2000us which is around 90 degrees only. I have checked it on osciloscope too. Also connected to own power +5V not from Arduino.
Anybody some idea?

BTW I have tried many servo libraries for ATtiny but only this Adafruit library is rock solid, no jittering as others. Hmm, but only 90 degrees movement…


I'm not sure if you're saying there's a problem with the library?

Servo pulses are normally only between 1000 and 2000us. If that only translates to a sweep of 90 on your servo, not 180, that's a servo issue not the library.

zoomkat has said in a recent post, that many servos restrict the movement, although the pulses are correct at 1000-1500-2000.

Hi, I have a same experience. Library is generating pulses from 1000us to 2000us which is around 90 degrees only

90 deg. is the normal rotation range produced by RC equipment for servos. All of the inexpensive analog RC servos I've used generally have a ~180 deg rotation range when supplied pulse durations of ~500us to ~2500us. The SoftServe library may be designed to use the same rotation range that is produced by RC equipment and not the "extended" range often used by robotic types.

I've also found this issue, as zoomkat pointed, the generated pulse is between 1000 and 2000 uSec, that gives you a rotation from 0 to 90 degrees approximately, if you want to open the rotation range just need to edit softserial.cpp file and change the line:
micros = map(a, 0, 180, 1000, 2000);
micros = map(a, 0, 180, 500, 2500);
as you can see, the map function is used funcion to calculate duration pulse according the degrees inside the write function, after this change the servos rotate full 180 degrees smoothly

En español:

También he encontrado este detalle, como zoomkat señaló, el pulso generado es entre 1000 y 2000 usegundos, que le da una rotación de 0 a 90 grados aproximadamente, si desea abrir el rango de rotación sólo tiene que editar el archivo softserial.cpp y cambiar la línea:
micros = map (a, 0, 180, 1000, 2000);
micros = map (a, 0, 180, 500, 2500);
como se puede ver, la función de mapa se utiliza para calcular la funcion de pulso de duración según los grados dentro de la función de escritura, después de este cambio los servos giran 180 grados sin problemas

Servo library supports 850us to 2500us for the "standard range".

In other words there is no standard...

Per the servo.h file "default min is 544, max is 2400". Apparently these values can be changed when the servo is attached.