Lynxmotion Smart Servo (LSS) control with Spektrum RC Controller?

I see for my previous question, each servo can be set-up in the LSS Config, since serial mode is selected.

I figured out some issues I had and was able to get the set-up to work.

I think this is the right Rx to 2IO connection since it’s working, just wanted to validate.

Hi @Insoc,

We have some issues with notification emails for “watching” topics and didn’t see your question here.
I’m also moving your other question here to keep everything at the same place.

Using the LSS config software, I set ID’s for 3 servos, but when I connect and scan, it only finds one of them. Baud rates for all are default, they are connected via serial cables.

  • The LSS-Config should see all 3 servos if they are on different ID’s.
  • Can you take a picture of your setup ?
  • Have you tried to connect only one servos and scan again ?
  • Make sure not to have your LSS-2IO connected to the Bus while doing the setup with the LSS-Config. (if using the LSS-Adapter)

Since I’m planning on using the PPM mode as discussed with a RC controller, rates would still be controlled by the RC controller correct?

  • What do you mean by “rates” exactly ?
  • The LSS-2IO will get the RC-PPM signal, read and process it into a Serial command sent to the servos.

I think this is the right Rx to 2IO connection since it’s working, just wanted to validate.

  • In the example I created the correct pin is A3, you are connected at the right spot.
  // Start the PPM function on PIN A3
  ppm.begin(A3, false);
  • The Receiver need to be connected to CH2 and set to PPM by double press on the receiver button (while powered) and the LED will turn to a Purpleish color.

All the best,

Hi,

I copied your setup with the hardware, I also noticed I need to turn off or disconnect the Rx for LSS config to scan and find a servo.

All servos are connected in serial mode, assigned IDs 1-3. It only finds ID 3 each time, which is the last servo in the chain.

As I noted in another thread, the RC PPM mode works but maybe I missed your note on whether or not I can leverage the saved servo settings via LSS config with this option? Is that possible? Right now the dead band for one joystick is too sensitive, say you try to pan but the roll or tilt also is very jerky when moved.

When I move one servo in LSS config, adjusting the speed and etc, the end result is what I desire.

Thank you for your help!

So the 2IO is disconnected. Only 12V power and USB-C then the serial cables (daisy chained) to each servo.

