top | item 43738561

Raspberry Pi Lidar Scanner

686 points| Venn1 | 11 months ago |github.com | reply

186 comments

order
[+] godelski|11 months ago|reply
This is really cool

One thing I'd suggest, for any hardware product, is that when doing your bill of materials to provide links and show estimated costs. Sure, these will change but having a rough idea of the costs is really helpful, especially when perusing on from things like HN. It can be a big difference for someone to decide if they want to try it on their own or not. It is the ballpark figures that matter, not the specifics.

You did all that research, write it down. If for no one but yourself! Providing links is highly helpful because names can be funky and helps people (including your future self) know if this is the same thing or not. It's always noisy, but these things reduce noise. Importantly, they take no time while you're doing the project (you literally bought the parts, so you have the link and the price). It saves yourself a lot of hassle, not just for others. Document because no one remembers anything after a few days or weeks. It takes 10 seconds to write it down and 30 minutes to do the thing all over again, so be lazy and document. I think this is one of the biggest lessons I learned when I started as an engineer. You save yourself so much time. You just got to fight that dumb part in your head that is trying to convince you that it doesn't save time. (Same with documenting code[0])

Here. I did a quick "15 minute" look. May not be accurate

  Lidar:
    One of:
      LD06: $80 https://www.aliexpress.us/item/3256803352905216.html
      LD19: $70 https://www.amazon.com/DTOF-D300-Distance-Obstacle-Education/dp/B0B1V8D36H
      STL27L: $160 https://www.dfrobot.com/product-2726.html
  Camera and Lens: $60 https://www.amazon.com/Arducam-Raspberry-Camera-Distortion-Compatible/dp/B0B1MN721K
  Raspberry Pi 4: $50
  NEMA17 42-23 stepper: $10 https://www.amazon.com/SIMAX3D-Nema17-Stepper-Motor/dp/B0CQLFNSMJ
  
That gives us $200-$280 before counting the power supply and buck converter.

[0] When I wrote the code only me and god understood what was going on. But as time marched on, now only god knows.

[+] Aurornis|11 months ago|reply
Learning projects like this is about to get a lot less accessible due to the extreme tariffs and elimination of the de minimis exemption. Take that BOM and multiply it by 2X or 3X depending on the source and how many different shipments arrived.

I can’t tell you how depressing it is to go from having access to cheap learning materials for introducing kids (and adults) to electronics, and now it’s being taxed away in the name of improving the US competitiveness or something. Total footgun.

[+] firesteelrain|11 months ago|reply
The good thing it’s on GitHub so you can submit a pull request for a BOM to help the person out.
[+] juujian|11 months ago|reply
Incredible that this is too expense for a company like Tesla.
[+] a_subsystem|11 months ago|reply
This is the most ungrateful comment I've read today, harping away about how 'it should have been done'.

Well you fucking do it then.

I know that my time is so short (because I have a family) that if I can even do a project then I'm almost certainly not going to document it because getting it done will be enough of a stretch for me, and if I need to come back and re-do it again, I am probably not going to even bother. Not all of us live in mom's basement and have the luxury of extra time.

[+] Animats|11 months ago|reply
The actual scanners: [1]

Max range 12 meters. That's when it seems to start to get expensive. The light source, filters, and sensors all have to get better.

Good enough for most small robots. Maybe good enough for the minor sensors on self-driving cars, the ones that cover the vehicle perimeter so kids and dogs are reliably sensed. The big long-range LIDAR up top is still hard.

[1] https://www.ldrobot.com/

[+] gmueckl|11 months ago|reply
I'd like to know where this price jump really comes from. Google doesn't help me. My first guess is that laser safety becomes an active control process at this point - laser scanner mirror needs to keep moving to not be able to deposit a damaging amount of energy onto a human retina. So you need a safety critical control system to constantly monitor mirror speed and and position and shut down the laser when it becomes too slow. How wrong am I?
[+] beachy|11 months ago|reply
There's a lot of stuff that was better in the "good old days".

But to be alive when it's possible for gifted individuals to create technology like this is just incredible.

[+] amelius|11 months ago|reply
Somewhat related. I'm looking for a cheap way to measure distances to approx 10 microns accuracy, over distances on the order of 300mm. Any ideas?
[+] perlgeek|11 months ago|reply
That sounds like it could be in the range of a digital read-out (dro) as they are used for milling machines and lathes. my mechanics had video just the other day about replacing one, and the old one had 5 microns accuracy.

Not sure how must they cost though.

[+] bobmcnamara|11 months ago|reply
Does the interval you're measuring move around much?

Can the measurement system touch or be affixed to it?

Sounds like a pair of nice calipers might work. So depending on your precision needs, you might get away with the same approach: sliding grid of capacitive cells that slide over the measurement cells. Microcontroller measures them as it slides through. Atan2() for the final result. The meter only part of this is called a DRO(Digital ReadOut)

