Changes for page LSS Communication Protocol
Last modified by Eric Nantel on 2025/06/06 07:47
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,6 +1,8 @@ 1 += Protocol concepts = 2 + 1 1 The Lynxmotion Smart Servo (LSS) protocol was created in order to be as simple and straightforward as possible from a user perspective, while at the same time trying to stay compact and robust yet highly versatile. Almost everything one might expect to be able to configure for a smart servo motor is available. 2 2 3 -== =Session ===5 +== Session == 4 4 5 5 A "session" is defined as the time between when the servo is powered ON to when it is powered OFF or reset. 6 6 ... ... @@ -39,13 +39,9 @@ 39 39 40 40 Results in the servo rotating from the current angular position to a pulse position of 1456 in 1263 milliseconds. 41 41 42 - Modifiedcommandsare commandpecific.44 +Action modifiers can only be used with certain commands. 43 43 ))) 44 44 45 -((( 46 - 47 -))) 48 - 49 49 == Configuration Commands == 50 50 51 51 Configuration commands affect the servo's current session* but unlike action commands, configuration commands are written to EEPROM and are retained even if the servo loses power (therefore NOT session specific). Not all action commands have a corresponding configuration and vice versa. Certain configurations are retained for when the servo is used in RC model. More information can be found on the [[LSS - RC PWM page>>doc:LSS - Overview (DEV).LSS - RC PWM.WebHome]]. ... ... @@ -105,6 +105,30 @@ 105 105 #5QSR<cr> would return *5QSR4<cr> which represents the value for that session. 106 106 107 107 #5QSR1<cr> would return *5QSR20<cr> which represents the value in EEPROM 106 + 107 +=== Virtual Angular Position === 108 + 109 +{In progress} 110 + 111 +A "virtual position" is one which allows for multiple rotations of the output horn, moving the center position and more. The "absolute position" would be the angle of the output shaft with respect to 360.0 degrees. 112 + 113 +[[image:LSS-servo-positions.jpg]] 114 + 115 +Example: Gyre direction / rotation is positive (clockwise), and origin offset has not been modified. Each square represents 30 degrees. 116 + 117 +#1D-300<cr> The servo is sent a command to move to -30.0 degrees (green arrow) 118 + 119 +#1D2100<cr> This second position command is sent to the servo, which moves it to 210.0 degrees (orange arrow) 120 + 121 +#1D-4200<cr> This next command rotates the servo counterclockwise to a position of -420 degrees (red arrow), which means one full rotation of 360 degrees, stopping at an absolute position of 60.0 degrees (420.0-360.0), with a virtual position of -420.0 degrees. 122 + 123 +Although the final physical position would be the same as if the servo were commanded to move to -60.0 degrees, the servo is in fact at -420.0 degrees. 124 + 125 +#1D4800<cr> This new command is sent which would then cause the servo to rotate from -420.0 degrees to 480.0 degrees (blue arrow), which would be a total of 900 degrees of clockwise rotation, or 2.5 complete rotations. 126 + 127 +#1D3300<cr> would cause the servo to rotate from 480.0 degrees to 330.0 degrees (yellow arrow). 128 + 129 +If / once the servo loses power or is power cycled, it also loses the virtual position associated with that session. For example, if the virtual position was 480.0 degrees before power is cycled, upon power up the servo's position will be read as +120.0 degrees from zero (assuming center position has not been modified). 108 108 ))) 109 109 110 110 = Command List = ... ... @@ -126,28 +126,34 @@ 126 126 | 12|Max **S**peed in **D**egrees| SD| QSD| CSD| ✓| ✓| tenths of degrees per second (ex 248 = 24.8 degrees per second)|QSD: Add modifier "2" for instantaneous speed 127 127 | 13|Max **S**peed in **R**PM| SR| QSR| CSR| ✓| ✓| rpm|QSR: Add modifier "2" for instantaneous speed 128 128 | 14|**A**ngular **S**tiffness| AS| QAS| CAS| ✓| ✓|none|-4 to +4, but suggested values are between 0 to +4 129 -| 15|//N/A (removed)//| | | | | | | 151 +| 15|**A**ngular **H**olding Stiffness|AH|QAH|CAH| | ✓|none|-10 to +10, with default as 0. 152 +|15b|**A**ngular **A**cceleration|AA|QAA|CAA| | ✓|degrees per second squared|Increments of 10 degrees per second squared 153 +|15c|**A**ngular **D**eceleration|AD|QAD|CAD| | ✓|degrees per second squared|Increments of 10 degrees per second squared 154 +|15d|**M**otion **C**ontrol|MC|QMC| | | ✓|none|MC0 to disable motion control, MC1 to enable. Session specific 130 130 | 16|**LED** Color| LED| QLED| CLED| ✓| ✓| none (integer from 1 to 8)|0=OFF 1=RED 2=GREEN 3= BLUE 4=YELLOW 5=CYAN 6=MAGENTA, 7=WHITE 131 -| 17|**ID** #| ID| QID| CID| | ✓| none (integer from 0 to 250)|Note: ID 254 is a "broadcast" which all servos respond to156 +| 17|**ID** #| | QID| CID| | ✓| none (integer from 0 to 250)|Note: ID 254 is a "broadcast" which all servos respond to 132 132 | 18|**B**aud rate| B| QB| CB| | ✓| none (integer)| 133 133 | 19|**G**yre direction (**G**)| G| QG| CG| ✓| ✓| none | Gyre / rotation direction where 1= CW (clockwise) -1 = CCW (counter-clockwise) 134 134 | 20|**F**irst Position (**P**ulse)| | QFP|CFP | ✓| ✓| none | 135 135 | 21|**F**irst Position (**D**egrees)| | QFD|CFD| ✓| ✓| none | 136 136 | 22|**T**arget (**D**egree) **P**osition| | QDT| | | ✓| tenths of degrees (ex 325 = 32.5 degrees; 91 = 9.1 degrees)| 137 -| 23|**M**odel| | QM| | | | none (integer)| 162 +| 23|**M**odel **String**| | QMS| | | | none (string)| Recommended to determine the model| 163 +| 23b|**M**odel| | QM| | | | none (integer)| Returns a raw value representing the three model inputs (36 bit)| 138 138 | 24|Serial **N**umber| | QN| | | | none (integer)| 139 139 | 25|**F**irmware version| | QF| | | | none (integer)| 140 140 | 26|**Q**uery (general status)| | Q| | | ✓| none (integer from 1 to 8)| See command description for details 141 -| 27|**V**oltage| | QV| | | ✓| tenths ofvolt (ex113 =11.3V;92=9.2V)|142 -| 28|**T**emperature| | QT| | | ✓| degrees Celsius|Max temp before error: 85°C (servo goes limp) 143 -| 29|**C**urrent| | QC| | | ✓| tenths of Amps (ex 2 = 0.2A)|144 -| 30|**RC** Mode| | |CRC| |✓| 167 +| 27|**V**oltage| | QV| | | ✓| millivolts (ex 5936 = 5936mV = 5.936V)| 168 +| 28|**T**emperature| | QT| | | ✓| tenths of degrees Celsius|Max temp before error: 85°C (servo goes limp) 169 +| 29|**C**urrent| | QC| | | ✓| milliamps (ex 200 = 0.2A)| 170 +| 30|**RC** Mode| | |CRC| |✓|none|((( 145 145 CRC: Add modifier "1" for RC-position mode. 146 146 CRC: Add modifier "2" for RC-wheel mode. 147 147 Any other value for the modifier results in staying in smart mode. 148 148 Puts the servo into RC mode. To revert to smart mode, use the button menu. 149 149 ))) 150 -| | | | | | | | | 176 +|31|**RESET**| | | | | ✓|none|Soft reset. See command for details. 177 +|32|**DEFAULT**| | | | |✓|none|Revert to firmware default values. See command for details 178 +|33|**UPDATE**| | | | |✓|none|Update firmware. See command for details. 151 151 152 152 = Details = 153 153 ... ... @@ -330,7 +330,7 @@ 330 330 331 331 Using the CSR command sets the servo's maximum speed which is saved in EEPROM. In the example above, the servo's maximum speed will be set to 45rpm. When the servo is powered on (or after a reset), the CSR value is used. Note that CSD and CSR are effectively the same, but allow the user to specify the speed in either unit. The last command (either CSR or CSD) is what the servo uses for that session. 332 332 333 -__14. Angular Stiffness (AS)__ 361 +__14. Angular Stiffness (**AS**)__ 334 334 335 335 The servo's rigidity / angular stiffness can be thought of as (though not identical to) a damped spring in which the value affects the stiffness and embodies how much, and how quickly the servo tried keep the requested position against changes. 336 336 ... ... @@ -358,10 +358,38 @@ 358 358 359 359 Writes the desired angular stiffness value to memory. 360 360 361 -__15. N/A(removed)__389 +__15. Angular Hold Stiffness (**AH**)__ 362 362 363 -This commandhas been removed.391 +The angular holding stiffness determines the servo's ability to hold a desired position under load. Values can be from -10 to 10, with the default being 0. Note that negative values mean the final position can be easily deflected. 364 364 393 +Ex: #5AH3<cr> 394 + 395 +This sets the holding stiffness for servo #5 to 3 for that session. 396 + 397 +Query Angular Hold Stiffness (**QAH**) 398 + 399 +Ex: #5QAH<cr> might return *5QAH3<cr> 400 + 401 +This returns the servo's angular holding stiffness value. 402 + 403 +Configure Angular Hold Stiffness (**CAH**) 404 + 405 +Ex: #5CAH2<cr> 406 + 407 +This writes the angular holding stiffness of servo #5 to 2 to EEPROM 408 + 409 +__15b: Angular Acceleration (**AA**)__ 410 + 411 +{More details to come} 412 + 413 +__15c: Angular Deceleration (**AD**)__ 414 + 415 +{More details to come} 416 + 417 +__15d: Motion Control (**MC**)__ 418 + 419 +{More details to come} 420 + 365 365 __16. RGB LED (**LED**)__ 366 366 367 367 Ex: #5LED3<cr> ... ... @@ -433,7 +433,7 @@ 433 433 434 434 __20. First / Initial Position (pulse)__ 435 435 436 -In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for s erialmode only.492 +In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for smart mode only. 437 437 438 438 Query First Position in Pulses (**QFP**) 439 439 ... ... @@ -449,7 +449,7 @@ 449 449 450 450 __21. First / Initial Position (Degrees)__ 451 451 452 -In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for s erialmode only.508 +In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for smart mode only. 453 453 454 454 Query First Position in Degrees (**QFD**) 455 455 ... ... @@ -461,7 +461,7 @@ 461 461 462 462 Ex: #5CD64<cr> 463 463 464 -This configuration command means the servo, when set to s erialmode, will immediately move to 6.4 degrees upon power up. Sending a CFD command without a number results in the servo remaining limp upon power up.520 +This configuration command means the servo, when set to smart mode, will immediately move to 6.4 degrees upon power up. Sending a CFD command without a number results in the servo remaining limp upon power up. 465 465 466 466 __22. Query Target Position in Degrees (**QDT**)__ 467 467 ... ... @@ -469,12 +469,18 @@ 469 469 470 470 The query target position command returns the target angle during and after an action which results in a rotation of the servo horn. In the example above, the servo is rotating to a virtual position of 678.3 degrees. Should the servo not have a target position or be in wheel mode, it will respond without a number (Ex: *5QDT<cr>). 471 471 472 -__23. Query Model (**QM**)__ 528 +__23. Query Model String (**QMS**)__ 473 473 474 -Ex: #5QM<cr> might return *5QM1 1<cr>530 +Ex: #5QMS<cr> might return *5QMSLSS-HS1cr> 475 475 476 -This reply means the servo model is 1 .1, meaning high speed servo, first revision.1=HS (high speed) 2=ST (standard) 3=HT (high torque)532 +This reply means the servo model is LSS-HS1, meaning a high speed servo, first revision. 477 477 534 +__23b. Query Model (**QM**)__ 535 + 536 +Ex: #5QM<cr> might return *5QM68702699520cr> 537 + 538 +This reply means the servo model is 0xFFF000000 or 100, meaning a high speed servo, first revision. 539 + 478 478 __24. Query Serial Number (**QN**)__ 479 479 480 480 Ex: #5QN<cr> might return *5QN~_~_<cr> ... ... @@ -506,7 +506,7 @@ 506 506 507 507 __27. Query Voltage (**QV**)__ 508 508 509 -Ex: #5QV<cr> might return *5QV112<cr> 571 +Ex: #5QV<cr> might return *5QV11200<cr> 510 510 511 511 The number returned has one decimal, so in the case above, servo with ID 5 has an input voltage of 11.2V (perhaps a three cell LiPo battery). 512 512 ... ... @@ -522,19 +522,25 @@ 522 522 523 523 The units are in milliamps, so in the example above, the servo is consuming 140mA, or 0.14A. 524 524 525 -__ 20. RC Mode (**CRC**)__587 +__30. RC Mode (**CRC**)__ 526 526 527 -This command puts the servo into RC mode, where it will only respond to RC pulses. Note that because this is the case, the servo will no longer accept serial commands. The servo can be placed back into s erialmodelonly using the button menu.589 +This command puts the servo into RC mode (position or continuous), where it will only respond to RC pulses. Note that because this is the case, the servo will no longer accept serial commands. The servo can be placed back into smart mode by using the button menu. 528 528 591 +|**Command sent**|**Note** 592 +|ex: #5CRC<cr>|Stay in smart mode. 593 +|ex: #5CRC1<cr>|Change to RC position mode. 594 +|ex: #5CRC2<cr>|Change to RC continuous (wheel) mode. 595 +|ex: #5CRC*<cr>|Where * is any number or value. Stay in smart mode. 596 + 529 529 EX: #5CRC<cr> 530 530 531 -__ **RESET**__599 +__31. RESET__ 532 532 533 533 Ex: #5RESET<cr> or #5RS<cr> 534 534 535 535 This command does a "soft reset" (no power cycle required) and reverts all commands to those stored in EEPROM (i.e. configuration commands). 536 536 537 - **__DEFAULT__**__&**CONFIRM**__605 +__32. DEFAULT & CONFIRM__ 538 538 539 539 Ex: #5DEFAULT<cr> 540 540 ... ... @@ -546,7 +546,7 @@ 546 546 547 547 Note that after the CONFIRM command is sent, the servo will automatically perform a RESET. 548 548 549 - **__UPDATE__**__&**CONFIRM**__617 +__33. UPDATE & CONFIRM__ 550 550 551 551 Ex: #5UPDATE<cr> 552 552 ... ... @@ -558,22 +558,4 @@ 558 558 559 559 Note that after the CONFIRM command is sent, the servo will automatically perform a RESET. 560 560 561 -=== Virtual Angular Position === 562 - 563 -{In progress} 564 - 565 -A "virtual position" is one which allows for multiple rotations of the output horn, moving the center position and more. The "absolute position" would be the angle of the output shaft with respect to 360.0 degrees. 566 - 567 -[[image:LSS-servo-positions.jpg]] 568 - 569 -Example: Gyre direction / rotation is positive (clockwise), and origin offset has not been modified. 570 - 571 -#1D-300<cr> The servo is commander to move to -30.0 degrees (green arrow) 572 - 573 -#1D2100<cr> This second position command is sent to the servo, which moves it to 210.0 degrees (orange arrow) 574 - 575 -#1D-4200<cr> The servo rotates counterclockwise to a position of -420 degrees (red arrow), which means one full rotation of 360 degrees and (420.0-360.0) stopping at an absolute position of 60.0 degrees, but virtual position of -420.0. 576 - 577 -Although the final position would be the same as if the servo were commanded to move to -60.0 degrees, it is in fact at -420.0 degrees. 578 - 579 -#1D4800<cr> This new command is sent which would then cause the servo to rotate from -420.0 degrees to 480.0 degrees, which would be a total of 900 degrees of clockwise rotation, or 2.5 complete rotations. 629 +=== ===