Hi Forum; I've just registered, but I've been lurking for a while.
I have searched for my problem, but I've not made any progress I'm afraid. I'm okay with basic electronics, but my programming is pretty rusty (left college many years ago!).
I've been playing with some servos I'm planning to import, and I'm fine driving 'standard' RC types (using the servo library etc.).
But one of the servo types is controlled using RS485, with a protocol apparently similar to the Dynamixel one.
It has RS485 'A' and 'B' electrical inputs for the data, using a protocol as below:
Instruction packet format:
0XFF 0XFF ID Length Instruction Parameter1 ...Parameter N Check Sum
0XFF 0XFF This signal notifies the beginning of the packet
ID It is the ID of servo which will receive Instruction Packet. It can use 254 IDs from 0 to 253 (0X00~0XFD). converts to a hexadecimal number. 0X00 - 0XFD
*Broadcasting ID : ID = 254 (0XFE) *
If Broadcast ID is used, all linked servos execute command of
Instruction Packet, and Status Packet is not returned.
LENGTH It is the length of the packet. The length is calculated as “the number of Parameters (N) + 2”.
PARAMETER0?N Parameter is used when Instruction requires ancillary data
CHECK SUM It is used to check if packet is damaged during communication. Check Sum is calculated according to the following formula:
Check Sum = ~ (ID + Length + Instruction + Parameter1 + ... Parameter N)
When the calculation result of the parenthesis in the above formula is larger than 255 (0xFF), use only lower bytes.“~” Where, “~” is the Not Bit operator,but opposite.
I would welcome any help at all about interfacing this to my Arduino Duemilanove board, specifically how to connect the RS485 A and B, and how to send it data (including how to calculate the checksum).
Thanks very much,
Ru'
ps I've tried using a Dynamixel AX-12 library I found on someone's site, but with no success. I have a DFRobot I/O Expansion shield which has an RS485 output (A & B), but their shield manual doesn't help at all with how to use it!
I'm afraid I can't post a link to the shield manual, but it can be googled using the search terms "dfrobot shield manual"
pps Baud rate is 1Mbps, asynchronous half-duplex