[+] Joel_Mckay|11 months ago|reply
We had a similar issue at one point, and had to build something custom that cost way more than I'd like to admit. Thus, I would recommend just looking at DRO kits for CNC milling machines.

If your project is not budget constrained, than there are complete closed-loop stage solutions around:

https://www.pi-usa.us/en/

https://xeryon.com

Best of luck, and prepare yourself for sticker shock... lol =3

[+] aeonik|11 months ago|reply
I have some design ideas for a diy system, how much money/time are you willing to spend for experimentation?

What counts as cheap to you?

I'm thinking about automating something a long these lines:

https://youtu.be/hnHjrz_inQU?si=dNzXVBVFsr7e8m_6

Off the shelf lasers and camera sensors can be hacked around with DIY for some pretty unexpected precision.

[+] dheera|11 months ago|reply
OCT.
[+] politelemon|11 months ago|reply
The sketchfab examples are fantastic, to be able to move around in a 3D space, like it's some kind of scifi simulation.

The mouse controls are confusing the heck out of me. It shows a 'grab' icon but nothing about it grabs as the movement direction is the opposite, feels completely unnatural.

[+] mannyv|11 months ago|reply
You could probably harvest these from robot vacuums on ebay/goodwill.
[+] mannyv|11 months ago|reply
These = lidar sensors
[+] joeevans1000|11 months ago|reply
This is amazing! Thank you!

It may be in the project as I just scanned through i (but will read through it properly soon), but do you have any of the data for accuracy? Say, over 10M (Or less, if this lidar doesn't work at that distance).

I'm familiar with the FARO scanners which have a different type of mechanism. Their accuracy is good enough for building things.

I've discovered there's several markets for scanners… among those are people who need accuracy and people who are creating content for media like games.

Thank you so much for sharing this project. It's truly unbelievable.

[+] heljara|11 months ago|reply
I've been toying with photogrammetry a little bit lately, specifically for scanning indoor rooms and spaces. So far I'm finding metashape the most suitable for it, but some of the precision isn't great (but I'm still improving my technique). I mostly want to convert the interior of one real building into a digital model for preservation and analysis. I've briefly considered LIDAR, but put it in the too hard/expensive bucket. This project seems to challenge that assumption.

What does the software post-processing look like for this? Can I get a point cloud that I can then merge with other data (like DSLR photographs for texturing)?

I see in their second image[1] some of the wall is not scanned as it was blocked by a hanging lamp, and possibly the LIDAR could not see over the top of the couch either. Can I merge two (or more) point clouds to see around objects and corners? Will software be able to self-align common walls/points to identify its in the same physical room, or will that require some jiggery-pokery? Is there a LIDAR equivalent of coded targets or ARTags[0]? Would this scale to multiple rooms?

Is this even worth considering, or will it be more hassle than its worth compared to well-done photogrammetry?

(Apologies for the peak-of-mount-stupid questions, I don't know what I don't know)

0: https://en.wikipedia.org/wiki/ARTag 1: https://github.com/PiLiDAR/PiLiDAR/raw/main/images/interior....

