PDA

View Full Version : [Question(s)] Arbotix controller



fabrice
03-31-2011, 03:09 PM
Dear forumers
I am considering purchasing an Arbotix board because I feel it is a great board for programming, especially because it combines Dynamixel bus and I/O
However I have few questions and I hope that some people can help me here:
In the ax12.cpp code I can see:
· That you define SERVO_STIK, what is the purpose here?
· There is also PORTG but in the Atmega 644P there is no PORTG defined in the documentation, can you tell me more about it?
Is it possible to use an Arbotix controller in slave mode? For instance connect the Arbotix to a CM5xx Robotis controller?
If the Arbotic Controler is used in a slave mode how to foward AX12 messages to other modules (daisy chain)?
Does the bootloader is compatible with the Arduino IDE?
Thank you very much for answering my questions and sorry for the approximate English ;)
Fabrice (from France)

tician
03-31-2011, 11:08 PM
Fergs would know for certain, but...
There would appear to be a new arbotix on the way (he's using a prototype in Maxwell (http://www.showusyoursensors.com/2011/03/look-inside-maxwell.html)) and I think it is logical to assume that it will be based on the Arduino Mega using an ATmega2560, which does have a PORTG. Those several lines of code added to the arbotix-0014 AX-12 library (since arbotix-0013) are only compiled if certain conditions exist (defining the board as being an ARBOTIX_PLUS or whatever SERVO_STIK may be).

As to using the Arbotix as a dynamixel bus slave device I have to defer entirely to Fergs as the only functioning code I know of is from Jon Hylands' slave device boards (as I mentioned before on the Robotis QnA site). Just a reminder, the dynamixel bus is a bus with a daisy-chain connection between devices. All devices on the bus share the same communication, positive voltage source, and ground signals. If an arbotix were connected to a CM-5/510/700 over the dynamixel bus, there would be no forwarding necessary as all devices (CM-5/510/700, the arbotix slave, and any AX-12/18 or AX-S1) on the bus will receive the packets. It is up to each individual device to determine if the packet was meant for it and what it should do with the packet (discard or parse/respond).

lnxfergy
03-31-2011, 11:24 PM
I had typed in a response, but not hit enter about 4 hours ago...

· That you define SERVO_STIK, what is the purpose here?
This is a prototype board definition, it has no bearing on the ArbotiX


There is also PORTG but in the Atmega 644P there is no PORTG defined in the documentation, can you tell me more about it?Again, more prototyping, you'll note that it is wrapped in #ifdef/#endif statements such that it is not included when using a 644p-based processor.


Is it possible to use an Arbotix controller in slave mode? For instance connect the Arbotix to a CM5xx Robotis controller?
If the Arbotic Controler is used in a slave mode how to foward AX12 messages to other modules (daisy chain)?It is certainly possible, however we do not have a library for such things. You might look at our ROS sketch as it sort of implements such an idea. If you want to interface between two dynamixel buses, you will need to add circuitry.


Does the bootloader is compatible with the Arduino IDE?Yes, as are all libraries.

-Fergs

fabrice
04-02-2011, 04:54 PM
tician, inxfergy

Thank you very much for your answers

fabrice
04-12-2011, 04:15 PM
Dear Inxfergy

I tried to implement the Arbotix software suite on an Atmega Mega (2560). I changed the existing HardwareSerial files (put in comments all variables associated to HardwareSerial1 and also the SIGNAL(SIG_USART1_vec)).

Regarding the connection with the AX12+ I put together RX1/TX1 to the data PIN of the AX12+.

Sending data to the AX12+ is working fine. However I am not able to read anything sent by the AX12+. Indeed when I print the value of ax_tx_Pointer I can see that it is incremented (almost all the time actually) but there is no value in the buffer.

I guess I am not the first one coming on the forum with such a problem ... but do you have any idea of what i did wrong?

Thank you very much for your help

Fabrice

bloftin
09-11-2011, 01:41 AM
I got similar results when trying to use pyPose with the Ardunio Mega (really the Mega ADK board). It transmits or (Sets) the AX 12 just fine, however the receive fails. Note this only works if I put TX1 pin to the AX-12 data pin (as the Arbotix schematic shows with the 644). If I also connect the RX1 pin, then nothing happens.

I 1st just commented out (in HardwareSerial.cpp)

//#if defined(USART1_RX_vect)
//SIGNAL(SIG_USART1_RECV)
// SIGNAL(USART1_RX_vect)
// {
// unsigned char c = UDR1;
// store_char(c, &rx_buffer1);
// }
//#elif defined(SIG_USART1_RECV)
// #error SIG_USART1_RECV
//#endif


*** Note commenting out above code allowed it to compile in Arudunio-022 (otherwise we were making the ADK board work with Arduino-0018)

//#if defined(UBRR1H)
// HardwareSerial Serial1(&rx_buffer1, &UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UDR1, RXEN1, TXEN1, RXCIE1, UDRE1, U2X1);
//#


Any tips? Thanks.

Ben

bloftin
09-11-2011, 11:47 AM
The Receive Interrupt does seem to be firing, ISR(USART1_RX_vect) - I turn off an LED when the interrupt fires. The signal on the scope for writing to the AX-12 register on pypose 'Capture' seems good (haven't crossed check all the bits for valid AX-12 message, but I doubt that is the problem. I bet it some lame UART setup difference between the two chips - looks like I'll spend some time understanding what is trying to be done. When I cross-referenced all the code related to the UART, like bitSet(UCSR1A, U2X1); they seem to match the data sheet for the 644 and the mega. Cheers.

Ben