Motor shield Rev 3 with 2 servos

Hi,

I’ve connected two servos on my motor shield Rev 3 and I would like to know what are the pin number for each of them (orange pin on the motorshield) to write the code ?

Thank you for your help

Hi, are you talking about these two orange connectors?

MotorShield_R3_Front_450px.jpg

They should be associated with pins D5 and D6 (both PWM).

Hi Jeffrey

Yes i’m talking about them. Do you think that two servos can work with this motorshield ?

Thank you

Based on the schematic, both connectors have this pinout:

] GND (ground)/:m]
] D5 or D6 (signal)/:m]
] +5V (power)/:m]

This means that the pins are in the wrong order for connecting directly to standard servo motors: the signal and power pins should be switched to work with standard servo motors. You can use wires, or modify the pins in your connectors, if you want to connect them to the board.

Also, the power pin is connected to the +5V supply of the Arduino board, so you need to ensure that your servos will work at 5V and won’t consume too much current.

Alternatively, you might want to use a different shield, such as this I/O expansion shield to connect your servos to the board and uses an external power supply without needing to modify your cables.

We also have the Lynxmotion BotBoarduino board which can replace your Arduino board and is ideal for connecting servo motors to your board using either regular board power or an external supply.

Hope this helps,

Thank you Jeffrey

So if modify my connections and if my motors work with 5V, do you think it will be possible to control them with a code ?

Yes, there’s a Servo library that’s really easy to use and you can use the Sweep example code found in the File -> Examples -> Servo menu as a starting point.