Last modified by Eric Nantel on 2024/09/06 14:52

From version < 21.1 >
edited by Coleman Benson
on 2023/07/18 08:48
To version < 1.2 >
edited by Eric Nantel
on 2023/06/21 11:04
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.CBenson
1 +xwiki:XWiki.ENantel
Content
... ... @@ -1,6 +4,3 @@
1 -{{warningBox warningText="More information coming soon"/}}
2 -
3 -
4 4  (% class="wikigeneratedid" id="HTableofContents" %)
5 5  **Page Contents**
6 6  
... ... @@ -8,28 +8,44 @@
8 8  
9 9  = Serial Protocol =
10 10  
11 -The Lynxmotion Smart Servo (LSS) PRO serial protocol was created in order to be as simple and straightforward as possible from a user perspective ("human readable format"), while at the same time staying compact and robust yet highly versatile. The protocol was based on Lynxmotion's Smart Servo (LSS) protocol, which itself was based on the SSC-32 & SSC-32U RC servo controllers. The LSS PRO series and normal LSS share many of the same commands, but because of higher angular precision, slightly different operation and different features, the two protocols do not fully overlap.
8 +The Lynxmotion Smart Servo (LSS) serial protocol was created in order to be as simple and straightforward as possible from a user perspective ("human readable format"), while at the same time staying compact and robust yet highly versatile. The protocol was based on Lynxmotion's SSC-32 & SSC-32U RC servo controllers and almost everything one might expect to be able to configure for a smart servomotor is available.
12 12  
13 13  In order to be able to control each servo individually with commands, the first step should be to assign a different ID number to each servo (see details on the Configure ID, or "CID" command [[here>>doc:||anchor="HIdentificationNumber28ID29"]]). Only the servo(s) which have been configured to a specific ID will act on a command sent to that ID. There is currently no CRC or checksum implemented as part of the protocol.
14 14  
15 -= Action Commands =
12 +== Session ==
16 16  
17 -Action commands tell the servo, within that session, to do something (i.e. "take an action"). The types of action commands which can be sent are described below, and they cannot be combined with other commands such as queries or configurations. Only one action command can be sent at a time. Action commands are session-specific, therefore once a servo is power cycled, it will not have any "memory" of previous actions or [[virtual positions>>||anchor="HVirtualAngularPosition"]] (described below). Action commands are sent serially to the servo's Rx pin and must be sent in the following format:
14 +{{html clean="false" wiki="true"}}
15 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
16 +A "session" is defined as the time between when the servo is powered ON to when it is powered OFF or reset.<div class="wikimodel-emptyline"></div>
18 18  
18 +**Note 1:** For a given session, the action related to a specific command overrides the stored value in EEPROM.<div class="wikimodel-emptyline"></div>
19 +**Note 2:** During the power-on / reset process the LSS cannot accept commands for a small amount of time (~1.25 s).<div class="wikimodel-emptyline"></div>
20 +**Note 3:** You can ensure the LSS is ready by using a query command to check for response (ex: #[id]Q\r or #[id]QID\r described below). If the LSS is ready for commands (initialized) it will respond to the query. A timeout between 50-100 ms is recommended to compensate for drivers, OS and buffering delays.
21 +<div class="wikimodel-emptyline"></div></div></div>
22 +{{/html}}
23 +
24 +== Action Commands ==
25 +
26 +{{html clean="false" wiki="true"}}
27 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
28 +Action commands tell the servo, within that session, to do something (i.e. "take an action"). The types of action commands which can be sent are described below, and they cannot be combined with other commands such as queries or configurations. Only one action command can be sent at a time. Action commands are session-specific, therefore once a servo is power cycled, it will not have any "memory" of previous actions or [[virtual positions>>||anchor="HVirtualAngularPosition"]] (described below). Action commands are sent serially to the servo's Rx pin and must be sent in the following format:<div class="wikimodel-emptyline"></div>
29 +
19 19  1. Start with a number sign **#** (Unicode Character: U+0023)
20 20  1. Servo ID number as an integer (assigning an ID described below)
21 21  1. Action command (one or more letters, no whitespace, capital or lowercase from the list below)
22 22  1. Action value in the correct units with no decimal
23 -1. End with a carriage return **\r** or **<cr>** Unicode Character (U+000D)
34 +1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)
24 24  
25 25  (((
26 -Ex: #5D130000<cr>
37 +Ex: #5D1800&lt;cr&gt;<div class="wikimodel-emptyline"></div>
27 27  
28 -This sends a serial command to all servo's RX pins which are connected to the bus and only servo(s) with ID #5 will move to a position (13000 in hundredths of degrees) of 130.00 degrees. Any servo on the bus which does not have ID 5 will take no action when receiving this command.
39 +This sends a serial command to all servo's RX pins which are connected to the bus and only servo(s) with ID #5 will move to a position (1800 in tenths of degrees) of 180.0 degrees. Any servo on the bus which does not have ID 5 will take no action when receiving this command.
40 +<div class="wikimodel-emptyline"></div></div></div>
41 +{{/html}}
29 29  
30 30  == Modifiers ==
31 31  
32 -{{html clean="false" wiki="true" __cke_selected_macro="true"}}
45 +{{html clean="false" wiki="true"}}
33 33  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
34 34  Modifiers can only be used with certain **action commands**. The format to include a modifier is:<div class="wikimodel-emptyline"></div>
35 35  
... ... @@ -41,11 +41,15 @@
41 41  1. Modifier value in the correct units with no decimal
42 42  1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)
43 43  
44 -Ex: #5D13000T1500&lt;cr&gt;<div class="wikimodel-emptyline"></div>
57 +Ex: #5D1800T1500&lt;cr&gt;<div class="wikimodel-emptyline"></div>
45 45  
46 -This results in the servo with ID #5 rotating to a position (1800 in tenths of degrees) of 130.00 degrees in a time ("T") of 1500 milliseconds (1.5 seconds).<div class="wikimodel-emptyline"></div>
59 +This results in the servo with ID #5 rotating to a position (1800 in tenths of degrees) of 180.0 degrees in a time ("T") of 1500 milliseconds (1.5 seconds).<div class="wikimodel-emptyline"></div>
47 47  <div class="wikimodel-emptyline"></div></div></div>
61 +{{/html}}
48 48  
63 +== Query Commands ==
64 +
65 +{{html clean="false" wiki="true"}}
49 49  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
50 50  Query commands request information from the servo. They are received via the Rx pin of the servo, and the servo's reply is sent via the servo's Tx pin. Using separate lines for Tx and Rx is called "full duplex". Query commands are also similar to action and configuration commands and must use the following format:<div class="wikimodel-emptyline"></div>
51 51  
... ... @@ -54,9 +54,9 @@
54 54  1. Query command (one to four letters, no spaces, capital or lower case)
55 55  1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)<div class="wikimodel-emptyline"></div>
56 56  
57 -Ex: #5QD&lt;cr&gt; Query the position in (hundredths of) degrees for servo with ID #5<div class="wikimodel-emptyline"></div>
74 +Ex: #5QD&lt;cr&gt; Query the position in (tenth of) degrees for servo with ID #5<div class="wikimodel-emptyline"></div>
58 58  
59 -The query will return a serial string (almost instantaneously) via the servo's Tx in the following format:
76 +The query will return a serial string (almost instantaneously) via the servo's Tx pin with the following format:
60 60  
61 61  1. Start with an asterisk * (Unicode Character: U+0023)
62 62  1. Servo ID number as an integer
... ... @@ -66,11 +66,15 @@
66 66  
67 67  There is currently no option to control how fast a servo replies after it has received a query command, therefore when sending a query command to the bus, the controller should be prepared to immediately "listen" for and parse the reply. Sending multiple queries to multiple servos on a bus in fast succession may result in replies overlapping and giving incorrect or corrupt data. As such, the controller should receive a reply before sending a new query command. A reply to the query sent above might be:<div class="wikimodel-emptyline"></div>
68 68  
69 -Ex: *5QD13000&lt;cr&gt;<div class="wikimodel-emptyline"></div>
86 +Ex: *5QD1800&lt;cr&gt;<div class="wikimodel-emptyline"></div>
70 70  
71 -This indicates that servo #5 is currently at 130.00 degrees (13000 tenths of degrees).
88 +This indicates that servo #5 is currently at 180.0 degrees (1800 tenths of degrees).
72 72  <div class="wikimodel-emptyline"></div></div></div>
90 +{{/html}}
73 73  
92 +== Configuration Commands ==
93 +
94 +{{html clean="false" wiki="true"}}
74 74  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
75 75  Configuration commands and corresponding values affect a servo's defaults which are written to and read from the servo's EEPROM.<div class="wikimodel-emptyline"></div>
76 76  
... ... @@ -100,7 +100,11 @@
100 100  
101 101  #5QSR1&lt;cr&gt; would return *5QSR20&lt;cr&gt; which represents the value in EEPROM
102 102  <div class="wikimodel-emptyline"></div></div></div>
124 +{{/html}}
103 103  
126 +== Virtual Angular Position ==
127 +
128 +{{html wiki="true" clean="false"}}
104 104  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
105 105  The ability to store a "virtual angular position" is a feature which allows for rotation beyond 360 degrees, permitting 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 a 360.0 degree circle and can be obtained by taking the modulus (with respect to 360 degrees) of the value. For example if the virtual position is reported as 15335 (or 1533.5 degrees), taking the modulus would give 93.5 degrees (3600 * 4 + 935 = 15335) as the absolute position (assuming no origin offset).<div class="wikimodel-emptyline"></div>
106 106  
... ... @@ -122,13 +122,11 @@
122 122  
123 123  If 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). The virtual position range at power-up is [-180.0°, 180.0°].
124 124  <div class="wikimodel-emptyline"></div></div></div>
125 -
126 126  {{/html}}
127 -)))
128 128  
129 129  = Command List =
130 130  
131 -**Latest firmware version currently : v0.0.780**
154 +**Latest firmware version currently : 368.29.14**
132 132  
133 133  |(% colspan="10" style="color:orange; font-size:18px" %)[[**Communication Setup**>>||anchor="HCommunicationSetup"]]
134 134  |(% style="width:25px" %) |(% style="width:200px" %)**Description**|(% style="text-align:center; width:100px" %)**Action**|(% style="text-align:center; width:75px" %)**Query**|(% style="text-align:center; width:75px" %)**Config**|(% style="text-align:center; width:75px" %)**RC**|(% style="text-align:center; width:75px" %)**Serial**|(% style="width:100px" %)**Default**|(% style="width:170px" %)**Unit**|**Notes**
... ... @@ -249,8 +249,25 @@
249 249  </div></div>
250 250  {{/html}}
251 251  
252 -====== ======
275 +====== __Configure RC Mode (**CRC**)__ ======
253 253  
277 +{{html wiki="true" clean="false"}}
278 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
279 +This command puts the servo into RC mode (position or continuous), where it will only respond to RC PWM signal on the servo's Rx pin. In this mode, the servo will no longer accept serial commands. The servo can be placed back into smart mode by using the button menu.<div class="wikimodel-emptyline"></div>
280 +
281 +|**Command sent**|**Note**
282 +|ex: #5CRC1&lt;cr&gt;|Change to RC position mode.
283 +|ex: #5CRC2&lt;cr&gt;|Change to RC continuous rotation (wheel) mode.
284 +|ex: #5CRC*&lt;cr&gt;|Where * is any value other than 1 or 2 (or no value): stay in smart mode.<div class="wikimodel-emptyline"></div>
285 +
286 +EX: #5CRC2&lt;cr&gt;<div class="wikimodel-emptyline"></div>
287 +
288 +This command would place the servo in RC wheel mode after a RESET or power cycle. Note that after a RESET or power cycle, the servo will be in RC mode and will not reply to serial commands. Using the command #5CRC&lt;cr&gt; or #5CRC3&lt;cr&gt; which requests that the servo remain in serial mode still requires a RESET command.<div class="wikimodel-emptyline"></div>
289 +
290 +**Important note: **To revert from RC mode back to serial mode, the [[LSS - Button Menu>>doc:lynxmotion-smart-servo.lss-button-menu.WebHome]] is required. Should the button be inaccessible (or broken) when the servo is in RC mode and the user needs to change to serial mode, a 5V constant HIGH needs to be sent to the servo's Rx pin (RC PWM pin), **ensuring a common GND** and wait for 30 seconds. Normal RC PWM pulses should not exceed 2500 milliseconds. After 30 seconds, the servo will interpret this as a desired mode change and change to serial mode. This has been implemented as a fail safe.<div class="wikimodel-emptyline"></div>
291 +</div></div>
292 +{{/html}}
293 +
254 254  ====== __Identification Number (**ID**)__ ======
255 255  
256 256  {{html wiki="true" clean="false"}}
... ... @@ -969,6 +969,8 @@
969 969  </div></div>
970 970  {{/html}}
971 971  
972 -== RGB LED ==
1012 +== RGB LED Patterns ==
973 973  
974 -The LED can be
1014 +The LED patterns below do not include those which are part of the button menu, which can be found here: [[LSS Button Menu>>doc:lynxmotion-smart-servo.lss-button-menu.WebHome]]
1015 +
1016 +[[image:LSS - LED Patterns.png]]
LSS-servo-ar-o-1.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -xwiki:XWiki.CBenson
Size
... ... @@ -1,1 +1,0 @@
1 -11.8 KB
Content
LSS-servo-ar.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -xwiki:XWiki.CBenson
Size
... ... @@ -1,1 +1,0 @@
1 -11.8 KB
Content
LSS-servo-default.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -xwiki:XWiki.CBenson
Size
... ... @@ -1,1 +1,0 @@
1 -12.3 KB
Content
LSS-servo-origin.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -xwiki:XWiki.CBenson
Size
... ... @@ -1,1 +1,0 @@
1 -12.2 KB
Content
LSS-servo-positions.jpg
Author
... ... @@ -1,1 +1,0 @@
1 -xwiki:XWiki.CBenson
Size
... ... @@ -1,1 +1,0 @@
1 -13.0 KB
Content
Copyright RobotShop 2018