Control of extra servos in Dobot Studio


My Dobot Magician is working fine in Dobot Studio and even under Python control using the API.
For my application I am hooking up extra mini servos that I would like to control through the upper arm connectors (EIO8, EIO6, EIO4) of the Dobot Magician.

Using the standard port EIO8, Dobot Studio recognizes the servo and the standard R+, R- controls work ok.
However, using the ‘teaching and playback’ of Dobot Studio and specifying a PWM output on EIO8, EIO6 or EIO4 does not work. I tried different settings for the PWM frequency and Duty Ratio without any result.

How should I hook up servos to these ports to work ?

Rudolf Sprik


The max and min duty ratio of servo on dobot is shown as below:

Take EIO6 for example, when you run this two points, it will rotate from -135° to 135°. And remember to add a pausetime or the servo can not act instantly.


Hallo Eric,
Thanks it works!


Hallo Eric,
in a follow up …

Ports EIO4 and EIO6 are connected to a small servo and response nicely when using the teach&playback with the values you suggested.

I also tried to set the PWM through script and direct Python programming.
The script I was using in Dobot Studio:

setting PWM on port ‘addr’

addr = 6
frequency = 0.05
for ii in range(5,12,1):
dutyCycle = float(ii)
dType.SetIOPWM(api, addr, frequency, dutyCycle, 0)
print(dType.GetIOPWM(api, addr))

Unfortunately this does not work.
Using addr = 6 ( EIO6 port (?)) the motor moves sometimes, but not to the requested angle.
With addr = 4 nothings happens.
The printed output shows that the values are set correctly.

Any suggestions ?


I’m trying to do the same thing (control servos from my new Dobot Magician). I tried to do the same thing as in the “Teaching and Playback” screenshot above, but my servos just either hum and stay in place (regardless of what position it started in), or turn clockwise until they hit the limit. I have no way to control the servo’s position. This happens if I try to control the Joint 4 servo manually, or with my spare Hitec servos.
Any ideas what I might be doing wrong?


When I tried to control the extra servo connected to EIO14 of my Dobot Magician, there is good response to DobotStudio control commands at Teach and Play mode. However there is no response to python codes. Even if I used the same setiopwm parameters as in the DobotStudio.