...
The Lynxmotion Smart Servos (LSS) are compact, modular and configurable actuators designed to be an evolution of the standard RC servo for use in multi-degree-of-freedom roboticsthat provide greater control than standard PWM servos. The servo lineup currently includes three “smart servos” which appear physically the same, sharing the same dimensions , and mounting points and output spline, but differing in maximum torque and speed.
Power: The servos need 6-12V, and 12v for maximum speed and torque.
Getting Started:
...
The lynx motion has a simple serial protocol for controlling the motor, that is human-readable:
Number sign #
Servo ID number as an integer
Action command (two to three letters, no spaces, capital or lower case)
Configuration value in the correct units with no decimal
End with a control / carriage return '<cr>'
Ex: #5PD1443<cr>
Additional Parts:
Hookup with Power-hub
The power hub
...
is the most universal way of connecting to the motors. You will need an external power source with a 5mm jack for 12v. Care should be taken when connecting the VIN pin, as this will be 12 volts!
...
Example Code for Arduino
While the Arduino library is Ther is a custom LSS library for Arduino, but it's not necessarily needed to control the smart servos, some of these examples make use of itand it is not compatible with the IAD shields for both MKR and Arduino Uno.
This example cycles through the LED colours of the smart servos.
Important. The following examples are written using Lynx smart motion Arduino library 1.4.1. Newer versions no longer support Software Serial. If you wish to be able to select which pins the servos are connected to (as in examples below), install the older version of the library-
...
language | c# |
---|
...
Code Block | ||
---|---|---|
| ||
#include <SoftwareSerial.h> #define rxPin 8 #define txPin 9 SoftwareSerial mySerial(rxPin, txPin); // Create the new software serial instance #define LSS_ID (254) // ID 254 to broadcast to every motor on bus // Create one LSS object LSS myLSS = LSS(LSS_ID); void setup() { servoSerial.begin(LSS_DefaultBaud); LSS::initBus(servoSerial, LSS_DefaultBaud); broadcast to every motor on bus void setup() { servoSerial.begin(115200); // Important! this is the standard speed for talking to LSS mySerial.print("#0D1500\r"); // this is used to clear the serial buffer } void loop() { // Loop through each of the 8 LED color (black = 0, red = 1, ..., white = 7) for (uint8_t i = LSS_LED_Black; i <= LSS_LED_White; i++){ // Set the color (session only) of the LSS //> https://www.robotshop.com/info/wiki/lynxmotion/view/lynxmotion-smart-servo/lss-communication-protocol/#H14.LEDColor28LED29 white = 7) for (uint8_t LEDCode = 0; LEDCode <= 7; LEDCode++){ // Set the color (session only) of the LSS // Options are: // LSS_LED_Black = 0 // LSS_LED_Red = 1 // LSS_LED_Green = 2 // LSS_LED_Blue = 3 // LSS_LED_Yellow = 4 // LSS_LED_Cyan = 5 // LSS_LED_Magenta = 6 // LSS_LED_White = 7 myLSSmySerial.setColorLEDprint(String("#") + LSS_LED_Color) i);ID + String("LED") + LEDCode + "\r"); // set LED delay(1000); } } |
This example goes through the basic setup and movement
...