Results 1 to 9 of 9

Thread: newbie: AX12 continuous rotation with Arbotix

  1. newbie: AX12 continuous rotation with Arbotix

    Hi

    My apologies for cross position and if this too simple a question for this forum.

    I am a media artist, professor and a bit of a hack with arduino. I can peck away at programming but its just not my forte and I have some MASSIVE black holes in my knowledge base (self taught).

    I am doing a rather simple installation with these beautiful AX12 servos. Except I am completely missing the mark on getting continuous rotation to work with the AX12's I just bought. After 2 days of lurking I know that I need to send commands to the registers, but I am just not that competent in class structures to figure out a simple way of doing this:

    Up until now I have been building everything in the AXSimpleTest sketch that was provided. The SetPosition command works perfectly....... but I am completely stumped on how to get continuous rotational movement (and control the speed) of the AX12's.

    can anyone lead me to a simple solution for this? (as simple as the SetPosition command????)

    I would so appreciate some help in this!

  2. #2

    Re: newbie: AX12 continuous rotation with Arbotix

    You must set the registers for "low limit" and "high limit" to 0, then the servo will switch into wheel mode.

  3. Re: newbie: AX12 continuous rotation with Arbotix

    Thanks for the response Jwatte

    I looked at the but didn't quite get it:

    what register to I set high limit and low limit to 0? There doesn't seem to be a specific one? in fact most of the registers seem to have high and low limits: do you mean all registers with High and Low limits?

    #define AX_MODEL_NUMBER_L 0
    #define AX_MODEL_NUMBER_H 1
    #define AX_VERSION 2
    #define AX_ID 3
    #define AX_BAUD_RATE 4
    #define AX_RETURN_DELAY_TIME 5
    #define AX_CW_ANGLE_LIMIT_L 6
    #define AX_CW_ANGLE_LIMIT_H 7
    #define AX_CCW_ANGLE_LIMIT_L 8
    #define AX_CCW_ANGLE_LIMIT_H 9
    #define AX_SYSTEM_DATA2 10
    #define AX_LIMIT_TEMPERATURE 11
    #define AX_DOWN_LIMIT_VOLTAGE 12
    #define AX_UP_LIMIT_VOLTAGE 13
    #define AX_MAX_TORQUE_L 14
    #define AX_MAX_TORQUE_H 15
    #define AX_RETURN_LEVEL 16
    #define AX_ALARM_LED 17
    #define AX_ALARM_SHUTDOWN 18
    #define AX_OPERATING_MODE 19
    #define AX_DOWN_CALIBRATION_L 20
    #define AX_DOWN_CALIBRATION_H 21
    #define AX_UP_CALIBRATION_L 22
    #define AX_UP_CALIBRATION_H 23
    /** RAM AREA **/
    #define AX_TORQUE_ENABLE 24
    #define AX_LED 25
    #define AX_CW_COMPLIANCE_MARGIN 26
    #define AX_CCW_COMPLIANCE_MARGIN 27
    #define AX_CW_COMPLIANCE_SLOPE 28
    #define AX_CCW_COMPLIANCE_SLOPE 29
    #define AX_GOAL_POSITION_L 30
    #define AX_GOAL_POSITION_H 31
    #define AX_GOAL_SPEED_L 32
    #define AX_GOAL_SPEED_H 33
    #define AX_TORQUE_LIMIT_L 34
    #define AX_TORQUE_LIMIT_H 35
    #define AX_PRESENT_POSITION_L 36
    #define AX_PRESENT_POSITION_H 37
    #define AX_PRESENT_SPEED_L 38
    #define AX_PRESENT_SPEED_H 39
    #define AX_PRESENT_LOAD_L 40
    #define AX_PRESENT_LOAD_H 41
    #define AX_PRESENT_VOLTAGE 42
    #define AX_PRESENT_TEMPERATURE 43
    #define AX_REGISTERED_INSTRUCTION 44
    #define AX_PAUSE_TIME 45
    #define AX_MOVING 46
    #define AX_LOCK 47
    #define AX_PUNCH_L 48
    #define AX_PUNCH_H 49

  4. #4
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,297
    Images
    27
    Rep Power
    278

    Re: newbie: AX12 continuous rotation with Arbotix

    Should be something like:
    Code:
    servo_id = 1; // some number corresponding to a servo ID
    ax12SetRegister2(servo_id, CW_ANGLE_LIMIT_L, 0); // write two bytes to memory (ADDR, ADDR+1)
    ax12SetRegister2(servo_id, CCW_ANGLE_LIMIT_L, 0); // write two bytes to memory (ADDR, ADDR+1)
    Returning to servo mode should be:
    Code:
    servo_id = 1; // some number corresponding to a servo ID
    ax12SetRegister2(servo_id, CW_ANGLE_LIMIT_L, 0); // write two bytes to memory (ADDR, ADDR+1)
    ax12SetRegister2(servo_id, CCW_ANGLE_LIMIT_L, 1023); // write two bytes to memory (ADDR, ADDR+1)
    The *_L address is the low byte of a two-byte variable in the servo's memory array. When writing to two-byte variables/addresses, you always write two bytes starting at the low byte address.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh
    more bleh

  5. Re: newbie: AX12 continuous rotation with Arbotix

    thanks tician.

    so I am not quite familiar with writing instructions to EEPROMs so bear with me:

    These would be the only instructions needed to set the Servo to "wheel" mode?

    and to actually activate it and set its speed

    is it using SetPosition command again?

  6. #6

    Re: newbie: AX12 continuous rotation with Arbotix

    From the AX-12 manual Page 17 (or 18):
    Endless Turn If both values for the CW Angle Limit and the CCW Angle Limit are set to 0, an Endless Turn mode can be implemented by setting the Goal Speed. This feature can be used for implementing a continuously rotating wheel.
    from above:
    #define AX_GOAL_SPEED_L 32
    #define AX_GOAL_SPEED_H 33
    From AX-12 manual Page 18 (19)
    Bits: 0-9 is the speed: (0-1023)
    Bit: 10 is the direction

    So:

    Code:
    servo_id = 1; // some number corresponding to a servo ID 
    ax12SetRegister2(servo_id, define AX_GOAL_SPEED_L, 1023); // write two bytes to memory (ADDR, ADDR+1)
    Will probably make the servo go full speed in one direction.
    Code:
    servo_id = 1; // some number corresponding to a servo ID 
    ax12SetRegister2(servo_id, define AX_GOAL_SPEED_L, 1024+512); // write two bytes to memory (ADDR, ADDR+1)
    Will probably make the servo go half speed in the other direction...

    Kurt

  7. Re: newbie: AX12 continuous rotation with Arbotix

    Thanks Kurt! worked really well!

    Just curious: How to I make the distinction between 2 byte and 1 byte data in these register commands?

  8. #8

    Re: newbie: AX12 continuous rotation with Arbotix

    Two byte registers will have a low and a high byte, indicated by _L and _H respectively in the preprocessor directives (in the bioloid library) or by (L) and (H) in the ax-12 manual. You should see two similar names next to adjacent registers if it is two bytes, for instance registers 8 and 9 are CCW Angle limit(L) and CCW Angle Limit(H), meaning that the CCW Angle limit is a two byte register.

    Anything else is a one byte register.

  9. Re: newbie: AX12 continuous rotation with Arbotix

    Thanks Deimos!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Question(s) Firgelli L-12/L-16 Continuous Operating Loads
    By fractura_laniatus in forum DYNAMIXEL & Robot Actuators
    Replies: 1
    Last Post: 05-18-2013, 09:55 AM
  2. Continuous Rotation Servos
    By deadtetra in forum DYNAMIXEL & Robot Actuators
    Replies: 2
    Last Post: 01-07-2013, 11:15 AM
  3. Question(s) Wrist Rotation brackets?
    By generallee989 in forum Mechanics / Construction
    Replies: 4
    Last Post: 11-14-2012, 11:39 AM
  4. general question on real time control and continuous motion
    By animaniac in forum Software and Programming
    Replies: 1
    Last Post: 10-17-2011, 03:43 PM
  5. News/Announcement selling electric scooter motor and continuous rotation servo
    By jellis359 in forum Garage Sale
    Replies: 0
    Last Post: 03-05-2009, 07:42 PM

Tags for this Thread

Posting Permissions

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