How to connect rplidar S2 to cube pilot

I want to use rplidar S2 over cube pilot running ardupilot. As rplidar A2 already supported out of the box and slamtec website showing its compatible with A series so I want know S2 will support out of the box or not as there is no data available related to this topic.

Thank you

There is data to this topic. The data is… S2 is not yet supported.

Search this forum there are multiple posts explaining it.

Hi @amilcarlucas,
I am wondering if the support for S2 has been added to the Arducopter stable or Dev branch. Or if it is still being worked on? Please share if you have any insights.
Many Thanks

1 Like

Get 4.5.2 and it should work

1 Like

Thank you for quick response. I will try it right away and report back. I hope it works like a Charm :crossed_fingers:

1 Like

I have flashed the latest Copter 4.6.0 Dev on Cube Orange+ for testing. S2 LIDAR is connected on Telem1 (Serial 1) while power is provided through a separate 5V BEC connected to the same battery that powers up the Cube Orange+ (for common ground).

I am following the instructions here RPLidar A2 and S1 360 degree lidar — Copter documentation for parameter setup to enable the Obstacle Avoidance, and using the Mission Planner → Setup → Advanced → Proximity to view the LIDAR map. I am on Mission Planner 1.3.81 build 1.3.8741.25556

However, i noticed that S2 does not start scanning automatically when connected to 5V power source (no motor vibration/noise). The only way to start a scan, that i have discovered so far, is by connecting the S2 to a PC via the USB adapter, and using the start scan button in the RoboStudio software GUI.

I have contacted SlamTech support to find a way to automatically start scanning on power up. If anyone here as already figured it out, please share a solution, so that i can proceed with the testing.

Cheers!

2 Likes

What you power the “scan” pin correctly, it will start scan. It’s not a software setting, it’s a hardware connection.

Hi Amilacarlucas,

Thank you for the input. I have the Serial Port Version of S2 Lidar. Can you please confirm which is the “Scan” pin and the correct way of powering the scan pin?

We are able to start a scan by sending a command on the serial port. However, the sensor stops scanning every couple of seconds and re-starts the scan. Once it stops, the reported distance goes to 30m (which i believe is the maximum range of this sensor) and Ardupilot reports a warning “PRX-1 No Data”.

So we are unable to keep the sensor scanning continuously. Any tips on how to resolve this issue will be appreciated.
P.S: The sensor reports Firmware2.1 in ardupilot messages.

The scan pin is clearly marked in the RP Lidar S2 documentation.

I am following the datasheet available at SeedStudio.

I believe you are referring to the MOTCTL (Blue Pin) as the Scan Pin?

I am currently using serial commands to start, stop and control the rate as mentioned here. However, the MOTCTL pin is not connected anywhere. The MOTCTL pin description in the first image above is “Scan Motor / PWM Control Signal”. Do we need to provide DC 3.3 or 5V at this pin or PWM signal to achieve the correct operation of the motor?
Your help is highly appreciated in understanding how to use the MOTCTL or Scan Pin correctly.
Thanks again

In-fact there is conflicting information in the S2 datasheet i downloaded from SeedStudio (Document Date: 15-03-2021 rev1.7) and the one i just downloaded from SlamTech Website under Downloads->DTOF LIDAR->S2 (Document Date: 09-04-2024 rev1.2).
As per the SlamTech datasheet:

The blue pin is marked as NC (No Connection) and in the pin description it is recommended to Ground this pin.

@amilcarlucas can you please confirm which datasheet shall be followed? and in case of MOTCTL what voltage or PWM shall be provided on the Blue Pin.
Looking forward to your reply

Thanks again

It’s 3.3V. And it will start rotating without requiring extra commands on the A2.
The S2 must be similar

I will test my setup providing 3.3V on the MOTCTL (along with the 5V power and ground) and report back. I hope it solves the motor start/stop issue i am facing currently.

Thanks for the help. Much appreciated :+1: