Servo doesn't work on arduino

hi,

i recently blew a servo (i think), nothing wrong with that, but now i want to replace it. easy right? NO! i had a spare servo lying around and i tested it on a servo tester to make sure it worked, it worked, great! but here comes the part that i do not understand:

i attached it to the previous wires and ran a code to check if it worked, it didn't, strange.

the code:

#include<Servo.h>

Servo servo;
Servo servo2;

void setup() {
servo.attach(3);
servo.write(90);
servo2.attach(5);
servo2.write(90);
}

void loop() {

servo.write(80);
delay(800);
servo.write(90);
delay(800);
servo.write(100);
delay(800);
servo.write(90);
delay(800);
}

(dont mind servo2 that is to keep a differnt servo in place)

back to the story, so then i decided to test my connections, measured the GND and V with the multimeter and got about 5.5V thats great, put the multimeter on alarm and tested the signal wire from beginning to end, Beep! Beep! Beep!, thats great that also works.
But why isn't my servo working?!?! (i thought)
then i tested differnt pins on the Arduino MEGA, 0 movement on 4 diffenent pins. then i tested 2 other servo's (they worked with the servo tester) and all show the same result: nothing.
then i thouht lets test if it is the signal, so i quickly wrote this code:

#include<Servo.h>

Servo servo;

void setup() {
servo.attach(5);  servo.write(90);
pinMode(3, OUTPUT);
}

void loop() {
digitalWrite(3, LOW);
delay(150);
digitalWrite(3, HIGH);
delay(150);

  
}

and suprise suprise, it worked, the LED start blinking. and then i gave up. and came on here because i am going INSANE.

Hello jasper1234567890

The Arduino isn´t a power supply unit for the servos connected.

Have a nice day and enjoy coding in C++.

schematics if you need them:


the voltage regulators in this picture is replaced by one that can handle more power, so that is not the issue.

forgot to mention that im powering the servo's form an external power supply

Sorry, I´m out, I can´t decode such type of "technical" picture.

oh okay, most of it is useless for this problem. it more for showing how the servo's are powerd.

You are using two separate bug converters for MCU and servos. I do not know what the circuit for those converters look like and how the ground connections are handled.

You have checked that the ground connection between the servos and MCU is actually common and in fact connected?

well eventually their grounds are connected, right before they go into the battery.
don't see a reason why they should be connected earlier. because other servo's work just fine.

Was a different pin on the MCU tried?

i tried different servo's and for every servo i tried different pin's.

Did you try another MCU? Did you stirp the project down to just the basics and run a servo example to see if that works?

can't really strip everything down, but i did ran a code for just that one servo (post #1) and another MCU is kind of the same story because other servo's connected to my arduino MEGA do work is just that one/that spot.

i got some new info, when the servo is not hooked up the multimeter gives a steady 6V. but when the servo is hooked up it give 3.5V (way to low for a servo), is this caused by the pot.meter in the servo or something else?

Did you try another servo?

or you may need a bigger power supply.

give me a couple min. and i will have tried a different servo.

yup, same thing.

I dont think i need a bigger power supply, because a 6S1P (22,2v) 5000mAh Wh111,0 li-po battery is quite strong and can deliver alot of power. and for the voltage regulators i have these: QSKJ DC-DC Adjustable Step-down Buck Converter XL4016 200W
i think this one is capable of powering 4 servo's.

When not hooked up, what are you measuring?
Between what points?
When hooked up, what are you measuring?
Between what points?

Did you check the gnds through the two DC-DC converters?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

when hooked up i am measuring 3.5V at the end of the wires GND(black) and positive(red)
when not hooked up i am measuring 6V GND and positive. same spot.
yes,i checked the wires everything is ok. it's just that spot/servo because al the other servos hooked up do go to their initial position.

Okay, what is the voltage at the output and input of the 6V DC-DC converter when you connect and disconnect the servo?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

the imput will always be around 22.2V.

here are the results:
with servo:6.1V
at servo: 3.3V

without servo:6.1V
at servo:6.1V

if there is no other solution then i am willing to buy a brand new servo but that is my last solution.

all the servo's are wired parallel