MeArm (servos) controlling little problem

Hi everyone,
First
I use meArm with arduino.

meArm is consisting of 4 servos sg90 controlled by arduino to do as an arm doing with (base, shoulder, elbow, gripper) joints.

The code and connections with arduino are good.

But here is my problem.. when I connect 4 servos to arduino with (6V 4A ) supply it seemed jittering or late responses a little bit, but when I connect 3, 2 or even 1 servo it works fine without any jitter,
Is that mean my battery current isn't enough for 4 servos?

What should I do?
Maybe giving each 2 servo with a separated battery but all grounded together?
Or connecting 2 batteries in parrllel with the same voltage to increase current flow becuase I heard here this note:
"NOTE: The Starting Current of The Analog Servo Motor Should Be Over 1A/2A and Miuzei Servo SG90 are Analog Servos Need to Continuously Provide a PMW Signal, Then it Will Be Work Normally."
Any suggestion please?I'll be so glad to see your responses I stopped completing my project because of servo jittering problem
I am waiting for your brilliant responses.:slight_smile:

The schematic:

Most likely.

A). Post a schematic.
B). Post a few images of your project.
C). Post the code in code tags.

Don't use a breadbord for servo power distribution. Yhey are not designed to carry amperes, only milliamps.

I am a new member so this is a copy of my code:

//using meArm library
#include "meArm.h"
#include <
Servo.h>
//pins for meArm
int basePin = 11;
int elbowPin = 10;
int shoulderPin = 9;
int gripperPin = 6;

//meArm arm: get below parameters from ik_calibration
meArm arm(
      180,0, -pi/2, pi/2,    //Base     (-90 to  90 degrees)
      125,37, pi/4, 3*pi/4,   //Shoulder ( 45 to 135 degrees)
      89,44, 0, -pi/4,      //Elbow    (  0 to -45 degrees)
      //40,120, pi/2, 0);        //Gripper open to close  ( 90 to   0 degrees)
      40,140, pi/2, 0);        //Gripper open to close  ( 90 to   0 degrees)

boolean DEBUG = true;

void setup() {
  arm.begin(basePin, shoulderPin, elbowPin, gripperPin);

  Serial.begin(9600); //turn on serial port

  //move the arm to the home position
  arm.gotoPoint(0,80,60);
  delay(1000);
  arm.closeGripper();
  delay(100);
}

void loop() {

  //***** grab a color token *****

  arm.openGripper();
  delay(100);
  arm.gotoPoint(-50,80,60);
  delay(100); 
  
  //token location
  arm.gotoPoint(-50,130,5); 
  delay(100); 

  //grab it
  arm.closeGripper();
  delay(500);

  //bring it up
  arm.gotoPoint(-50,80,60); 
    delay(500);

  arm.gotoPoint(-180,50,52); 
  delay(2000);
  arm.gotoPoint(0,80,60);
  delay(500);
//    red
      arm.gotoPoint(40,170,52);
      delay(500); //pause

//   'yellow':
      arm.gotoPoint(100,170,52);
      delay(500); //pause

//    'green':

      arm.gotoPoint(160,150,52);
      delay(500); //pause
      arm.gotoPoint(-180,50,52);
      delay(500); //pause
      arm.openGripper();

  delay(500);

  return;
  
}

What is the maximum milliamps this breadboard transfer

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Edit your post and put the code in code tags.

Hobbyist breadboards can do a few milliapms at best <350ish ma. A plastic geared servo wants about 800ma per servo.

Thanks, now it is easy reading

Thanks you, the code now is in code tag, and yes then it is 4 servos is that (800mA×4) at max needed from battery?

plus what the rest of the circuit requires. plus a bit extra.

It is a color sorter project but first i edited the code so to test the movement of meArm and save the positions it goes to, the main thing is that when i attach 4 servos they do jittering but when i remove one of them the result is that the movement of those 3 servos accurate and without jittering ...
Maybe when 4 servos take from this battery with respect to control pin of each servo, when the load changed , the voltage drop decreases so that 4 servos do at once maybe do something. I'm not sure...

I solved the problem, by adding a large capacitors in parallel with the battery so that the swing voktage wouldn't ripple the voltage when a load absorbs current from battery so in other words, the capacitor will make the battery voltage as constant as it can be.

I tested the 4 servos and there is no jittering anymore.

Thanks to all participants... :, :yum:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.