When I scan the servos (there are only 3), it only finds the last one (#3). Baud is the default 115200 for each servo.

The other problem I’m having with the RC setup via PPM, when I power on the system the servos crash and do not go to their set locations.

It does indeed find the servos plugged in individually.

  • You mean disconnecting the LSS-2IO ?
  • So 3 servos connected to the LSS-Adapter (and only the servos connected) with Power and USB then Scan ?
  • Maybe re-confirm that your servos are set to the proper ID by testing them one by one.
  • So you got the system working, the LSS-2IO with LSS Servos controlled by the RC Transmitter/Receiver ?
  • The deadband can be changed in the code (HERE) and set to “10” by default.

Note: The servo will be more sensitive if it’s set for a higher angular range as it’s using the signal from the RC and dividing it by the amount of degrees.

  • The example disable the internal “Motion Controller” for the servo which disable the speed limitation.
  • It is possible to use it with the “Motion Controller” enabled but the example spit position very fast and it makes the movement erratic.

Possible solution

  • Limit the speed in LSS-Config (Ex: 10rpm)
  • Adjust the deadband (Ex: 25) (HERE)
  • Comment the “EM0” configuration (HERE)

Note: The highest the RPM the more “jerking” you will have.

Correct

[quote=“dialfonzo, post:18, topic:90910”]

  • So 3 servos connected to the LSS-Adapter (and only the servos connected) with Power and USB then Scan ?
  • Maybe re-confirm that your

Correct, I checked each one individually and they are set to the correct IDs, 1, 2 & 3.

I will try this and your other solutions, thank you!

Would you be able to do a little video showing that ?

I’ll see what I can do, the servo option is not working for me as the speeds are too high.

Have you tried that ?

I did try those options, appears the speed adjustment via LSS config is not working for me. Perhaps I’m not changing the enable motion profile correctly?

Would that just be changing the line from disable to enable? Do you have an example?

I commented the configuration of EM0 in the code, have a try:
LSS_PPM_EM1.zip (1.6 KB)

Note: Make sure you did set your maximum speed in the LSS-Config before.

Thanks! I tried it but the servos are not smooth and there is considerable jerk.

It also appears the Arduino code is overwriting the settings via LSS, LED color is changing, did see it’s defined as blue, just not sure if there is something else going on?

I was able to find all 3 servos with LSS config now, switched computers, appears there is an issue with the COM port or driver?

Lastly, is there a great tutorial or sample code to drive this via the Arduino only? Servo 1, rotate 0 to 180 and 180 to 0 and so on?

Thanks

Motion “jerk” can be from multiple things.

  • Are you running the servos free, without anything attached or in an assembly on load ?
  • Have you specify an amount of displacement which is greater than 180deg ?

The example I posted include a set of the LED to Blue, this can be easily disable if needed.
To put anything in “comments” you have to add “//” before.

So this:

  // LED Color
  Serial.println("#254LED3"); // 3 = blue

Become this:

  // LED Color
  //Serial.println("#254LED3"); // 3 = blue

The servos responds to Serial commands and the Protocol is quite simple.
For example, if you want to make Servo ID1 move to a position in degrees, you just have to send a serial command of “#1D900” for 90deg.

Here is an example of motion with delays in between

void setup() {
Serial.begin(115200);
}

void loop() {
Serial.println("#1D0");   // Send the LSS ID1 to position 0
delay(1000);              // Wait for 1 second
Serial.println("#1D90");  // Send the LSS ID1 to position 90
delay(1000);              // Wait for 1 second
Serial.println("#1D0");   // Send the LSS ID1 to position 0
delay(1000);              // Wait for 1 second
Serial.println("#1D-90");  // Send the LSS ID1 to position 90
delay(1000);              // Wait for 1 second
}

Yes, there is a load attached to the servos and nothing over 180deg in displacement.

When I test via LSS Config, the slower speed works well even with the load.

Is the baud rate possibly an issue, should it be changed for each servo?

Is there any details on the other servo options, stiffness and etc.?

Thanks again!

If you get a great motion out of the LSS-Config, it should be doable with the example.
Main difference in the Config is the fact that you are sending One point only, dragging the cursor to a position and releasing it. However in the RC example it sends positions every few milliseconds.

The baudrate is just the digital speed (clock) between the servos and the microcontroller, that’s not your issue. It just need to be the same for the LSS and the Microcontroller.

Stiffness will have an impact but let’s start by trying to control the servos with RC just like it is in the LSS-Config.
In the example attached, take a look at this section, it is placed in the “Setup” and is only processed once at boot.

  // Insoc servo setup
  Serial.println("#254EM1");  // EM0 = motion profile disabled
  Serial.println("#254SR10"); // Set the maximum speed in RPM
  Serial.println("#254LED7"); //0=Off; 1=Red; 2=Green; 3=Blue; 4=Yellow; 5=Cyan; 6=Magenta; 7=White

This will set the maximum speed, the Motion Control Enabled (EM1) and the LED color of your choice.
Note1: Any commands send to the ID 254 will have effect on ALL servos.
Note2: Make sure you Power the servos BEFORE the Arduino.

LSS_PPM_2022-08-02-01.zip (1006 Bytes)

That solved it and it works as intended, thank you!

Lastly is there a detailed settings guide for all the functions built within the LSS Config software? Stiffness and other settings. I was able to adjust the range of motion and speed, among other things.

Great news…!!

More about the LSS Config HERE

The software only take care of a small portion of essential settings, more can be set directly via serial commands.
One can set them on the fly in an Arduino project OR directly via a terminal (like in the LSS-Config).

Just make sure to know what you do prior to set something but HERE is the list of commands.

What do you want to adjust exactly ?
I would advise not to play with the Stiffness’s if you already have a good motion.

Thanks again!

I’ll look into the options, a few joints are still a little jerky, and wondered if I can smooth them out slightly.

It’s possible to play with the Stiffness if you want to experiment.
Since going back and forth between the LSS-Config and Code is not the best, you can add them to your code.

Here I added the two lines, you can play with the values.
What exactly is happening ?

  // Insoc servo setup
  Serial.println("#254EM1");  // EM0 = motion profile disabled
  Serial.println("#254SR10"); // Set the maximum speed in RPM
  Serial.println("#254LED7"); // 0=Off; 1=Red; 2=Green; 3=Blue; 4=Yellow; 5=Cyan; 6=Magenta; 7=White
  Serial.println("#254AS0");  // Angular Stiffness (Default value is 0)
  Serial.println("#254AH4");  // Angular Holding Stiffness (Default value is 4)
  delay(25);

Could not solve the RC direction, so now looking at using wired joysticks via Arduino to control. Can anyone point me to a good example code that allows full serial control of the servos and config via LSS using these hardwired?

Something similar to this, not sure if I can do something else and connect to the 2IO instead of using a Uno.

Thanks!