Servo problem

Hi everybody, I have made a link as in the diagram to the servomotor, the problem is that when the four motor go the servo motors continues to turn 360°, why? I was wrong to connect something? Thanks a lot

sketch_robot.ino (5.66 KB)

Foto servo.pdf (1.21 MB)

add your wiring or a schematic to help us out

This is the diagram, but the servo is powered by 4 external batteries with a switch and a charging socket

problem i had when i first got my servos: remember to make the grounds common, that is, attach the servo ground to the arduino ground as well as the power supply gr

Above, in the pdf there are some photos of the car and also the sketch

yes. in the last page of that pdf, the signal goes to the sensor shield but there is no ground with it. make sure the grounds are attached, even for signal

I have connected the gnd of the servo in the sensor shield but it has the same problem

I dunno...

I summon a moderator

ShadowGaming:
I summon a moderator

?

I try to connect the gnd of the battery pack and the gnd of the servo to the GND of the shield but continues to go wrong

For me the problem is the wiring connections to the switch

Bypass the switch and charging circuit. Connect all the grounds.

How is the arduino powered?

The arduino is powered by a 9V battery

Ok, this is the diagram to connect the switch to the h bridge l298n and to the 6 external batteries to power the 4 dc motors.

I have to do the same thing but with the servo and 4 external batteries and connect it to the sensor shield.

You advise me to remove the switch ?

I tried to do like in the picture but it has the same problem

servo.pdf (424 KB)

Try this.

I tried but it does not work