Arduino 5 Minute Tutorials: Lesson 5 - Servo Motors

@megh Building and programming a humanoid robot surpasses the context of this blog post, so feel free to create a new topic on the RobotShop Forum and we would be happy to help. It would be important to know what products you are using.

i’ve created a hexapod with 18 DOF with a 32 channel servo controller and Arduino nano. i have no idea on how to programme the bot… any help please.

Thanks for the useful lesson! One question though about the duration of the pulse in relation to the angle rotated. Does the pulse duration have to change when I operate the servo at 6V? If so, how?

@joe tech We would love to see you post a video on the RobotShop Forum!

@joe tech Feel free to post some images on the RobotShop Forum, and indicate which electronics you use.

@steven No, the input signals are the same regardless of the servo’s input voltage. If you mean does the signal change if the signal itself is at 6V - good question, but to be safe, you really should keep the signal at 5V.

Hay I intend to make a position control set up based on Arduino UNO board for under grad students to perform experiments of control system design. Perhaps I will need accessories such as servo controller board, rotary potentiometers and appropriate servo. Would you please suggest part numbers compatible with Arduino R3.

@Mahmood The list of parts which are not compatible would be much shorter. Arduino is compatible with almost everything these days. It would work with almost every servo controller, potentiometer and servo we carry on RobotShop.com. If you have products which you are interested in and would like to confirm they work, feel free to send us a message here with the product codes: [email protected]

I am Happy to find a guide who has not used the library I am very happy. But can you clarify my doubt about how does the program make the servo bring itself back to its original position. After 90 degree rotation we give every time

@Akilesh The program loops with a 20ms delay. This constantly updates / refreshes the servo’s position. The Arduino servo library takes care of this.

is there any equation that relates the load(kg) with rotation time and angle? i need to fully synchronous the motor as i want my 17 dof robot to copy gesture.

@ahasan How would you measure the gestures? What products / materials would you use?

i’ll do it using kinect censor to get my gesture and arduino for servos.

i am using mg996r servo just wanted to know if there’s any equation that relates the load(kg) with rotation time and angle? i mean if i know the load and required angle, is there any way i can calculate the time required to reach the angle by the servo?

@ahasan Not really - you can normally specify the speed of a servo and it should be able to rotate at that speed if it’s ~1/4 or below the rated static torque.

how we can control three servos at a time

I don’t know how to program

@thulasiram You can use any RC servo controller, almost any microcontroller or RC handheld transmitter. It all depends on what you want to do and how.

@MD arfan There are many ways you can learn how to program - you can read online tutorials, read books, or start a simple project and learn based on need.

Im making a biped which has 3servos on each leg i want each servo to me to different positions at different times sometimes at once