Arduino 5 Minute Tutorials: Lesson 5 - Servo Motors

I am trying to use a dynamixelex-106 servo and it has four wires, what do I do? I can’t find anything on the internet about using a servo like this.

@Gabe Hickey This is not a normal RC servo motor - it is a “smart servo” and you need to send appropriate serial commands. More information about the code can be found on the Robotis website.

I want to control multiple servos using single arduino. Multiple I mean each having different sweep or operating with different phase. I mean I need to use two Servos on right and two on left all should sweep same time with a phase delay. Is this practically possible?

@Sandeep Certainly. Use the Arduino servo library.

hello!
we have made a pick and place robot using arduino and we used a servo library basic sweep program for 4 motors but every time each motors goes to initial position .we just know the basic programming would you help us to decode the problem?

@omkar Unfortunately we cannot help with custom code. You have some learning to do - welcome to robotics!

I am using a TowerPro MicroServo 9G SG90 and a Arduino UNO. I want the servo to turn 360 degrees, wait 2 seconds and then turn another 360 degrees in the same direction. My arduino only turns 180 degrees and then 180 degrees back. how can i fix this…

@Dennis That servo is limited to -90 to +90 degrees of rotation. There’s nothing you can do.

Hi Coleman. Just wondering that how to write the code for continuous servo motor and how to tell difference between the continuous motor and normal motor.

@Linzi Wu The product description would specifically state “continuous rotation”. For an RC motor, the pulses are actually the same (500 to 2500us); this would correspond to an angle for a normal RC mtoor, while for a continuous rotation motor, 1500us is stopped, and decreasing to 500 increases the speed in one direction, and increasing from 1500 to 2500 increases the speed of rotation in the opposite direction. You can ho control over angle with most RC continuous rotation servos.

hi, i have a servo motor which is sg5010… i’ll be using it for turning on and off a faucet. however, i cannot plot my desired output which is 0-45 and turning it back from 45-0 degrees… can u help me? i need the exact code using an arduino microcontroller thnk you

@june Use the Arduino servo library (saves time) and specify the angles.

hi, i use DF15RSMG, i can’t the position that servo, can you help me ,
note : i use arduino

@Dedih Barkah You cannot control the position of that motor, only speed and direction.

wanted to know how to make a servo be controlled by a potentiometer, i have tried other websites and nothing has worked

@Luke Connect the potentiometer to an analog pin, and use analogread. When you get the value (0 to 1023), convert that to an angle from 0 to 180 degrees, and use the Arduino servo library to move the servo to that position. Note that most potentiometers can travel 300 degrees, so if you only want to use 180 degrees of that motion, you’ll need to read the minimum and max values associated with where you want the 180 degrees to start and stop.

please I want to connect servo (ES08MAII) to arduino mega2560 directly by powering the arduino through usb from pc and I am afraid of damaging the arduino, is it possible and not dangerous
is it possible to do this

@nour It’s best not to power electromechanical devices via the Arduino pins, since they tend to only be able to provide ~40-100mA of current. You should connect the signal and GND pins to the Arduino, and the V and GND pins to an external power supply.

Hi, can i use Arduino to control analog servo drive, which is connected to motor with 1000ppr encoder. to achieve precise position. but the subject is i want to control with step dir based system like MACH3 software. Any help??

@Atif Khalil You likely can do this, but unfortunately we cannot help with specific code.