$15 360 degree XV proximity lidar

You can pick up these cheap lidars for about $15 off ali express https://www.aliexpress.com/item/1005004435212108.html

There is code out there for them and I have used it to convert it to mavlink using @count74 s mavlink code


Its running on a STM32 blackpill but could be ported to esp32.
Flight controller RX pin connects to Uart 2 Tx pin A2,
Lidar motor driver /transistor to B1
Lidar Data connects to A10

The Lidar board takes 3.3v or 5v depeding on the version so check first, I killed my first one lol

on the flight controller:
set SERIALx_BAUD = 1500
Set PRX1_ORIENT =1 or it will be upside down.

Im using one of these mosfes to drive the motor but you could just use a transistor.


Very clever @geofrancis . A robot vacuum accessory part :+1:

1 Like

Im trying to make a 3d printed case for it so it looks good, you can buy cases for the original XV lidar but those are hard to come by now, but there are a lot of versions of this lidar in a lot of different machines so thats how i found the Xiaomi version thats a lot cheaper but unfortunately its a slightly different shape so none of the mounts or cases i can find on thingverse fit.

I was wondering how they can make that so cheap but the entire vacuum cleaner only cost $165!

1 Like

its not a time if flight sensor, its basically using a camera to look for the laser dot and calculating the distance based on the angle its at. the A2 lidar works the same way, you need to spend closer to 500 to get a time of flight sensor. Realistic range on this is probably 4-5 meters, i believe the protocol is limited to 6.5m

I have tweaked the code and its now getting 6-8hz update rate

To the high resolution display you need to select the proximity device then open the proximity viewer, you can open it twice, one will be the high resolution display for path planning and the other will be for proximity.


this is a good video on the lidar.

1 Like

You can find this type of cases in Aliexpress in all (almost) imaginable sizes.

Does the lidar work outdoors?
The robot manual doesn’t say anything about this so, why not?

1 Like

The laser on it is not very powerful and struggles against matt black surfaces. So im not sure how it will handle sunshine.

1 Like

My question exactly - how’s it do in sunlight?

My guess is poorly. But for the price and for certain applications, it looks excellent.

1 Like

Where i live sunshine is a rare thing so I will probably be able to use it ok. I will try and get some outdoor testing done in the next week or so.

I have found another lidar, its a 3irobotix Delta 2A from what I can find it should have slightly better range 8m vs 6m, be slightly faster and cheaper.


there is a good description of it here

and I found some code that might work,

so give me a couple of weeks and i should have another working.

I got the code working to convert the delta2a lidar but the lidar i got is faulty so i cant test it.

The 3d printed case for the other one is getting there. The dimentions are correct just need to tweak the screw holes.

I have built a version 2 of this mod using a RP-2040-zero, 2N2222 transistor and a 1k resistor. its much more compact making mounting much easier.

the case is published to thingverse

Very interesting,

The connection picture was a little bit hard to read, but this is my interpretation of it.

geofrancis, is this a correct representation of your connections?

The XV Lidar page you link on your github (about the Neato XV-11 modules), describing how to check the voltage version does not seam to be valid for the Xiaomi modules. (At least I can’t find any markings in my Xiaomi modules). Any tips on how to figure out what voltage the Xiaomi modules wants?

Edit! or maybe maybe…there is a connection from the 3v3 pad of the RP2040zero module to the motor… or? (I guess that your modules are 3.3V ? )

1 Like

that diagram looks correct.

Usually when you buy them it will list the version it is, if it has 1S in the name its the 3,3v version

ok… so your connections are for the 5V version?

I bought “Original LDS Laser Distance Sensor for Xiaomi Mi Robot 1s 1st SDJQR01RR SDJQR02RR SDJQR03RR Robot Vacuum Cleaner Spare Parts” from AliExpress… so this would be the 3.3V version then… And i should move the red wire from the 5V pin to the 3v3 tab on the RP2040zero… (I wounder if the zero module can supply the motor current with its internal regulator)

1 Like

the only difference in the wiring between on the 5v version I have and the 3.3v version is that you would connect the lidar board VCC pin to the 3.3v pad and the motor positive to the 5v pad rather than bridging them. The lidar only uses around 150ma so it should have no problem running it.

Ah… ok … thanks a lot… will update the pictures for both variants…

1 Like

New versions:

1 Like

you don’t technically need the RX wire from the flight controller as we are just sending data. I use a servo cable to connect it. for 5v, Ground and TX.