1

I am trying to understand how to wire this Arduino Uno shield properly.

My goal/main questions: I have 6 servo motors and I am trying to wire them properly to this shield. Do I need an external battery pack? If yes, how do I wire that? I need all the wiring details because I cannot find information about this shield anywhere.

I've provided an actual photo of the shield and I even made a schema for you guys, if somebody wants to draw. I bought this arduino + servos + shield from aliexpress and there wasn't any documentation, explanation, schema or anything like that for that specific shield. enter image description here enter image description here enter image description here

Useful info:

Conclusive question: Do I even need this shield at all? Can I just use a regular UNO to be able to freely operate with 6 servos?


CODE UPDATE:

#include <Servo.h>

Servo myservo;

void setup() {
  myservo.attach(2);
}

void loop() {
  myservo.write(0);
  delay(1000);
  myservo.write(90);
  delay(1000);
}
2
  • 1
    the datasheet shows the used UNO pins ... there is also a zip file with servo example code ... github.com/SmartArduino/ESPboard
    – jsotola
    Aug 28, 2021 at 18:14
  • @YulianProdanov When you still have problems, you can write comments under my answer and include the new information in your question. Edits on answers are not meant for replying to an answer
    – chrisl
    Sep 12, 2021 at 10:53

1 Answer 1

2

Do I even need this shield at all? Can I just use a regular UNO to be able to freely operate with 6 servos?

You don't really need this shield for 6 servos. The standard servo library supports 12 servos on the Uno by using a hardware timer. In your case the shield would mainly help with

  • Freeing up the hardware timer (in the case you need it)
  • Providing a dedicated power line to the servos (since the current for the servos should not run through the Arduino)

If that is enough for you to still use the shield, you can absolutely do that.

I need all the wiring details because I cannot find information about this shield anywhere.

If you look at the wiki (whose link you provided) and navigate to the page for this shield you will see this diagram

enter image description here

  • The servos are connected to the header names "16 road servo", each having the pins (from top to bottom in the image) PWM signal, positive power and ground.

  • At the header marked "insert short circuit module" you can use jumpers to select the handling of the power supply, which you connect left to that to the terminals marked supply power. It is not described clearly there, but I would read the following meaning:

    • The VM terminal is used for the motor voltage. You might choose to provide your motors with a different voltage than 5V. If you set the jumper between VM and Vin you can connect that power input to the Vin input of the Arduino, thus powering it from the same power source as the motors (Vin goes to the Arduinos voltage regulator to get the voltage down to 5V). If your power supply is still just 5V, you should leave the jumper out and connect the power supply directly to the VM input (and of course also its ground).
    • Vs should be the power input for the logic circuit of the shield. If you put a jumper between the pins Vs and +5V, you will connect the power of the logic circuit on the shield to the 5V line of the Arduino. I would suggest doing that, because then you don't need to provide Vs from outside.

The other headers are for DC motors and for different modules, which can be connected.

Do I need an external battery pack?

Here it is important to know, how you are powering the Arduino and how much current the servos need. This datasheet of the MG996 states a stall current of 2.5A, way too much for the Arduino to handle and also way to much for any normal USB port (which will give you up to 500mA). As stated above, you should never run that much current through the Arduino. Provide the motors with power from a power source capable of providing the needed current (+ some headroom). If that is a battery pack or a power supply connect to mains is up to you.

2
  • Yes, sorry, I didn't mean to edit your answer, @chrisl , I'm not sure what happened there. Anyhow, I tried to follow your instructions thoroughly but I still couldn't quite achieve the end result, namely "make possible to move a servo back and forth, at least 1 out of 6". I've included 3 pictures of my setup in the link below. link Btw, I uploaded the code I used in my question above, so you can take a look too. Sep 13, 2021 at 15:17
  • You cannot use the normal Servo library, when you are using the shield. The nornal servo library uses an internal timer to switch a digital output pin with the correct signal. That shield uses a dedicated chip for that. Have you looked for a fitting library to use it?
    – chrisl
    Sep 13, 2021 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.