Build a 30$ Laser Scanner
by:Tuowei
2019-09-09
Profile if you already have a USB webcam, this Instructure will guide you to build a 3D scanner for less than $30 or even $12.
Seeing the price tag and limitations of the commercial scanner, I decided to challenge myself and build my own scanner.
It must be cheaper and easier for anyone to make one using a 3D printer.
The result \"Sardauscan\" is a laser scanner that is comparable to other professional laser scanners, but less than 20-
The price is 30 times, twice the number of lasers.
My design principles are: Keep it simple, keep it low cost, keep it evolving and provide a complete solution. Scanner is fully open source and open hardware: \"Sardauscan\" software written in C-
The complete source code is available.
You can write plug-ins for your own hardware or tasks.
The software allows you to scan, smooth, build and export grids to various formats.
How does it work?
The principle of 3D laser scanner is very simple.
Take photos of the object without any laser emission. One laser is turned on and another image is taken. Calculate the difference between the two images, the laser trajectory (
Outline of object)
By understanding the position of the camera and the laser, you can deduce the 3D coordinates of all the points on the profile, you do this for all the lasers, turn the table, repeat the process, until the table is completely changed, you go and represent the complete point cloud of the object.
Here is a list of all the parts needed to build the scanner: a bunch of M3 (16 and 20 mm)
A bunch of M4 (12 and 20 mm)
Arduino nano 1x (
Chinese copy of $4)
1x China stepping motor (28BYJ-48)
And Controller (ULN2003)(5$)· 1-
4 X line laser 5 v ($2. 5$ piece)
1x heckule HD distortion ($15)
20x20 configuration file (
Can print: There are a lot of STLs online)
Optional 3x 4mm roller ($0. 3 piece)(
624 bearingsTotal: from $26. 5 (1 laser)to $35 (4 lasers)
About 2020 long: it doesn\'t matter.
The only limit is for the camera to see the entire table.
For example, here is the length I used to build: 2x140mm 1x120mm 1x250 the contents of the printed STL file can be found on Thingiverse: 1 x arm_left. stl· 1x box.
Stl 1x box _ door
1x stl box_arduino_clamp.
Stl 1x arm_right. stl· 1x CORNER.
Stl 1x MOTOR_MOUNT.
Stl · month x laser_holder.
Stl 1X camera_holder _ lower_part.
1x stl camera_holder _ upper_part.
Stl 1x center _ axe_minimal.
Stl or 1x table_axle. stl (OPTIONAL)
3x roller_basev2.
Stl can print 12x m4_tslot _ nut.
Stl if you use a profile of 20x20 and you don\'t have any notes: the profile of 2020 is here just for ease of use.
You can use anything you have: wood, metal ,. . . . . . If you want to use another camera, you need to adjust the \"camera holder\" to match it. The bearing is optional.
They are only necessary if you want to scan heavy objects or do not have a perfect flat table. The build is simple, just look at the picture.
You can\'t do it wrong, put the motor in the center, put the 3 profiles around and screw them on.
Put the corners, screws, arms, screws . . . . . . There is a hole in each screw and you will not get it wrong.
Please refer to the wiring diagram.
At this point, all it takes to complete the hardware part is to upload the firmware to the Arduino.
You need an Arduino IDE or other sketch editor. The firmware (
General Sketch of Arduino)
You will also need to install the AccelStepper library to compile it: Edit the configuration.
Match your line.
Upload to the hardware ready ArduinoNow, test it!
Connect to Arduino with IDE type \"Sardauscan\"-Arduino should answer \"yes\" and try to step: type \"t r 100\"-your table should turn 100 steps. First try laser: type \"L 0 1 \"(0)laser to fire (1)
-If something doesn\'t work, the first laser should light up and check your line and configuration.
It should be a match.
To install the Sardauscan software, visit github (see link above)
Download the latest binary version.
Extract and start the executable.
In the main interface you will see 3 red icons-one for the table, one for the laser and one for the camera.
Click them to connect to the hardware (
Right-click disconnect).
If the standard Sardauscan firmware is used, the table and the laser switch are linked.
Now that the hardware is ready and the software is already connected to the hardware, here\'s the tricky part: calibration.
Calibration takes 3 steps: manual calibration, build size, \"adjust\" correction. Be careful during calibration: the quality of the result depends directly on it.
To calibrate: click the target icon and the physical button.
Move the camera so that the vertical in the preview window passes through the exact center of the table.
· Click the form center in the preview window.
These lines will help you align the calibration object.
Place calibration objects (
Look at Thingiverse STL)
Flat area facing the camera on the table-use horizontal lines for help.
Click on the first laser icon at the top to light up the first laser.
Align the laser line with the vertical line in the preview window.
Repeat all your lasers.
Build dimension: click the build dimension button to enter the build dimension.
Adjustment: since it is difficult to achieve perfect calibration, especially in the case of a large number of lasers, the correction steps will help to correct previous errors.
Place the calibration object in the center of the table and click quick scan \".
After the scan is done, you will see the top view of it.
Each color corresponds to a different laser.
The goal is to superimpose different laser scans as much as possible: Select the laser in the combo box and rotate (
Left mouse button), scale (
Middle mouse button)and pan (
Right mouse button)the scan.
Congrats, the calibration is complete!
Software is designed around tasks and processes.
When you open the program, you will see the list of available tasks on the left-you can drag them into the list of processes on the right and press the play icon at the bottom. Here is a non-
Detailed list of available tasks: scanning objects to grab pictures: taking photos of objects for photographic measuring procedures filtering IQR: removing noise from data using a four-digit range filter • Median filter: remove noise from data using median filter · angle: merge laser scan by angle-smooth scan and filter noise Beisel curve: smooth data by fitting Beisel curve surface: smoothing data with a la\'s surface saves PLY files to be used with MeshLab or any other point cloud software · save stl: the save software is not linked to an STL file built by Sardauscan-it was built for evolution.
You can do whatever you want with the plugin.
Do you have a magic algorithm?
Make a plugin for it!
Do you have custom image acquisition hardware? Do a plugin !
Do you want to use your own hardware firmware for a table or laser? Do a plugin !
You can take a look at github\'s repository with examples of plugins.
The code is really simple.
To use a plugin, just copy it in the plugin subdirectory. Happy scan!
Seeing the price tag and limitations of the commercial scanner, I decided to challenge myself and build my own scanner.
It must be cheaper and easier for anyone to make one using a 3D printer.
The result \"Sardauscan\" is a laser scanner that is comparable to other professional laser scanners, but less than 20-
The price is 30 times, twice the number of lasers.
My design principles are: Keep it simple, keep it low cost, keep it evolving and provide a complete solution. Scanner is fully open source and open hardware: \"Sardauscan\" software written in C-
The complete source code is available.
You can write plug-ins for your own hardware or tasks.
The software allows you to scan, smooth, build and export grids to various formats.
How does it work?
The principle of 3D laser scanner is very simple.
Take photos of the object without any laser emission. One laser is turned on and another image is taken. Calculate the difference between the two images, the laser trajectory (
Outline of object)
By understanding the position of the camera and the laser, you can deduce the 3D coordinates of all the points on the profile, you do this for all the lasers, turn the table, repeat the process, until the table is completely changed, you go and represent the complete point cloud of the object.
Here is a list of all the parts needed to build the scanner: a bunch of M3 (16 and 20 mm)
A bunch of M4 (12 and 20 mm)
Arduino nano 1x (
Chinese copy of $4)
1x China stepping motor (28BYJ-48)
And Controller (ULN2003)(5$)· 1-
4 X line laser 5 v ($2. 5$ piece)
1x heckule HD distortion ($15)
20x20 configuration file (
Can print: There are a lot of STLs online)
Optional 3x 4mm roller ($0. 3 piece)(
624 bearingsTotal: from $26. 5 (1 laser)to $35 (4 lasers)
About 2020 long: it doesn\'t matter.
The only limit is for the camera to see the entire table.
For example, here is the length I used to build: 2x140mm 1x120mm 1x250 the contents of the printed STL file can be found on Thingiverse: 1 x arm_left. stl· 1x box.
Stl 1x box _ door
1x stl box_arduino_clamp.
Stl 1x arm_right. stl· 1x CORNER.
Stl 1x MOTOR_MOUNT.
Stl · month x laser_holder.
Stl 1X camera_holder _ lower_part.
1x stl camera_holder _ upper_part.
Stl 1x center _ axe_minimal.
Stl or 1x table_axle. stl (OPTIONAL)
3x roller_basev2.
Stl can print 12x m4_tslot _ nut.
Stl if you use a profile of 20x20 and you don\'t have any notes: the profile of 2020 is here just for ease of use.
You can use anything you have: wood, metal ,. . . . . . If you want to use another camera, you need to adjust the \"camera holder\" to match it. The bearing is optional.
They are only necessary if you want to scan heavy objects or do not have a perfect flat table. The build is simple, just look at the picture.
You can\'t do it wrong, put the motor in the center, put the 3 profiles around and screw them on.
Put the corners, screws, arms, screws . . . . . . There is a hole in each screw and you will not get it wrong.
Please refer to the wiring diagram.
At this point, all it takes to complete the hardware part is to upload the firmware to the Arduino.
You need an Arduino IDE or other sketch editor. The firmware (
General Sketch of Arduino)
You will also need to install the AccelStepper library to compile it: Edit the configuration.
Match your line.
Upload to the hardware ready ArduinoNow, test it!
Connect to Arduino with IDE type \"Sardauscan\"-Arduino should answer \"yes\" and try to step: type \"t r 100\"-your table should turn 100 steps. First try laser: type \"L 0 1 \"(0)laser to fire (1)
-If something doesn\'t work, the first laser should light up and check your line and configuration.
It should be a match.
To install the Sardauscan software, visit github (see link above)
Download the latest binary version.
Extract and start the executable.
In the main interface you will see 3 red icons-one for the table, one for the laser and one for the camera.
Click them to connect to the hardware (
Right-click disconnect).
If the standard Sardauscan firmware is used, the table and the laser switch are linked.
Now that the hardware is ready and the software is already connected to the hardware, here\'s the tricky part: calibration.
Calibration takes 3 steps: manual calibration, build size, \"adjust\" correction. Be careful during calibration: the quality of the result depends directly on it.
To calibrate: click the target icon and the physical button.
Move the camera so that the vertical in the preview window passes through the exact center of the table.
· Click the form center in the preview window.
These lines will help you align the calibration object.
Place calibration objects (
Look at Thingiverse STL)
Flat area facing the camera on the table-use horizontal lines for help.
Click on the first laser icon at the top to light up the first laser.
Align the laser line with the vertical line in the preview window.
Repeat all your lasers.
Build dimension: click the build dimension button to enter the build dimension.
Adjustment: since it is difficult to achieve perfect calibration, especially in the case of a large number of lasers, the correction steps will help to correct previous errors.
Place the calibration object in the center of the table and click quick scan \".
After the scan is done, you will see the top view of it.
Each color corresponds to a different laser.
The goal is to superimpose different laser scans as much as possible: Select the laser in the combo box and rotate (
Left mouse button), scale (
Middle mouse button)and pan (
Right mouse button)the scan.
Congrats, the calibration is complete!
Software is designed around tasks and processes.
When you open the program, you will see the list of available tasks on the left-you can drag them into the list of processes on the right and press the play icon at the bottom. Here is a non-
Detailed list of available tasks: scanning objects to grab pictures: taking photos of objects for photographic measuring procedures filtering IQR: removing noise from data using a four-digit range filter • Median filter: remove noise from data using median filter · angle: merge laser scan by angle-smooth scan and filter noise Beisel curve: smooth data by fitting Beisel curve surface: smoothing data with a la\'s surface saves PLY files to be used with MeshLab or any other point cloud software · save stl: the save software is not linked to an STL file built by Sardauscan-it was built for evolution.
You can do whatever you want with the plugin.
Do you have a magic algorithm?
Make a plugin for it!
Do you have custom image acquisition hardware? Do a plugin !
Do you want to use your own hardware firmware for a table or laser? Do a plugin !
You can take a look at github\'s repository with examples of plugins.
The code is really simple.
To use a plugin, just copy it in the plugin subdirectory. Happy scan!
Custom message