Go Down

Topic: Dynamixel Servo Library (Read 16 times) previous topic - next topic

beepboop


Hi Flex

Here's a project that seems to have a library for the MX-28

http://code.google.com/p/slide-33/downloads/list

See the file list for: Dynamixel_Serial - V2.0.zip



Does this work for Arduino Uno? Does it work even though I don't have a Driver board?

druckgott

Hallo, as I told I work with the Arduino Uno and the controller Board.

Now I want to Read out the Position:
Position = Dynamixel.readPosition(SERVO_ID);

But this do not work.

And what I also get not working a Serial Output over the serial monitor.

I always geht Chars from the Servo comands I think and between this I get some Serial Informations.

But if I use Serial Print the Servo do not move anymore:

Code: [Select]

#include <Dynamixel_Serial.h>       // Library needed to control Dynamixal servo


int Temperature,Voltage,Position; 

#define SERVO_ID 0x01               // ID of which we will set Dynamixel too
#define SERVO_ControlPin 0x10       // Control pin of buffer chip, NOTE: this does not matter becasue we are not using a half to full contorl buffer.
#define SERVO_SET_Baudrate 57600    // Baud rate speed which the Dynamixel will be set too (57600)
#define LED13 0x0D                  // Pin of Visual indication for runing "heart beat" using onboard LED
#define TX_DEALY 2000               // in uSec
#define CW_LIMIT_ANGLE 0x001        // lowest clockwise angle is 1, as when set to 0 it set servo to wheel mode
#define CCW_LIMIT_ANGLE 0xFFF  // Highest anit-clockwise angle is 0XFFF, as when set to 0 it set servo to wheel mode

void setup(){

delay(1000);                                                           // Give time for Dynamixel to start on power-up

/*Dynamixel.setTempLimit(1,80); // Set Max Temperature to 80 Celcius
Dynamixel.setVoltageLimit(1,65,160); // Set Operating Voltage from 6.5v to 16v
Dynamixel.setMaxTorque(1,1023); // 50% of Torque
Dynamixel.setSRL(1,2); // Set the SRL to Return All
Dynamixel.setTempLimit(2,80); // Set Max Temperature to 80 Celcius
Dynamixel.setVoltageLimit(2,65,160); // Set Operating Voltage from 6.5v to 16v
Dynamixel.setMaxTorque(2,1023); // 50% of Torque
Dynamixel.setSRL(2,2); // Set the SRL to Return All
*/
Dynamixel.begin(SERVO_SET_Baudrate, SERVO_ControlPin, TX_DEALY);        // We now need to set Ardiuno to the new Baudrate speed
Dynamixel.setMode(SERVO_ID, SERVO, CW_LIMIT_ANGLE, CCW_LIMIT_ANGLE);    // set mode to SERVO and set angle limits

Serial.begin(9600); // Serial speed for PC
mySerial.println("Finish Servo");
//Dynamixel.setPID(Servo_ID, P_Gain, I_Gain, D_Gain)
}


void loop(){
 
Temperature = Dynamixel.readTemperature(SERVO_ID); // Request and Print the Temperature
Serial.print("AX2 *** Temperature: "); // Print the variables in the Serial Monitor
Serial.println(Temperature);
Position = Dynamixel.readPosition(SERVO_ID); // Request and Print the Posit
Serial.println(Position);

Dynamixel.ledState(SERVO_ID, OFF);


  Dynamixel.servo(SERVO_ID,0,0x100);   // Move servo to angle 1(0.088 degree) at speed 100

  delay(1000);

Dynamixel.ledState(SERVO_ID, ON);

   Dynamixel.servo(SERVO_ID,4000,0x3FF);  //  Move servo to max angle at max spe
  delay(1000);

}


thx
druckgott

druckgott


druckgott


The best library for the Dynamixel is http://savageelectronics.blogspot.it/2011/01/arduino-y-dynamixel-ax-12.html.
It works very very well.


Hi I have now connectet it like in this blog, but do not work for me:
http://postimage.org/image/mgryg3i6t/

can anybody help me?

thx
druckgott

pabloxid

Hi people.

All you have to do to use the MX-28T is to download this:

http://www.pablogindel.com/images/ax12v231.rar

Regards,
P.G.

JF107

Hello,

I downloaded the files (ax12v231.rar) and put it in the library folder and I also modified the HardwareSerial.ccp but i get the message while compiling:

core.a(HardwareSerial.cpp.o): In function `__vector_18':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:100: multiple definition of `__vector_18'
ax12v231/ax12.cpp.o:/Users/.../Documents/Arduino/libraries/ax12v231/ax12.cpp:108: first defined here

Any idea what I did wrong ?

thanks

Joop

pabloxid

The example that comes with the library, is for the Mega or Mega2560. If your board has a single serial port, comment out all lines that have the word "Serial".

JF107

Thanks for your fast reply! Now the compiling worked, but my MX28 isnĀ“t moving. Only a red light is flashing once while
connecting. I might have bricked it before due to wrong wiring, but i will order an usb 2 ttl adapter for testing the servo...

pabloxid

90% of the problems I've seen with Dynamixel are due to the power supply. I use a 12V / 4A power supply, which is, in fact, that comes with the Bioloid kit.

ephesus

Hi guys, I'm using a servo dynamixel MX-64T and I'm having a problem in feedback position command or reading position and temperature.So far its not working because I'm getting weird answers.I'm using the library  Dynamixel_Serial - V2.0. I have connected using a Pololu Orangutan B-328 robot controller with connection to TX and RX.Im wondering whether its a software or hardware related issue and how to get proper feedback answers.Do need your help guys,thanks.

ChrisBindi

Hi,

I tried to open the homepage of Pablo Gindel  but there was an error and nothing happend. www.pablogindel.com/

Can u check if it works, because i need the library of this guy.

Thank u very much for your help.

Go Up