Continuous servo MG995 only rotating one direction

Hello, I am making a robot arm and I m using MG995 servos, MG995 servo works in a way that from 0-90 it moves in one direction and from 90-180 it moves in the other direction. My servo works perfectly from 0-90 but from 90-180 it only works until 90-100, it moves but very slowly, i noticed when adding a second ground it works better but it doesnt help much. And from 100-180 it is just clicking, i tried adding second arduino to power but same result, i powering it by 6 volts and same result. There isnt much to code beside this

#include <Servo.h>

Servo servo1;

int input;

void setup() {
  servo1.attach(2);
  // put your setup code here, to run once:

}

void loop() {
  servo1.write(180);

  // put your main code here, to run repeatedly:

}

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

Don't use the controllr board as power supply. It's no designed for motor curfents. Give the servo separate power.
Don't pass motor currents through breadboards

1 Like

Alright, where do i get 5V? I have 9V battery but thats it...

A 4xAA battery pack or a 5V phone charger will work for 1 or 2 small servos. Don't forget to connect the grounds.

The Arduino 5V output is intended for at most a couple of LEDs or small sensors, never for motors or servos.

Alright, I have 3D printed a adapter that goes into an usb from which i can extract 5V can i plug that straight into a wall adapter bcs on wall adapter it says 5V or 9V so idk what will come out, i tried putting it into a power bank but it doesnt work

Use a 5V adapter capable of providing at least 2 Amperes, or 4XAA batteries.

That worked perfectly, but now ive got a different problem, after being away for a few hours i disconnected and reconnected everything and now servos dont work, i connect them like before with same code but none work, its like they dont get power bcs they arent stiff and like every 30 mins one will randomly move after reconnecting and connecting it

Use your multimeter to check the power supply and circuit continuity. If you are still using a breadboard, maybe the tracks burned.

If you don't have a multimeter, now would be a good time to get one.

I dont have a multimeter and I really should get one but even connecting it straight into powerbank like before without any breadboard it doesnt work, i tried plugging it directly into arduino which arduino should be able to power only one it doesnt work

Could i maybe measure it by A0,A1... pins on arduino? And i tried plugging an led into pin where i put signal wire of servo and it lights up.

Connecting what? Post a hand drawn wiring diagram.

arduino should be able to power only one

The Arduino cannot be used to power servos. Ever.


i couldnt find 5V External in the program so i put a 9V battery, just act like there is 5V instead of 9V battery

You need a ground connection between servo and Arduino.

The signal of the Arduino needs to have a return path back to the Arduino.

I have tried connecting the grounds and still nothing

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