In Soviet Russia, DIY Laser Rangefinder Scan YOU!!

Yakov Smirnoff used to say, “In America, you can always find a party. In Soviet Russia, Party finds YOU!!” Only here, it’s a laser rangefinder.

In this project (automatic translation), [iliasam] makes his own scanning laser rangefinder, like the ones that we’ve seen in fancy vacuum cleaners. But he does it from scratch.

While this sort of thing is easy if you have a webcam and a ton of processing power to throw at it, [iliasam] takes the hard way out — measuring the parallax of the reflected spot through a lens on a linear image sensor (which renders as “photodetector line” in translated Russian).

Linear image sensors are a lot like the elements in your CMOS digital camera, with the exception that the elements are arranged in a line instead of a plane, and they’re a lot easier to interface with a microcontroller. Hold a data line high to take an exposure, and then clock out the (analog) voltage values that correspond to the amount of light that hit each cell in the line array. While [iliasam] paid an estimated $18 for his, we’ve found them much cheaper on eBay. And there’s usually a linear sensor, often RGB and complete with driver circuitry, in a scanner if you take one apart. This could be done for just a few bucks if you were thrifty.

The rest of the build consists of some signal conditioning and (very nicely done) hardware construction. [iliasam] mounted the scanner on top of a Roomba and set it off to explore his apartment. The results are quite professional, which you can see for yourself in the videos below.

We’ve covered the commercial version of this same device that can be found in Neato vacuums. But building one from scratch takes the game to another level.

With a linear sensor and laser like this? Or a time-of-flight type thing?

BTW I’m still amazed time-of-flight LIDAR works, that you can measure light travelling at the speed of flipping light, accurately enough to resolve down to such small distances. Anyone want to tell me how fast that is? Or else I’ll look up C in metres per second myself and reciprocate it into a frequency, just to figure out how fast a counter has to run to get a particular spatial resolution. But someone could just tell me, how many counts per second for, say, 1cm resolution.

But this is nice because it can give continuous results, and probably does better at ignoring noise than a LIDAR would. A nice narrow-band colour filter might well help, if it’s necessary. And you could take measurements from the array with the laser turned off and on, to subtract one from the other.

Least I think that should all work, I’m just going from basic theory.

I wonder if there’s any use you can get from the colour RGB sensing on one from a scanner? I heard of some scanners using monochrome, but using R, G, B LEDs to illuminate the document being scanned. They use monochrome sensors, with the advantage of 3x the resolution from the same sensor. I dunno but I would imagine removing an RGB filter from a sensor bar would be difficult, they’re gonna be tightly integrated into there.

Are there any camera-based scanners yet? Would seem sensible, now camera chips have such high res. Would need a bigger case though, or some funky lenses.

Actually, you can do this in numerous ways. One method is to send a laser pulse to the target. The reflection is received using an IR photo PIN diode which sends a small current proportional to the IR pulse. This is then converted using to a voltage with a Transimpance Amplifier (TIA), which can be used to charge a capacitor. The distance is inversely proportional to the voltage on the capacitor. Most often, it is best to accumulate charges then divide by the number of pulses to get best accuracy. The challenge with this model is sunlight (which has a lot of IR), reflections, off angle targets, and so on. This can be partially overcome with a high power laser, but then the cost goes way up and …….there’s eye safety issues.

regarding your description of charging a capacitor, your explanation seems confusing: does it rely on iintensity of light dropping of at a distance, assuming reflection is a point source? Normally a TDC is used, requiring a start and stop pulse: the capacitor starts charging at a constant current, and the reflection pulse stops the charging, then the time to discharge the capacitor to some level is measured in counts.

