Arduino Servo Control… Screw It, I am Going To Learn Some Assembly

Controlling a servo with Arduino is easy, as shown in a previous post. What I have found difficult is getting multiple servos and serial data processing to play nice together. Processing serial data is screwing up the timing of the software PWMs. There are several libraries written for Arduino to control servos, check them out here and here. The first library looks great as it is a hardware based solution that changes the arduino PWMs to be servo friendly but is limited to two servos. My plan is to learn some AVR assembly so that I can extend that library for more then 2 servos. My goal is to create a complete servo control system for Arduino which will include a shield and control software written in flash.

10 Responses to “Arduino Servo Control… Screw It, I am Going To Learn Some Assembly”

  1. Busse Says:

    I know, controlling servos with Arduino which includes a shield in Flash is a bitch. Totally feel your pain brother.

  2. Brettf Says:

    Ah Busse… this is why I love you. Is this you asking if I can explain it to you?

  3. Michael Says:

    I’m not the one that wrote this, but thought you could use the link:

    Basically, there are 3 timers: 0, 1, and 2.
    Timer0 affects the system, PWM 5, and 6.
    Timer1 (as in the playground) affects PWM 9 and 10
    Timer2 affects 3 and 11.

    At most, you can only directly drive 4 servos. Any more than that and you’ll have to suck up the software PWM or interface to a dedicated driver, I suppose.

  4. Brettf Says:

    cool thanks. I have seen an ATmega 168 system out there used to control up to 32 servos here. The software is open source but i haven’t looked at it. I guess I should.

  5. Tyler Egeto Says:

    Here is a short video of Arduino and Papervision

  6. Mingoo Says:

    How can I control multiple servo motors using arduino?
    I would like to know how I should connect hardware and how I should write software.
    Could anybody please tell me?

  7. Pedro Says:

    Is there any way to create an application that could drive maybe 8 servos and set an angle for each at the same time?

  8. Brettf Says:

    Yup. There are other systems out there. I believed that I could do it with arduino but I was beyond my abilities, interest and time. The Pololu is one and the SSC-32 is another.

  9. ashish Says:

    Hii any one can help me to control a 6 micro servo motor from arduino duemilanove 168 ???

    i m making a uav (using trex 450 ) for navigation & surveillance purpose.

    i’ ve frustated from googling for servo control.
    can nyone help me??

  10. Brettf Says:

    Hello Ashish,

    Not sure I completely understand the issue. Are you trying to control 6 servos? or a specific type of servo? With the servo library in Arduino it is quite easy to control a servo in general. Can you add some more details?