Results 1 to 2 of 2

Thread: Arduino Mega 2560 and AX12A servos

  1. Arduino Mega 2560 and AX12A servos

    Hi everyone,
    I am new to the whole world of robotics and have decided I would like to build a quadruped robot.
    The parts I have chosen are the Arduino Mega 2560 R3 and dynamixel AX12A servos. Various other sensors will be incorporated later.
    The problem I seem to be having at the moment is that I am not able to write angles to my servo. When I call .attached() I get a true.
    At the moment I have the arduino board powered through usb and the servo is powered with a 11.1V external power source with its ground connected to the arduinos with a connection between pins 23 (digital pin 10) and the info line of the servos

    This is the code I have been trying to run
    #include <Servo.h>
    Servo myservo;
    void setup()
    //  delay(500);
    //   delay(1000);
    void loop()
    As far as I understand the servo library allows direct angle writing like this to servos using TTL half duplex com protocol.

    Perhaps it is in how I am supplying power to the servo but I dont see why It would be a problem doing it this way.
    Thanks alot
    Last edited by DVS; 07-08-2013 at 02:49 PM.

  2. #2

    Re: Arduino Mega 2560 and AX12A servos

    Dynamixel servos do not use hobby-style PWM pulses for communicating positions or feedback. Instead, they use a single-duplex serial bus, similar to the serial port on the Arduino.

    The easiest thing to do is to hook the TXD of a serial port to the Dynamixel signal wire with a 68 Ohm resistor, then back to the RXD port with another 68 Ohm resistor. Then configure that serial port for the speed you have set your Dynamixels to (default 57600 bps I think, can go up to 1000000 bps.) Write correctly formatted packets to the TXD, and you will receive them back on the RXD; then wait for a response from the servo. If you're running at 1000000 bps, you want to keep interrupts off and poll the receiver for bytes, rather than rely on the built-in Serial port, as that speed is faster than the Arduino can keep up with using interrupt-based receiving.

    The actual protocol is documented on the Robotis support site:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) controlling 6 ax-12a's with an arduino Mega
    By mlerner in forum DYNAMIXEL & Robot Actuators
    Replies: 6
    Last Post: 02-01-2013, 05:29 PM
  2. AX-12 Servos with Arduino
    By snarkity in forum DYNAMIXEL & Robot Actuators
    Replies: 6
    Last Post: 01-24-2012, 10:31 AM
  3. Project Simple programming of arduino and servos
    By Retrievertech in forum Projects For Request and/or Sale
    Replies: 0
    Last Post: 03-23-2011, 05:05 PM
  4. A bunch of Hitec 805bb mega servos
    By billyzelsnack in forum Garage Sale
    Replies: 0
    Last Post: 08-14-2010, 10:31 PM
  5. F/S mega Parallax stuff(pics)
    By lasernerd in forum Garage Sale
    Replies: 30
    Last Post: 07-24-2008, 09:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts