Servos Misbehaving

Hi!

I am currently using a teensy 4.1 and I am trying to control two servos. Since the voltage requirement for the servos(Tower Pro GM90S) are 4-6v, I am using a voltage step up to power them. This of course increases the current as well. I am having problems controlling the servos, using the sweep example program with both the Arduino Servo Library and PWMServo library. The Servos preform extra rotations before changing direction. Could this be because of the current, or could it be a software issue?

C++:
#include <PWMServo.h>

PWMServo servo1;

int pos = 0;

void setup(){
  servo1.attach(14, 500, 2400);
}

void loop() {
  for(pos = 0; pos < 180; pos += 1) {
    servo1.write(pos);             
    delay(15);                       
  }
  for(pos = 180; pos>=1; pos-=1) {   
    servo1.write(pos);             
    delay(15);                       
  }
}
 
Servos take a lot of current, please describe in more detail how you are powering them, the current ratings of the parts etc. Also which servos are you using?
 
The Servo is the Tower Pro MG90S. They are connected to a 3.7V 2000mAh LiPo battery which goes through a voltage stepup to 6V
 
please describe in more detail how you are powering them than
goes through a voltage stepup to 6V
Part number, current rating, that sort of detail is essential. A diagram is helpful so we are on the same page.
 
Operating current is 120-250mA, The part number from the vendor I got it from is WHS15024. The circuit is part of a larger project. The Motors represent the servos. It's voltage rating s 4.8-6V.
oboardelectronics.png
 
Now I'm not familiar with the Tower Pro MG90s, but when you power them with 6Vdc, is the 3V3 output of the Teensy sufficient amplitude to reliably drive the PWM control signal?

Paul
 
The current is not coming from the teensy. Do you mean for the signal pin? If you mean current from the battery I believe it is sufficient if not in excess.
 
Do you mean for the signal pin?
Yes, I do mean the control signal pin. The specs of the Tower Pro MG90S do not mention a minimum voltage for the control signal amplitude.
I also did not find any specifications of the WHS15024 boost/step-up converter. Do you happen to have specs or a link to that part?

Paul
 
Yes that's what confuses me is the lack of a min voltage for the control signal. Sorry the step up is here:
 
More commonly known as XY-016 module. But still very limited in specs.

Paul
 
Looking at your code I noticed this line:
C++:
servo1.attach(14, 500, 2400);
Is there a reason why you deviate from the standard values of 1ms and 2 ms, like so?
C++:
servo1.attach(14, 1000, 2000);

Paul
 
Back
Top