Good micro processor

Thread Starter

navyguy

Joined Sep 27, 2019
108
Chattering servos in my experience can result from too high a refresh rate or a sloppy signal with digital servos (small dead band). By sloppy signal, I mean something like the simple 555 servo drivers.

Can you put a scope on the servo signal.
Dang that’s one thing I don’t have. A scope
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
Try modify your for() loops for each servo, adding a delay inside each loop like this ( for first servo):
C:
for (pos1 = 180; pos1 >= 0; pos1 -= 1) { // goes from 180 degrees to 0 degrees
    myservo1.write(pos1);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
}
Ok. I’ll try that. Thank you so much
 

Reloadron

Joined Jan 15, 2015
7,480
I loaded it again into an Arduino Uno and it't been running about 110 min. I'll let it continue to run and see what happens.

Servo motors are noisy so yes, a good idea to run the servo from a different supply but sharing common. Wish I had a few more servos.

Ron
 

jpanhalt

Joined Jan 18, 2008
11,087
Dang that’s one thing I don’t have. A scope
Get one. For that frequency very cheap. I would go a step or two above the absolute minimum and get a modern 60 MHz to 100 MHz/2 channel at a minimum.

I have been dealing with servos for a long time. They don't chatter when properly driven. Maybe a bad one will do that, but I have probably had well more than 100 and have discarded or given away dozens. Never seen it. They may go dead, or gears may strip, but I have never seen the symptom you describe with just one servo, much less two. (Some digital servos "grind" or "twitch," but the movement is insignificant.)

Your power rails could be bad, but servos I have dealt with are quite forgiving of power rails. That means a problem in the code. Maybe your simulator can find it, but a scope triggered on a good standard will show it.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,155
ok I changed the program as suggested. Not getting chatter anymore but now just a rythmic jerking of the servos.
Are you driving the servos directly from the Arduino? Does your sketch directly drive the servos or are you using the servo library?

I thought you were using the Adafruit servo shield. But if you aren’t, I don’t recommend using more than one servo on the Arduino. The servo library shares an interrupt on the Arduino and if you have more than one servo, performance will not be stable. You might get away with two servos, but more is looking for trouble.

The shield has its own processor with custom firmware for controlling up to 16 servos smoothly.

Lastly, with the shield, you only send one positioning command per servo position. If your sketch repeats the command, the servos will not move smoothly nor hold a position.

Does any of this make sense?
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
Are you driving the servos directly from the Arduino? Does your sketch directly drive the servos or are you using the servo library?

I thought you were using the Adafruit servo shield. But if you aren’t, I don’t recommend using more than one servo on the Arduino. The servo library shares an interrupt on the Arduino and if you have more than one servo, performance will not be stable. You might get away with two servos, but more is looking for trouble.

The shield has its own processor with custom firmware for controlling up to 16 servos smoothly.

Lastly, with the shield, you only send one positioning command per servo position. If your sketch repeats the command, the servos will not move smoothly nor hold a position.

Does any of this make sense?
Hi, yes makes absolute sense. Thank so much.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
Just wondering if the quality or type of servos would make a difference.
think the last batch I bought off amazon were about $20 for 5.
 

djsfantasi

Joined Apr 11, 2010
9,155
Just wondering if the quality or type of servos would make a difference.
think the last batch I bought off amazon were about $20 for 5.
Depends a lot on what you’re using the servos to move. If you’re asking them to provide a lot of torque, then a cheep servo won’t be able to keep up and will drive your load sloppily. Forward some, backward a little. Cheep servos also have plastic gears and a tooth might break off.

You need to match the torque specification with the required torque. Your pirate arms are going to need a lot of torque. The moment of the long arm is going to be much higher that turning the head. If the servo torque and the required torque are mismatched, the servo is going to have trouble moving to and holding a position.

Also, while your head servos gear train may be able to be plastic, you’re definitely going to need at least a standard RC servo with a metal gear train for the limbs. I wouldn’t be surprised if just one of these servos cost $30. But search for the best deal you can get.
 

BobTPH

Joined Jun 5, 2013
8,765
The chattering sounds like what happens when the servo is not getting a correct data stream. Do you have a multimeter with frequency measurement? If so, read the frequency going to the servo data input, Should be close to 50Hz.

Bob
 

djsfantasi

Joined Apr 11, 2010
9,155
The chattering sounds like what happens when the servo is not getting a correct data stream. Do you have a multimeter with frequency measurement? If so, read the frequency going to the servo data input, Should be close to 50Hz.

Bob
I like your comment, but he is using a dedicated co-processor which maintains the data stream within specs. So I am 100% sure the signal is within specs to 50Hz. The processor firmware allows control of 16 RC servos.

I use the same shield to consistently control 11RC servos without chattering. IMHO, it’s because the servos themselves cannot handle the load he’s putting on them.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
The chattering sounds like what happens when the servo is not getting a correct data stream. Do you have a multimeter with frequency measurement? If so, read the frequency going to the servo data input, Should be close to 50Hz.

