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

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.

Just was smooth enough for my needs. Servos were not able to match the LSS config performance or settings. Zero position was often lost or changed.

Due to the mass attached to each servo, I need to slow down the speed and get more fluid control.

Do you need positioning or not ?
With the example I posted above, it will move then stop when back to center.

Back to center if fine, if holding the analog joystick in position holds position and only recenters when released.

No - That example will only move it without returning to position.
However it can be smoother to operate.

Without seeing the outcome, it’s hard to suggest solutions.
You should be able to get a similar movement in RC to what you have in the LSS-Config.

In LSS-Config it’s a drag and drop movement where only ONE command is sent when you release the cursor.
But in the arduino example positions are sent every few milliseconds.