MeArm not working when I attach() more than one servo

Hello! I’m building the MeArm detailed here:

https://create.arduino.cc/projecthub/alejho/mearm-industrial-like-controller-40c932?ref=search&ref_id=mearm&offset=1

I have the breadboard in that exact way.

My code is as follows:

/*
Adafruit Arduino - Lesson 14. Sweep
*/
 
#include <Servo.h> 
 
int basePin = 7;
int leftPin = 10;
int rightPin = 9;
int clawPin = 8;
 
Servo base_servo;
Servo left_servo;
Servo right_servo;
Servo claw_servo;  
 
int angle = 0;   // servo position in degrees 
 
void setup() 
{ 
  base_servo.attach(basePin);
  //left_servo.attach(leftPin);
} 
 
 
void loop() 
{ 
  // scan from 0 to 180 degrees
  for(angle = 0; angle < 180; angle++)  
  {                                  
    base_servo.write(angle);               
    delay(15);                   
  } 
  // now scan back from 180 to 0 degrees
  for(angle = 180; angle > 0; angle--)    
  {                                
    base_servo.write(angle);           
    delay(15);       
  } 
}

As you can see, in my code I have “left_servo.attach(leftPin)” commented out.

With that line commented out, my MeArm rotates 180 degrees back and forth, as expected. Yay!

However, when I uncomment that line and left_servo.attach() is run, my MeArm glitches out. Sometimes not rotating at all, sometimes doing a few jerky rotations, sometimes moving the arm randomly.

This seems to be some kind of power breakdown or something, from my understanding? But I see several other people have several servos running off less power.

I am powering my arduino with a USB and I am powering the servos (through the breadboard) with a 9V battery. My servos say they need 3-7 volts. I am using these servos: https://www.amazon.co.uk/dp/B06XNN1P5Z/ref=pe_3187911_189395841_TE_3p_dp_1

I tried some googling but didn’t find any clear solutions.

Should I just be wiring a bunch more batteries to the servos?

and I am powering the servos (through the breadboard) with a 9V battery

That's a completely inadequate power supply for servos.

Budget 1A per servo and give them 6V.

Small 9V batteries are struggling to provide even 0.1A, let along 4A for 4 servos...

Thanks for the response!

That’s so strange, of all the tutorials I saw, none of them mentioned hooking up multiple batteries.

How should I wire this with my breadboard? Each servo gets its own 6V? Or should I put them in parallel or something?

Everyone who has worked with servos before knows they use a lot of current... Now you do too.

6V in parallel or course, thats how you power things. Remember breadboards are not good with high
current, although you'll likely get away with it, you may be setting your self up for problems.
You can get servo shields that allow power to come in from a terminal block to a whole set of
servo connections in parallel.

I'll try connecting one battery at a time in parallel until I hit the point where my servos are running smoothly.

Thanks a bunch for the responses! I'll report back with how it goes.

I've just realized I have been wasting my time answering the same question in the OP's other Thread, Don't double post.

Click Report to Moderator and ask to have the two Threads merged.

...R