mardi 11 décembre 2007

Right-arm control

Before going into the serial protocol to control I-SOBOT servos, a few precisions about power.

When fully charged, NiMH batteries deliver 1.37V each so VCC voltage is 4.1V. The VDD voltage is 3.3V generated by the voltage regulator. VDD remains quite stable even during I-SOBOT walk though this movement requires most servos to run simultaneously.

Now the servos. I connected external wires on right arm connector (see figure in previous message). The fourth signal is the serial output. It works at logic levels 0-3.3V.
After signal analysis with my scope, it shows that orders are sent in an 8 bytes frame with a basic 8N1 serial protocol (8bits, no parity and one stop bit) at 2400bauds speed.
When I-SOBOT is not moving, the frame for the right arm is:
byte 1 0x05
byte 2 0x00
byte 3 0x00
byte 4 0x00
byte 5 0x80
byte 6 0x80
byte 7 0x60
byte 8 0xFF
When the arm is moving, bytes 2, 3, 4 and 7 change values.
After testing with simple movements, I think:
byte 2 = shoulder rotation
byte 3 = shoulder raise
byte 4 = elbow
This will be confirmed with future tests.

Signification of other bytes:
Obviously, there is no address in the frame so orders are broadcasted to all the servos in the arm. Each servo must be programmed to know which byte in the frame correspond to its position. Also, it is necessary that the frame contains synchronization bytes and checksum so that receivers can synchronize. I think the protocol is:
byte 1 0x05 = beginning of frame
bytes 2-6 servo positions
byte 7 checksum or similar data consistency check (signals may be corrupted by servos power draw)
byte 8 0xFF = end of frame (good to synchronize the scope, it is the longest positive pulse of the frame: 3.76ms)

I will go on soon with the left arm and the legs before testing with an external UART.

5 commentaires:

cedtat a dit…

Hello, this blog is very interesting, i don't have the level to fully understand everything but i can't wait to ask you something ? Do you think it is actually possible to remove the main board to add a new board (less complicated) already supported on robotics frameworks like MSRS (microsoft robotics studio) ... i was thinking of a SCC32 lynxmotion controller ... it could be a nice and cheap body to play with instead of an expensive 1000$ robots !

Regards,
Cédric :)

ibot a dit…

SCC32 is a servo controller that send s period pulses on each output. On I-SOBOT, the servo have a serial interface so you need a controller with UART. I am afraid that 4 UARTs are necessary, I will do motre tests soon or you can emulate UART with software. Then any microcontroller would do the job.

cedtat a dit…

ok so now i need to learn about UART :) ... thanks for these informations

Unknown a dit…

hi what about Embedded Comp Cubloc CB220 Starter Kit, is it possible to controll i-sobot with this board ? Is it enven real to do something with i-sobot ? It is long time from last post ..

Anonyme a dit…

good job as soon as i get my i-sobot i will dissassemble it and try to control the servos with my pc serial port.