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

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!

Hi Insoc,

I was on vacation, sorry for the long wait.
What do you mean RC direction ? You can change the “Gyre” of the servo and it will change the direction.

Let me know,

Hi,

I was unable get the desired results out of the rc setup, so I am hoping to use a wired joystick via arduino to leverage the full functionality of the LSS servos. Not sure if there are any examples out there?

What exactly was the issue with the RC version ?
I did another example which move the servo from RC and keep the position once the joystick is released. LSS_Velocity_PPM

A wired joystick would use an Analog reading and take that information to send a position.