[+] rsp1984|11 months ago|reply
Shameless plug, but if you own an iPhone pro or iPad Pro (which have Lidar integrated), you should give Dot3D a try. It does everything you describe and we made it very easy to use.
[+] badmonster|11 months ago|reply
Hi! Thanks for sharing this amazing work. I’m curious about the scalability and performance of PiLiDAR when deployed on large-scale outdoor datasets. Have you benchmarked it on datasets like SemanticKITTI or nuScenes? If so, could you share any insights on runtime, memory usage, and how well it generalizes beyond the indoor scenes used in your paper?
[+] nisa|11 months ago|reply
I think you (or me, please correct me if that's the case) misunderstood something here - this is a diy lidar scanner for data acquisition - these datasets are mostly created using rgba cameras and the point clouds are later created with some post processing step.

So it's not a model for processing data but rather a hardware hack for having a real lidar - as in real depth data.

You can throw anything you like on it.

[+] donatj|11 months ago|reply
Oh hey! This is exactly what I was looking for just a couple weeks ago! I've had parts to prototype something roughly equivalent to this sitting in my cart on Amazon for a couple weeks now, but I've been very uncertain on my choice of actual lidar scanner.

I'll have to look into this as a starting point I get back from Easter vacation

[+] itissid|11 months ago|reply
For home improvement projects, This could be quite useful for generating point cloud map of places hard to get to. Like I have drywall installations I would love to get behind and check how things look, this would be great for that.
[+] chneu|11 months ago|reply
This is a very legit and good idea. A simple stud-finder like tool to map out behind walls would be incredibly useful for folks who run cabling or whatnot.
[+] joeevans1000|11 months ago|reply
I noticed that you can't use it commercially without contributing. How much do you have to contribute for that and where would someone do it?
[+] Aspos|11 months ago|reply
GY-521 in particular and MPU6050 in general make quite poor IMUs. Why do you use them? And what for in this particular case? What do they do in this set up?
[+] HALtheWise|11 months ago|reply
Do you have other sensors in the same price range that you'd recommend instead for most uses? How much accuracy improvement would you expect?
[+] Havoc|11 months ago|reply
How safe are these sorts of sensors for eyes?
[+] frainfreeze|11 months ago|reply
I'm wondering the same. There are many reports of lidars damaging camera sensors.
[+] mannyv|11 months ago|reply
How do you make it so your LIDAR doesn't interfere with someone else's LIDAR?
[+] IshKebab|11 months ago|reply
I think it's unlikely because both lidars have to be pointing at exactly the same place at exactly the same time and using the same frequency. Not impossible but probably not big deal.
[+] frainfreeze|11 months ago|reply
Multi path errors are rare, and if it happens there are mitigation techniques.
[+] dheera|11 months ago|reply
It's not obvious what the heck this is without reading into it. A full 4pi steradian scanner? a 360 degree 1 channel LIDAR? A fisheye camera plus some single channel LIDAR plus monocular depth estimation networks to cover everything not in the plane of the lidar?

It would be great to clarify what it is in the first sentence.

[+] HALtheWise|11 months ago|reply
I believe it's a 360deg planar lidar mounted on a vertical plane, with a motor to rotate it around and slowly cover a full 4pi sphere. There's also a fisheye camera integrated in. This is a pretty common setup for scanning stationary spaces (usually tripod mounted)
[+] geor9e|11 months ago|reply
its a fisheye camera plus single-channel LiDAR
[+] wkat4242|11 months ago|reply
Wow. Lidars have become so good. This is amazing. I had no idea
[+] Liftyee|11 months ago|reply
It's impressive that the cost of usable LIDAR tech is well within the reach of personal projects now. The sensors used on the first self-driving cars (from companies like SICK, etc.) likely perform much better but the price point of multiple k$ is not really viable for experimentation at home.

Not to make everything political, but I wonder how the US tariffs will affect electronics-adjacent hobbies. Anecdotally, the flashlight community on Reddit has been panicking a little about this.

[+] pogue|11 months ago|reply
I'm sure most electronic hobby projects are going to be financially out of reach for many people for awhile at least. Many people who run businesses that are running small homebrew projects are struggling, too [1]. But it can be extremely hard to tell what might happen with a POTUS who seems to change his mind on what tariffs should be implemented on a whim with zero thought process put into it, no prior notice when they're going to be implemented or removed and then implemented again times 500% or whatever.

I know the Hong Kong post also recently blocked outbound packages entirely sent to the US [2], so I don't know how that's impacting shipments of tech like this & etc byt would be curious to know.

[1] Arduboy creator says his tiny Game Boy won’t survive Trump’s tariffs https://www.theverge.com/news/645555/arduboy-victim-trump-ta...

[2] Hong Kong suspends package postal service to the US after Trump’s tariff hikes https://www.cnn.com/2025/04/15/business/hong-kong-suspends-p...

[+] LM358|11 months ago|reply
Never mind hobbyists - I work in electronics R&D and my two favorite suppliers are US based even though I am not. Anxious to see how this plays out and that's not even considering our production departments.
[+] minimalist|11 months ago|reply
> Not to make everything political... [proceeds to make a political statement]

For what it's worth, this type of Lidar scanner was possible to make well over a decade ago with ROS1, a Phidgets IMU, a webcam, and a lidar pulled out of a Neato vacuum (the cheapest option at the time). This would be around the difficulty of a course project for an undergraduate robotics class and could be done with less than 200 USD of salvaged parts (not including the computer). Hugin was also around over a decade ago.

It's still a nice little project!

[+] moffkalast|11 months ago|reply
It's true, a Hokuyo or a Sick that sold for several thousands a decade ago is laughably bad compared to something under $100 from Shenzhen these days. When there's a need there's a way, I guess.

I hope they decide to develop some disruptive stereo/structured light/tof cameras eventually too, those are still mostly overpriced and kinda crap overall.

[+] _blk|11 months ago|reply
Short term there's some suffering but while hobbyists are definitely more price sensitive, they are also the most flexible ones. In production you don't just need one piece, you need a steady supply and any change of components affects the whole product.

How China/US interact will determine the longer term future of that economic relationship but many companies are already adjusting because he future is currently uncertain. With the free trade agreement with the EU and more producers moving to the US I think that it's been a good disruption even if I'm now also scrambling to find alternative PCB manufacturers.