# MAS.865.24 How to Make Something that Makes (almost) Anything ## Laser Displacement Sensor via Triangulation [Keyence](https://www.keyence.com/products/measure/laser-1d/lk-g3000/models/lk-g152/) and [Micro-Epsilon](https://www.micro-epsilon.com/distance-sensors/laser-sensors/) sell laser displacement sensors with high sampling rate (>1 kHz), micron resolution, significant travel, but at an incredible cost at least 1k USD or more. These make for fantastic non-contact sensors for rapid monitoring or for active feedback. If only they weren't so gosh darn expensive. ### How do they work? Surprisingly, these sensors don't use any fancy light trickery. It's basically just trigonometry. ![https://www.researchgate.net/publication/281744073_Three-Dimensional_Measurements_of_Bodies_in_Motion_Based_on_Multiple-_Laser-Plane_Triangulation](laser-triangulation.png) Figure from Poredoš et al. (2015). *Three-Dimensional Measurements of Bodies in Motion Based on Multiple- Laser-Plane Triangulation*. Measure $\Delta v$ with a linear image sensor (traditionally CCD now mostly CMOS) and try to predict $\Delta z$, the displacement. The angle $\alpha$ is determined by the construction of the sensor. The important relation is $$\Delta v = m \sin \alpha \Delta z $$ where $m$ is the magnification. Due to constraints in measuring range and shadowing effects usually force you to pick $m<0.1$ and $ \alpha < 30^\circ $ The laser itself appears to be fairly benign. The Keyence LK-G152 uses a 655 nm red semiconductor laser with a 0.95 mW power output. It's laser class is Class II (FDA CDRH 21CFR PART1040.10) whatever that means. To get the high sampling rate, the linear image sensor is probably required. Otherwise it'd take too long to read out all the pixel values on a normal CMOS image sensor. To get the exquisite accuracy, you probably need to oversample and average. This is a [common trick used in ADCs](https://www.silabs.com/documents/public/application-notes/an118.pdf) to get more bits of resolution. It has the added benefit of reducing the noise floor. For an example, see Lab 3 of [2.737](https://ocw.mit.edu/courses/2-737-mechatronics-fall-2014/) that uses oversampling and averaging on a strain gauge electronic scale. This probably means an FPGA is needed to interface with the linear image sensor. ### Some Datasheet and Numbers Let's take a look at this [Toshiba linear image sensor](https://www.digikey.com/en/products/detail/toshiba-semiconductor-and-storage/TCD1304DG-8Z-K/16572684) you can buy from Digikey (there's only five left in stock!). It's CCD and has 3648 pixels on a 200 micron sensor. The image sensing elements on PN photodiodes. The data rate is 500 kHz. ### DIY Solutions There don't appear to be many attempts to make homebrew laser triangulation sensors, but there a few folks interested in taking medium format pictures using basically a scanner. Here are a few promising links. - [Linear Image CCD from Hackaday](https://hackaday.com/tag/linear-ccd/) - [Scanning back camera](https://hackaday.com/2019/05/30/linear-ccds-make-for-better-cameras/) Some more useful links for CCD Linear Image Sensors: - https://tcd1304.wordpress.com/ - https://curiousscientist.tech/blog/tcd1304-introduction - [Ebay Spectroscopy Linear Image Sensor](https://www.ebay.com/itm/404664974067?chn=ps&norover=1&mkevt=1&mkrid=711-170536-586452-3&mkcid=2&mkscid=101&itemid=404664974067&targetid=2269750896142&device=c&mktype=pla&googleloc=9002000&poi=&campaignid=20944690956&mkgroupid=160839912874&rlsatarget=pla-2269750896142&abcId=9369827&merchantid=697242162&geoid=9002000&gad_source=1&gclid=Cj0KCQjwn7mwBhCiARIsAGoxjaKFWKzNoc9k1r04ZLEX5ub97ENXT2AN68yuXJHTAA6Rg5UEEEL8DTYaAoFUEALw_wcB) - [TD1304 Datasheet](https://toshiba.semicon-storage.com/info/TCD1304DG_Web_Datasheet_en_20190108.pdf?did=13709&prodName=TCD1304DG) - [DIY Spectroscopy Blog](https://erossel.wordpress.com/) - [More DIY Spectroscopy](https://community.element14.com/challenges-projects/project14/sensors/b/blog/posts/spectrography-using-the-epc901-high-speed-line-image-sensor) - [Third Party Website for TD1304 breakouts](https://www.eureca.de/32-1-Toshiba.html) ![is that a hamster?](zeilen-paul.jpg)