arduino ir sensor
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 usa.com, 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 scanners 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 objects, 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.
arduino ir sensor Video
arduino ir sensor news
Posted on Saturday September 28, 2019Lighting The Way For The Visually Impaired Hackaday … Continue Reading »
Posted on Saturday October 05, 2019Rajasthan student develops sunglasses to prevent road mishaps Hindustan Times … Continue Reading »
Low cost laser RangeFinder (Time of Flight ) Distance sensor for Arduino – Full tutorial – Advanced Imaging Pro
Posted on Tuesday September 10, 2019Low cost laser RangeFinder (Time of Flight ) Distance sensor for Arduino – Full tutorial Advanced Imaging Pro … Continue Reading »
arduino ir sensor Social
🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr
Originally posted 2016-11-15 10:00:49.