Another way is to use heterodyning (modulating the laser intensity with a high frequency, and then mixing the received high frequency photodiode signal to an intermediate frequency. this way the phase angle can be extracted.

Another similar method would be a frequency chirp used to both drive the laser and demodulate the PD signal, then frequencies in the resulting signal can be interpreted as distances…

Regarding IR a narrow bandpass filter for laser line should eliminate most IR…

“EDIT” : I just realized you meant IR would be a problem for the model described in the HaD post…

This is waht (expensive) laser scanners do. The cheaper depth-camera sensors, like the Kinect 2 use the phase of the returning light. They compare the phase of the (amplitude-modulated) light sent by the cameras light source to the phase of the returning light per pixel.
These cameras can be quite ambient light resistant and even work in bright daylight, e.g. in automotive applications.
See http://www.melexis.com/General/General/MLX75023-832.aspx

Greenaum – I think it’s amazing too. I already have a professional one gathering dust in my hoard. Not LIDAR but is a IR Laser Range FInder nonetheless. Don’t have an application for it yet. I wanted to do something with all of my hoard of dead battery iRobots too and a DIY LIDAR sounds cool. However, I suspect he’s not doing ToF laser measurements. The diagram suggests that the ‘angle of the dangle’ is being computed (theta in right triangle). It looks like a simple trig function or something. Somehow I think he is figuring out where on a vertical line across the webcam’s CCD corresponds to the theta angle of the return beam. I think if you have a baseline (known distance between the webcam and laser transmitter) and one theta angle you can compute side D (distance to target). D = (targetHeightInches * ImageWidthPixels) / (2 * targetHeightPixels * tan(cameraHorizontalAngle/2) – Source: Doron Sivan at Hakfar Hayarok Univ – Israel

You’ve all said it — we’ve also said it — we could maybe use an upvote/downvote system. (Although by Internet standards, we’re actually all fairly well-behaved for a totally open, no-moderation community.)

I _still_ think that you could do it with a line sensor, if slowed down, and the right optics. But until I get of my butt and prove it, I defer to those who’ve built one of these systems.

From what I’ve read the scanner is either too slow, extremely low resolution, or the rig would take up a lot of space. You could get it to work but the Roomba or whatever wouldn’t be moving very fast!
I’v
e never tried it but it may be one of my first Arduino attempts. I want to make a simple rangefinder; just one point to detect, not scanning a whole room.

For the record I usually assume a question is just a question, just so you know. I don’t know if I missed something, but your questions have never appeared to be anything but honest. :)

notarealemail – “Tell me it ain’t so Joe!” :-D Come on “Dad” who would have the utter temerity to insult you? I agree with you about Yakov. His old Soviet Union material is coming back again. That’s if you’re familiar with current events in the news about his native country. The “Grey Cardinal” is at it again! (wink-wink) And after January 2017 I’m pretty sure Mr. Pokhis (aka Smirnoff) will have PLENTY of material!

How does the OP spin the LIDAR turret 360° without wires? Is he using a bushing brush system? Or maybe just a mirror reflecting into a stationary CCD? Man wouldn’t that complicate the angle of the dangle with lasers? Awesome posting Elliot! I am thoroughly baffled! But as my Dad (i.e. notarealemail) will tell you “that ain’t too hard!” :-D

The guy states the lidars start at $1000 or some chineese crap from $400. Neato lidar modules are availiable on ebay or amazon from $80…120 so they are not that expeinsive (anymore?). I get it that being $80 is still twice as expensive and some people do theese builds just for proving they can.
Cool hack anyways.

The $1000 are commercial rangefinders meant for robotics using e.g. phase comparison or time of flight (essentially the same method as some 3D/depth cameras, like the Intel RealSense). Not the Neato scanner which uses triangulation. He never said that the Neato scanner is $1000 – he says that the Neato can be had for hobbyists for about $100 or the RPLidar complete product (i.e. not a spare part requiring but something ready to be used) for about $400.

i have read the original article, even though I spoke Russian the last time maybe 20 years ago. Interesting design, it illustrates well the DIY mentality of us “Easterners” – it used to be that if we wanted to have something, we had to be resourceful and hack it together ourselves, because a ready-made product simply wasn’t available. People were building computers, radios, even TVs and tape recorders … (!)

To people who are saying that this can be built for a few bucks using a scrap CCD from a scanner – no, it can’t. He actually talks about exactly that in the article. Scanner CCDs are generally too long, not useful for a spinning LIDAR/range finder unless you want to have something the size of a table. Also good luck finding a lens that will work. Then there are issues with finding a datasheet for your part, unless you get extremely lucky, it is next to impossible, because those scanners are literally disposables.

He has tried to use CCDs from barcode scanners, but even though those would fit geometrically, they are very low resolution – the one he originally used has only 128 pixels. That is good enough for a proof of concept, but little else – way too low resolution for a practical use.

Finally he had to use the Panavision ELIS-1024 sensor – likely the same one as the Neato LIDAR uses.

So all in all, he ends up with what is essentially a clone of the Neato LIDAR, with the BOM cost of around $50, with the real costs having been much higher, because of all the R&D costs on top. If you want to use this as a way to save cost over the Neato, which can be had for around $100 on eBay as a spare part, it obviously doesn’t make sense.

Very cool build, I’ve been inspired by it. Though my project will not be even close to the build. Thank you for your hard work, I learned a lot and gained some ideas from it! Keep hacking, I’ll be watching!

Yes you should post to hackaday.io under Citizen Scientist. This could be used to go into Fukushima or Chernobyl to LIDAR the dangerous interiors or something. Show us how to use the iRobot ROOMBA too. However, due to old floor debris, over-growth of weeds, and other physical obstacles a quadcopter drone would probably be better.

Well, Fine, Russia is a mess. But still, such titles should be imposed by the author. Or, HAD should continue in the same fashion with western born articles, I.e. “in the rotten west FAA enforces drone registration”

flegmatoid – In defense of Elliot Williams’ title (the OP), he wasn’t being political or anti-Russian. He was just using the comedy of an American-Ukrainian actor comedian Yakov Naumovich Pokhis (a/k/a Yakov Smirnoff). He is pretty funny over here in USA. He used to use Russian-Reversals which during the Cold War we Americans thought was hugely funny. Elliot was just being “retro” which is a thing here at HaD. Yes we know we have problems here in USA too. Like Chernobyl, we had Three-Mile Island and Diablo Canyon. In recent news we have other social problems too.

So in summary: we should all just lighten up and enjoy the humor of the moment. We’ll all be a happier bunch of geeks if we get rid of the ego and just enjoy the technology and any incidental humor that is accidentally uncovered.

Are these titles supposed to be funny, or insulting, or sly, or is this just a fundamental misunderstanding that USSR doesn’t exist as of 1991?
(I’m referring to another similar title here: “In Soviet Russia, Drink Serves You”)

“USSR doesn’t exist as of 1991” – so you say! I guess you haven’t been monitoring the news lately. What was old is new again. Thanks to Mr. Putin and his cohort Mr. Vladislav Surkov. Elliot’s title is just an apropos parsing of an American-Ukrainian actor comedian Yakov Naumovich Pokhis (aka Yakov Smirnoff). Yakov will soon have all new material after our POTUS change-over in 2017. They have already been hacking both candidates’ websites for cyber-data-mining purposes. They (i.e. S.V.R.) needs new material like Yakov too I guess… :-DWashington Post article (14-Jun-2016) http://tinyurl.com/jbbmqkm

yes, Russia is a mess, but don’t you think only the author could impose such level of irony into the tilte? Otherwise, its nothing but a slap into his cheek with the rest of the world laughing into his face.
Or….HAD could keep the similar fashion for US-based articles too, i.e. “in the rotten west GREMLINS ARE AIR TO AIR DRONES”
ps: I’m EU resident, not russian.