Hey @DavidMakesRobots,
Welcome to the RobotShop community!
Sounds neat! Looking forward to see how you progress.
You are also not the only one thinking of an hex or quad using the LSS. You can see a successful quad here and a group of Lynxmotion community members working on a hexapod design (RPi, Teensy 4, etc.) here. Full disclosure, all of them were part of our beta testing program so they did get a to use them before everyone else.
That is an amazing idea! Thanks for the share! We currently only have official Arduino and Python libraries, but we are always looking to expand where the LSS are used and assist any project with them.
As you are probably already aware, AS and AH will change the response to position error (i.e.: trying to get to the desired/requested position). AS affects all movement response and AH specifically is used to tune the holding component (when the position is reached/in close vicinity). Higher values mean a stronger response (effectively higher duty cycle changes).
Since EM=0 performs no acceleration/deceleration (which means very jerky moves), we’ve added FPC to control a first order filter (exponential weighted average) over the input position from the D command. If FPC >= 2, then the filter will be active. FPC = 1 makes it directly apply the position (effectively not used) and FPC = 0 deactivates it. We recommend using odd numbers for the value.
So, if you send a LSS (where QD = 0, EM = 0, FPC = 5, IPE = 1) a motion command like D900, the filter will absorb this value over a count of 5, therefore passing on to the control a smaller delta. In this case, it would be: ((0 * 4) + 900) / 5 = 180. Then, 20 ms later (or 4 control loop of 5 ms each), the requested position is replayed again, changing the value to: ((180 * 4) + 900) / 5 = 324. This continues until the value passed to the control equals the desired position (original D command). Of course, if you send another D command before this one is completed the new value will be used every 20 ms.
If you want a more responsive LSS, you can try FPC = 3. Alternatively, you can increase the dampening effect of the filter by increasing FPC above the default value of 5.
Since this method requires requesting the position continuously until D[val] = QD, IPE was added to do this for the user internally. Therefore, when in EM = 0 with and FPC >= 2 and an IPE = 1, the LSS, once given a D command will update its filter with an internal repeat of that D command every 20 ms.
If IPE = 0, it will instead apply the position to the filter once (obviously not getting to the actual position, just the intermediary point instead) and holding there. Using IPE = 0 is great if you want to use your own timing/external control code for changing the position / filter value. For most use cases though, IPE = 1 is more practical and also saves your from sending repeated D commands on the bus to all servos (since it repeats internally the last command until the position is reached).
This advance command was added to help in the development of some advance code using ROS for a humanoid using LSS that includes compliance.
It is quite simple to use and yes it can be used in one of two ways:
- #[id]MMD[val]\r
In this case, both direction of motion will have their 10 bit value of duty cycle capped at that number.
- #[id]MMD[val+],[val-]\r
With this, a different value can be used (separated by a comma) for the positive (or CW) and negative (or CCW) motions.
Please note there is an enforced minimum of 1/4 (or 255 / 1023), but be careful of setting a cap that is too low for the RPM/load used with the LSS. Using a lower cap than 1023 can create situations where the motor is stalled due to the lower effective voltage when under higher loads, which can easily cause it to overheat.
I think @cbenson provided this info already in his reply.
Feel free to ask any other questions, recommendations, etc. that you may have! We are always glad for feedback from our users.
Sincerely,