Unable to query data from HS-1 motor using arduino and esp32


I’m working on using the Lynx motion motor HS1. I’m trying to control it using ESP-32. While, I was able to send commands to the motor, which gives desired output…I’m not able to get data through the Rx of the motor. The data received turns to be integers between 1-255, with no discernible pattern. On using the configuration software, the baud rate in which the motor is detected keeps changing.

Is there a specific way to parse the data? Also tried using voltage translators to match the voltages of the motor and esp-32.

Do help!

@Thiru Welcome to the RobotShop Community.

You can try using the LSS-Arduino library here, though not sure it will work as is with the ESP32

On using the configuration software, the baud rate in which the motor is detected keeps changing.

This is certainly odd. You connect the servo, power it, connect it to the computer and open the software. You manually select the right COM port (after ensuring the drivers have been properly installed), and do an AUTO search for the servo. It should show up as one baud rate at the bottom left of the interface. If you change the value and don’t click “Update”, it will revert to the baud rate it had before. If you are getting replies, but they are garbled, it does sound like a difference in baud rate - did you check the baud rate at which you’re displaying the values on screen?

As soon as the interface detects the servo, information (data points) should start to fill the graph, which also indicates that the query responses are working. You can see the format for replies to queries here:

For example, querying the position (in degrees) of servo #5:

the servo might reply with something like the following, indicating it’s at 180.0 degrees:


1 Like


Thanks for the prompt reply!

The library doesn’t work with ESP-32. However, we were able to write commands to the motor directly. So, as far as I can tell, there is no issue with wiring.

The motor doesn’t seem to return query data even with Arduino. I have attached pics for your reference. Also, the screenshot for the configuration software is shown. You can see how the motor’s detection keeps varying.

As for the baud rate, we didn’t change the baud rate. And since the default is 115200, that’s what we have been operating with.

You can also see in the software, it says, “Yours is a meta-servo…”. What does that mean?

Kindly help!

1 Like

Are you trying to use the LSS Config Software with the HS1 connected to a microcontroller? If so, that won’t work since the microcontroller needs to be programmed as a pass-through device. The LSS Config works best with a serial to USB adapter, for example the LSS Adapter:

Let’s start with some basics: what hardware are you using and how is it all connected? You should ideally have:

  • One HS1 servo (not two, three or more)
  • 12V, 1A+ power supply connected to the servo’s power (red and black on the RC cable)
  • Tx on the HS1 connected to Rx on the microcontroller
  • Rx on the HS1 connected to Tx on the microcontroller
  • GND on the HS1 connected to GND on the microcontroller

A clear photo or two would help confirm this.

Let’s do a factory reset on the servo to undo any possible changes. The procedure can be found here at the bottom:

Do you have a normal Arduino microcontroller you can connect to the servo? If so, set it up as outlined above and use the LSS Arduino Library and try one of the examples like LSS_Sweep.

Yes, I did use the motor through a MC onto the Config software. Will try making the esp32 a pass through.

Yes, I’m using only one servo. The supply is sufficient, and the other connections are as you’ve mentioned. I’ll try to get you the photos, however, the connections can be confirmed to be working as motor receives and executes RPM, LED commands. Tried the reset.

I do have an Arduino, and the sweep example works. Only on trying the query commands, I’ve getting random numbers(between 0-255) and/or symbols.

Kindly help!

Can you try the LSS_Query example via Arduino?

Yup, tried that

Within that example, can you confirm the baud rate is set to 115200, and the serial terminal in Arduino is also set to 115200? If so, then there may actually be something wrong with the servo’s Tx pin (this would be a first time since all servos are tested during the QC part of manufacturing).

1 Like