by i-Bot » Thu Nov 27, 2008 1:35 pm
by i-Bot
Thu Nov 27, 2008 1:35 pm
I have put some thought to this and would appreciate some feedback to my early conclusions.
I did some measurements on the AX12 using a propeller object. I found that with a return delay set to 1, I get read and write complete transactions in about 300us + (11us + number of bytes transferred). This seems consistent, even when the AX12 is moving.
Only bothered with read and write because multiple registers must be read/written for closed loop control.
If we write 12 registers and read 8 registers, then we have about 20ms for 24 servos, which is probably too slow.
This also gives us 480 bytes to transfer up/down to the gumstix or other.
For interface to the Gumstix or other, SPI would be preferred due to the higher data rate and higher efficiency. At 4M SPI transfers of 480 bytes for 24 servos would be about 3 ms. UARTS on these devices are fairly large and have DMA so that is possible but has limited speeds. USB has a very large overhead.
Splitting the serial bus to 6 with 4 AX12 each would drop the servo time down to about 3.3 ms. Splitting to 24 individual on a star would drop to less than 1 ms, and the SPI could be increased to 10M.
For device to perform this there are not many. The ATMega and XMega could not perform at these data rates and the buffering is too small. Even ARM, AVR32, PIC32, STM32 would struggle due to limits in their buffers and DMA capability. The prop might be able to do the 6 bus case though probably only with a 1M SPI making an update of about 10 ms.
As Robo1 indicated an FPGA solution could do the 6 and the 24 bus options.
So some feedback on my ideas, also some idea of the update rate needed would be appreciated. And a check on math and assumption is usually needed !
For the hardware confguration, I was thinking of distribution boards with 4 or 6 servo connectors with a servo power battery power feed and any servo specific interface liked back to the mohterboard. Thus keep the motherboard common and keep battery power for the servos off it.
I have put some thought to this and would appreciate some feedback to my early conclusions.
I did some measurements on the AX12 using a propeller object. I found that with a return delay set to 1, I get read and write complete transactions in about 300us + (11us + number of bytes transferred). This seems consistent, even when the AX12 is moving.
Only bothered with read and write because multiple registers must be read/written for closed loop control.
If we write 12 registers and read 8 registers, then we have about 20ms for 24 servos, which is probably too slow.
This also gives us 480 bytes to transfer up/down to the gumstix or other.
For interface to the Gumstix or other, SPI would be preferred due to the higher data rate and higher efficiency. At 4M SPI transfers of 480 bytes for 24 servos would be about 3 ms. UARTS on these devices are fairly large and have DMA so that is possible but has limited speeds. USB has a very large overhead.
Splitting the serial bus to 6 with 4 AX12 each would drop the servo time down to about 3.3 ms. Splitting to 24 individual on a star would drop to less than 1 ms, and the SPI could be increased to 10M.
For device to perform this there are not many. The ATMega and XMega could not perform at these data rates and the buffering is too small. Even ARM, AVR32, PIC32, STM32 would struggle due to limits in their buffers and DMA capability. The prop might be able to do the 6 bus case though probably only with a 1M SPI making an update of about 10 ms.
As Robo1 indicated an FPGA solution could do the 6 and the 24 bus options.
So some feedback on my ideas, also some idea of the update rate needed would be appreciated. And a check on math and assumption is usually needed !
For the hardware confguration, I was thinking of distribution boards with 4 or 6 servo connectors with a servo power battery power feed and any servo specific interface liked back to the mohterboard. Thus keep the motherboard common and keep battery power for the servos off it.