How To Make A 3d Scanner | Diy 3d Scanner (arduino, 3d Printing, Pcb Design, Stepper Motors, Ir Sensing) – Super Make Something

Super Make Something

Subscribe Here

Likes

14,807

Views

787,611

Diy 3d Scanner (arduino, 3d Printing, Pcb Design, Stepper Motors, Ir Sensing) - Super Make Something

Transcript:

Hi. I’m Alex and welcome to Super Make something the show where I make something cool and show you how to make it too today. We’re building this 3d scanner that you can use to digitize and clone objects around your house. Let’s get started. The 3d scanner is made of the following components, a scanner base, Two Stepper Motors plates to attach the Stepper Motors to the base, a shaft coupler, a piece of threaded rod to guide shafts, a carriage with associated hardware to attach to the base into one of the Stepper Motors, an IR sensor, a constraining plate to keep the guide shafts parallel a turntable to rotate objects as they are being scanned and custom electronics to rotate the Motors 3 the IR sensor and save Scan values. I decided to begin with the electronics. The electronics of this project are designed around the Arduino pro micro. The pro micro is a smaller wheel variant with an on-board. USB Connector, which is used to program the microcontroller. In addition to the Arduino? The 3d scanner contains the following electronic components, a power connector with screw terminals to provide 12 volts to the project, a push-button to reset the microcontroller, an infrared sensor to measure the contours of scanned objects, an SD card to save scan Information, 2 Stepper driver boards to control the motors of the 3d scanner and 2 Nema 17 Stepper Motors to cut down on clutter and minimize possible errors due to wiring the circuit manually. I decided to use Cadsoft Eagle to design a printed circuit board to which all of the components could be mounted to directly. Eagle is a software program used to design printed circuit boards or Pcbs, which can be downloaded at tad soft usacom. While the details of using Eagle are outside of the scope of this video, The PCB design process essentially boils down to placing the components you would like to use into a schematic and connecting them together appropriately using virtual wires. In this design, the Arduino SD Card Module and Stepper Motor Driver Boards mount to the PCB using male and female header pins, the Power Connector and Stepper motor wires connect to the board via screw terminals and a reset button used to program the Arduino is mounted directly on the board. Once the schematic was wired up, it was time to arrange the components on the Circuit Board, clicking the generate / Switch – board button at the top of the Eagle Task Bar opened the board layout Graphical user interface where components from the schematic could be moved around fit onto the PCB once. All of the components were arranged to my liking. I use the auto router feature to have Eagle automatically generate the path of the traces connecting the components together. I then added text to identify the terminal inputs and outputs and to help me place components into the right spots. During soldering thereafter, I exported the PCB files from Eagle using the program’s Built-in cam processor, which can be accessed from the top of the Taskbar. I manufactured this board using OS H Park, A PCB fabricator located in Portland, Oregon, after uploading a zip of the PCB files to the OS H. Park website. I double check that everything. Look, correct one. Last time and hit submit three weeks later. I received three copies of my board in the mail in an awesome purple color. In case you would like to build a scanner at home. The video description below contains a link to the OS H Bark website where you can order a copy of this board for yourself with all of the components in hand, The first step was to solder male header pins, the Arduino and to the Stepper motor driver boards. The header pins were already soldered to the SD card board. I ordered, though, if yours aren’t be sure to solder these pins to I then Soldered matching female headers into corresponding locations for these components onto my custom Circuit board next. I soldered screw terminals that will connect the power and Stepper Motors to the PCB and also solder the push-button needed to reset the microcontroller during the programming step. It was now time to program the Arduino after connecting the microcontroller to the PCB. I attached a USB cable to the Arduino USB port connected the other end to my computer and started the Arduino IDE. I then open up code that I had written to run the scanner. This code does the following things. After advancing the turntable motor one step, it reads the value of the IR scanner since the IR sensor is an analog sensor. The reading sensed by the microcontroller can be a little noisy to counteract this noise. The IR scanner is queried 100 times instead of just once, which the code then uses to calculate the average value of all of the readings. Based on information in the datasheet. This average reading is then converted to a distance eight centimeters and this value is written to a text file on the SD card this portion of the code loops until the turntable has completed one full revolution after this. A delimiter value is written to the SD card, which will be used later to parse all of the readings, and then the Z motor advances the carriage that the IR sensor is mounted on by one millimeter the turntable loop code, then execute again. This continues until the carriage is looped all the way up which based on the threaded rod I used in. The scanner is approximately 10 centimeters to upload the code to the Arduino. I click the compile button at the top of the window once the code finished compiling. I click the reset button on my PCB To place the Arduino into programming mode and waited until the code finish upload. The Arduino was now fully programmed and ready to scan I next design the hardware components using computer-aided drafting or CAD software. CAD software is used by engineers to create virtual 3d models of components for manufacture, which Grantley speeds up the design process. I then exported the parts I designed as an STL or stereo lithography file, which describes CAD objects as triangular meshes. The STL files are imported into a slicing program which analyzes the components and generates g-code, which tells a 3d printer how to create each object. One layer At a time. The g-code is then transferred to a 3d printer, causing the print head to move through a series of waypoints. This particular printer uses a process called fused deposition modeling where molten plastic is extruded out of a printhead as it travels across the printbed several other printing processes exist, but this is the most common process for non-commercial printers to date while the printing process looks fast. In these time lapses, Each video is actually sped up significantly. The total print time for all components was approximately 10 hours time to assemble the scan In total. The 3d printer made seven components, a carriage to which the IR sensor will be mounted a constraining plate to keep the carriage shafts parallel, a turntable that rotates objects as they are scan a base to mount the two Stepper Motors, two mounting plates to attach the motor and base together and a shaft coupler with two screws inserted into it in order to connect the scanners, the access motor to the threaded rod. I first attach linear bearings to the carriage using zip ties. These will act as a guide as the carriage travels up and down, I next attach to retention nut to the carriage, which mates with a threaded rod, I place the two Stepper motors into the base and attach them to the base using the mounting plates, The shaft coupler clamps, the motor shaft and threaded rod using two screws. I first clamped The coupler around The Stepper motor shaft, followed by the threaded rock after verifying that the coupler was firmly clamped to both opponents. I next inserted two eight millimeter shafts into the base. I then inserted the threaded shaft into the retention nut on the carriage assembly and inserted the two eight millimeter shafts into the linear bearings. Turning the threaded rod now causes the carriage assembly to move up and down. I then place the constraining plate onto the top of the eight millimeter shafts and press the turntable onto the shaft of the other stepper motor next. I mounted the PCB onto the back of the scanner’s base using two screws after this. I inserted the Stepper. Motor driver boards, an SD card module into the PCB and connected the IR Sensor, Stepper Motors and Power Connector to the board with wires following the connection instructions printed on the front of the board. I finally cleaned up the wire. Routing with a few more zip ties and the 3d scanner was done. Let’s scan and print an object. I first found an object. I wanted to scan and attach double-sided tape to its underside. I then place the object in the center of the turntable and plugged in the power after a brief initialization period. The scan was underway the time it takes to scan an object depends on the parameters in the Arduino code, such as desired angular resolution number of scan samples per reading and amount of time to pause between each rotation of the turntable. In this video, The object is being scanned at one degree turntable increments, with 100 samples per reading and a brief, 200 millisecond pause between the time the turntable rotates and the IR scanner measures the distance to the object. This is a time-lapse of the skin with these parameters. The total scan time was approximately 40 minutes after the scan completed. I injected the micro SD card from the PCB and transferred the generated text file to my computer. The scanner information is processed using code written in MATLAB, a programming language commonly used by scientists and engineers for numerical computing tasks. This code loads. The scanner data creates a point cloud of the object post processes, the point cloud by filtering it to remove noise and writes the resulting point cloud to an STL file printing after adjusting the filtering parameters. In this code To my liking, I ran the code and open the generated STL file in my slicing program. I use the slicing program to scale the dimensions of the STL file, use it to generate G code to print the object and exported the G code to an SD card. After this. I plugged the SD card into my 3d printer and printed a copy of the object with the help of my 3d printer. I could now digitize and duplicate any up in my house. Overall, this build illustrates that the 3d scanner concept works, but there are several ways that this project could be improved first and foremost, the noise and resolution of the IR sensor ultimately limits the resolution of objects you can scan to make smooth 3d prints. A lot of filtering was required in the Matlab post-processing step, which eliminated a lot of the object’s fine detail in the future. The scanner could be upgraded with a small laser rangefinder to create scans with higher resolution and less noise second, while the IR Sensors Datasheet provides a relationship between the voltage of the sensor outputs, and the distances corresponds to small variations in each sensor can cause the scans to look a little skewed. This could be addressed by calibrating the IR scanner and creating a custom mapping between the IR sensors, output and the real-world distance. This corresponds to, I really hope that this video taught you something that you didn’t know before and inspired you to learn something new about a small part of this project. If you would like to build a scanner yourself. The video description below contains a bill of materials as well as links to the Matlab and Arduino code and STL files that you can use to print your own copy of parts needed to build this 3d scanner. If you end up building the scanner yourself or have any other cool projects that you’d like to show off? I’d love to see them, please share links to your projects in the video description below or connect with me on social media. Well, that’s all there is to this episode. Thanks for watching now. Go super, make something. Thanks for watching. If you enjoyed this video, please be sure to hit the like button and share with your friends. Your support helps me make more videos to keep up with the latest episodes. Click the subscribe button below. You can also check out all of my other videos by clicking on the video to the right and follow me on Twitter at Super Make. SM thng see you next time. Now go super make something you.