
ed_eilers
Netherlands
Asked
— Edited

I would like to get some help on serial bus servo's that use almost the same protocol as dynamixel.
BUT all the dynamixel instruction packets and status packets start with:
0xFF 0xFF and then you get ID> Length> Instruction>Parameters>Checksum
like this
The servo's I want to use are Lobot LX-16A that use the same protocol with one difference: the packets start with 0x55 0x55 and then ID> Length> Instruction>Parameters>Checksum
so my servo's don't react on the dynamixelplugin How can I or someone change the 0xff too 0x55 in the plugin? Is it possible too get the source code for the plugin? or is there another solution? I can't afford real dynamixels and this seemed a good alternative
thanx in advance for your help
In this piece the actual protocol is been send :
void LobotSerialServoMove(HardwareSerial &SerialX, uint8_t id, int16_t position, uint16_t time) { byte buf[10]; if(position < 0) position = 0; if(position > 1000) position = 1000; buf[0] = buf[1] = LOBOT_SERVO_FRAME_HEADER; buf[2] = id; buf[3] = 7; buf[4] = LOBOT_SERVO_MOVE_TIME_WRITE; buf[5] = GET_LOW_BYTE(position); buf[6] = GET_HIGH_BYTE(position); buf[7] = GET_LOW_BYTE(time); buf[8] = GET_HIGH_BYTE(time); buf[9] = LobotCheckSum(buf); SerialX.write(buf, 10); }
Okay let me take a look at their code and compare it to what I’m doing. I’ll look tonight as I’m on a plane right now.
But to get the low byte, in any language supporting binary operation, you’d do this...
$lowbyte = $value & 0xff
And high byte would be...
$highbyte = ($value << 8) & 0xff
And these are the parameters it needs:
void LobotSerialServoMove(HardwareSerial &SerialX, uint8_t id, int16_t position, uint16_t time)
so (0x55&0x55,ID,movement value 0-1000, servo speed 0-500)
movement value is 16 bits, first low 8 bits and high 8 bits speed value is only the high 8 bits
but i could not in EZ-Script separate 16 bits in to low 8 and high 8
thanks this piece off info gave me some sleepless nights haha
you are my hero DJ Hope that you get the plugin to work thanks
Their schematic shows A 74HC126 line driver. https://assets.nexperia.com/documents/data-sheet/74HC_HCT126_Q100.pdf It appears you can only communicate to their servos using this circuit. The Lewan Soul servo's I have been testing I put on the bench and exercised overnight and they are now both hot and grinding at 6.7v no load.
I like the idea of servo's with feedback as we really need a way to teach robots through copying and replaying human movements. This is essential when learning and performing human task and training fine motor skills. I also like the ability to extract sensor data (motion, position, speed, temperature, torque...) to build models and predict failures. Unfortunately I suspect that predicting future failures in these particular servos maybe a lost cause (But I will persist).
https://www.dropbox.com/sh/b3v81sb9nwir16q/AACkK-tg0q39fKJZcSl-YrqOa/LX-16A%20Bus%20Servo?dl=0&preview=LewanSoul+Bus+Servo+Communication+Protocol.pdf
Wow. That’s disappointing but not surprising, considering the price ($14.99). That’s a very short life span.
I still believe in this servo even I did not fry it I have made some sort of a plan how to i think it has to be inplemented in EZscript and maby someone that's good with the EZscript can translate this:
program steps
Get servo ID from EZ-B Get wanted servo angle from EZ-B Translate 0-180 to 0-1000 Translate decimal value servo angle to hex separate hex value into low bits and high bits: ( 500 dec = 0x1F4, low = 244 dec is 0xf4, 256 dec = 0x100 or high 0x01) Send the 10 byte word to uart 10byte word is: [0] 0x55 hardware id1 [1] 0x55 hardware id2 [2] 0x00 Vn the servo that has to move now V0 [3} 0x07 don't know this one but is 7 [4] 0x01 command that tells the servo it has to move [5} 0xF4 low byte servo movement [6] 0x01 high byte servo movement [7] 0xF4 low byte servo speed speed=500 [8] 0x01 high byte servo speed speed=500 [9] checksum of some sort see below start over again
checksum in arduino:
{ byte i; uint16_t temp = 0; for (i = 2; i < buf[3] + 2; i++) { temp += buf[i]; } temp = ~temp; i = (byte)temp; return i; }
so hope someone gets this
I’ll be taking a look at this servo when ours arrives at the calgary office. I fly back to calgary later this week and it arrives next week (I think).