Introduction: How to Configure and Use Smart Servos LewanSoul (LX-16A)

The LewanSoul produces where interesting and cheap smart servo (LX-16A) that can be used in different DIY projects.

For example:

https://www.instructables.com/id/How-to-Make-a-New...

It almost 3 times cheaper (~$15) to its close analog the XL430-W250-T (~$50).

And here you can compare it with other Dynamixel servo:

http://www.buildlog.net/blog/2017/09/lewansoul-lo....

The advantage of smart servos is that they very accurate and provides the feedback about their position, temperature and voltage. Also they has protection from overloading.

The disadvantage is that they uses sophisticated protocol that could be a problem for using them in DIY projects.

Lets try to decrease this a little disadvantage to get the big advantage :)

Supplies

For that you need:

- LX-16A smart servo(s)

- Controller board

- Power supply (8.4V)

Step 1: Wire the Servo to Controller

To control the LX-16A smart servos you need a special controller board

(you can buy it together with the servo on aliexpress).

The simplest one ($7) that shown on picture can control 8+ servos.

All you need is to connect it to smart servo, attach the power supply and then connect the controller to computer using USB cable.

Then you will able to send the special commands from computer to the controller board to control the servo and get feedback from it.

Step 2: Software

To control the servo from computer you need a special software.

I suggest to use the Python for that purpose since it very easy to setup it can be used on different platforms (Windows/Linux/MacOS).

Install the Python 3:

https://realpython.com/installing-python/

Download the python scripts for controlling the servo:

https://github.com/RoboLabHub/LewanSoul

Extract it and run the command prompt (cmd.exe), then go to folder where you extracted the script:

cd "C:\Users\Test\Downloads\LewanSoul-master\LewanSoul-master\src"

Now you ready to open the world of smart servos for your DIY projects :)

Step 3: Get the COM Port

Now you need to get the COM port where your controller attached to computer.

The easiest way to do it is to run the Arduino IDE and check it there.

Then adjust it in your local copy of python script (at line 6):

C:\Users\Test\Downloads\LewanSoul-master\LewanSoul-master\src\lx_setup.py

If you have trouble with finding the COM port number then please use these links for help:

https://www.swarthmore.edu/NatSci/echeeve1/Class/E...

https://www.digikey.com/en/maker/blogs/2018/how-to...

Step 4: Get the Servo Status

If you have only one servo attached to the controller board then you can run the following command:

python lx_setup.py

It will show the id of servo (8), its position (0) and temperature (29 °C).

If you already know the servo id then specify the command argument info with servo id (8):

python lx_setup.py info 8

(this command is useful when you have several servos attached to the same controller board).

To get the list of all command arguments run:

python lx_setup.py help

Step 5: Move Your Servo

Now its time to move your servo.

The LX-16A servo has moving range from 0 to 240 degree that corresponds to position from 0 to 1000.

So, to move the servo you have to set it position by command :

python lx_setup.py set_pos 8 500

(to move the servo with id 8 to position 500 that corresponds to 120 degree).

And then check that servo really moved to its new position by running:

python lx_setup.py info 8

Step 6: Other Commands

Here the list of some useful commands that may help you to setup the servo.

Scan all servos ids attached to the controlled board:

python lx_setup.py scan

Test servo range (move servo to 0, then to 1000 and then to 500):

python lx_setup.py test 8

Reassign servo id (from 8 to 3):

python lx_setup.py assign 8 3

Reset servo (reset servo internal state to default and set its id to 1):

python lx_setup.py reset 8

Step 7: Some Videos and Spec

Some helpful video about LX-16A (found in google):

The LX-16A servo spec: https://github.com/RoboLabHub/LewanSoul/blob/mast...

Step 8: Finally

And when you will be a little bit more familiar with that servo you may want to build something really interesting.

For example, quadruped robot:

The 6DOF robot arm:

https://github.com/RoboLabHub/RobotArm_v1.0

Or buy a ready kit (~$240), but it is only 5DOF robot arm :)