Bob
Thanks for that. Yeah it’s crazy because 2 different boards, 2 different servos, 2 different sources of power but all with the same result. Chattering and erratically operating servos. Like both of them having seizures. something going on with my laptop maybe because the program has been tested by others and it seems to work fine. The only difference is the computer and possibly the operating system being used.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
Depends a lot on what you’re using the servos to move. If you’re asking them to provide a lot of torque, then a cheep servo won’t be able to keep up and will drive your load sloppily. Forward some, backward a little. Cheep servos also have plastic gears and a tooth might break off.

You need to match the torque specification with the required torque. Your pirate arms are going to need a lot of torque. The moment of the long arm is going to be much higher that turning the head. If the servo torque and the required torque are mismatched, the servo is going to have trouble moving to and holding a position.

Also, while your head servos gear train may be able to be plastic, you’re definitely going to need at least a standard RC servo with a metal gear train for the limbs. I wouldn’t be surprised if just one of these servos cost $30. But search for the best deal you can get.
ok thanks. What I was really asking is not so much as the torque capability but more to the quality of the electronics. Lots of different manufacturers of servos. Some must be better than others.
 

djsfantasi

Joined Apr 11, 2010
9,155
ok thanks. What I was really asking is not so much as the torque capability but more to the quality of the electronics. Lots of different manufacturers of servos. Some must be better than others.
I tried to say that there is a difference in servos. I’m assuming that you are using analog servos, not digital servos since you’re using the Adafruit shield. Secondly, I mentioned that you may need metal gears instead of plastic gears.

Top Servo Brands
  • Spektrum.
  • Savox.
  • Futaba.
  • Hitec.
  • Tactic.
  • Traxxas.
  • Tekin.
I use mainly HiTec servos.

While you didn’t ask about torque, it’s an important consideration in selecting a servo.

One other thought that came to mind. Are you using separate power supplies for the Arduino and the servos? If you’re using the same power supply, you could be causing yourself some grief. If that’s the case, put a DVM across the power supply and see if it sags when the servo operates. And secondly, how are you powering the Arduino and shield? There are at least four common ways. The USB jack, the supply 2.1mm jack, the Vin pin or the 5V pin.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
I tried to say that there is a difference in servos. I’m assuming that you are using analog servos, not digital servos since you’re using the Adafruit shield. Secondly, I mentioned that you may need metal gears instead of plastic gears.

Top Servo Brands
  • Spektrum.
  • Savox.
  • Futaba.
  • Hitec.
  • Tactic.
  • Traxxas.
  • Tekin.
I use mainly HiTec servos.

While you didn’t ask about torque, it’s an important consideration in selecting a servo.

One other thought that came to mind. Are you using separate power supplies for the Arduino and the servos? If you’re using the same power supply, you could be causing yourself some grief. If that’s the case, put a DVM across the power supply and see if it sags when the servo operates. And secondly, how are you powering the Arduino and shield? There are at least four common ways. The USB jack, the supply 2.1mm jack, the Vin pin or the 5V pin.
Good question. Using only one power supply for both while using the adafruit motor shield. So far I haven’t had any issues in the past. Showing a solid 5.17 volts dc to all the servos. I even removed 2 servos and see if just one Servo would work. Same problem. It’s got to be some sort of glitch between the software and the program. The original program I’ve used in the past still works fine. Just doesn’t run 3 servos simultaneously.
thanks for your input
 

djsfantasi

Joined Apr 11, 2010
9,155
Good question. Using only one power supply for both while using the adafruit motor shield. So far I haven’t had any issues in the past. Showing a solid 5.17 volts dc to all the servos. I even removed 2 servos and see if just one Servo would work. Same problem. It’s got to be some sort of glitch between the software and the program. The original program I’ve used in the past still works fine. Just doesn’t run 3 servos simultaneously.
thanks for your input
No, it doesn’t have to be a software glitch. I think you said you didn’t have an oscilloscope. So you can’t get an accurate picture of the systems current and voltage when a servo changes position. When this happens, there is a current surge. This surge can drop the Arduino power and the hardware can cause a software glitch.

The Adafruit shield has mounting for an optional capacitor. Do you have it installed? It likely will help.

Secondly, you may require a separate power supply for your servos so their operation won’t affect your Arduino and shield. The Adafruit shield has connections for a second, dedicated servo power supply.
 

trebla

Joined Jun 29, 2019
542
something going on with my laptop maybe because the program has been tested by others and it seems to work fine. The only difference is the computer and possibly the operating system being used.
The code for Arduino is generated by Arduino IDE gcc compiler not by operating system. Are the others using exactly the same hardware setup (servo, power source, Arduino, shields, wires etc) as you? Different laptop makes sense in this case only if you power your hardware from laptop USB port because different USB ports may have different power capability.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
The code for Arduino is generated by Arduino IDE gcc compiler not by operating system. Are the others using exactly the same hardware setup (servo, power source, Arduino, shields, wires etc) as you? Different laptop makes sense in this case only if you power your hardware from laptop USB port because different USB ports may have different power capability.
From what I’ve been reading by others input it’s all the same. Ill
figure it out. It’s just a steep learning curve for me. Like learning a whole new language. Those who have been trying to help me are so awsum by providing examples of how how to code.
Reminds me a lot of learning how to say a phrase in a foreign language. It definitely helps but through time and study I’ll eventually learn exactly why every character, letter and number in coding is there and what it does.
Thanks for the input
 
Top