Search This Blog

Showing posts with label 3dprinted. Show all posts
Showing posts with label 3dprinted. Show all posts

Friday, November 25, 2022

3D Scan it and 3D Print

 The availability of 3d printing to hobbyists has provided an existing and interesting pastime to hobbyists.  For instance, electronics enthusiasts used to buy electronics enclosures for projects, but the enclosure was always a compromise. There was rarely ever an enclosure available that fit a project perfectly.  It was possible to create such a design, but it required electronics hobbyists to be amateur product designers, and then electronics designers if they wanted a good looking result.


With 3d printing, an electronics hobbyist may design their PCB and then create the enclosure exactly as needed.  However, this requires 3d design skills that are difficult for some to learn.




So, many new 3d printer owners resort to downloading designs from 3d printing repositories but this is a compromise.  It's really no different from buying an electronics enclosure that "kinda" works other than the fact that the download may be edited if you have the skills.  What if there isn't an enclosure available for download that is, "close enough?"

This is where 3d scanning can help, but until lately it has been expensive and unapproachable.  Usually some type of LIDAR based handheld gadget costing thousands of dollars is needed.  There are DIY possibilities, such as using a Microsoft Kinnect to do the scanning, but getting good scanning results can be challenging.

Latest versions of the Apple iPhone make 3d scanning easy as they use in-built LIDAR sensors to effectively replicate a multi-thousand dollar handheld 3d scanner.  Not everyone can afford the latest iPhone and not everyone wants an iPhone but what other  options do you have for an affordable 3d scanner?

Photogrammetry is a 3d scanning technique that uses a collection of photographs to create a 3d representation.  Unlike the traditional portrayal of a 3d scanner, wherein there's a laser line reflecting from an object on a rotatating table, photogrammetry needs no line - no LIDAR, no laser.  

There are photogrammetry based 3d scanning apps available on Android phones.  The better your phone camera resolution, the better your results will be.  However, for best results, you will need to take A LOT of photos.  More photos helps the photogrammetry algorithm create a better representation of your object.

My first 3d scanning attempt was with an Android app called Kiri.  Kiri is free and your scans can be exported individually.  This is an important point since some apps require a monthly subscription to be able to export your scans.  With Kiri, you can export the object that you just scanned in and pay only for that object. 

I also tried an app for Android phones called WIDAR.  The app is nice and unlike Kiri, Widar provides an editing environment on your phone that is impressive. Kiri provides basic transforms like rotation. Widar provides much more - you may not even need to edit your exported scan in another program.

Widar charges $4.99 a month if you want to do exports. There's an option to access your export for free through a generated link, but I was unable to figure out how to get the export from the link.  From what I see  Widar is $4.99 a month if you want to export your scans.  If you plan on doing a lot of scanning and exporting, $4.99 a month may not be a bad deal.

With Kiri, you pay for what you export, well not quite.  Kiri also provides free exports, so, you get so many exports per week for free.  If you need to do an export and you're out of free ones, you can either buy an export, which is very affordable, or earn a free one by referring someone to Kiri.

My first attempt with Kiri was terrible.  I tried scanning in a Hot Wheels Dodge Challenger.  I took 27 photos from all sorts of angles.  Kiri processed the results on their servers, not my phone, and then notified me that my results were ready.  I had scanned a flat multi-colored blob.  The car color was recognizable, but not the shape.

I tried again but this time with 16 inch tall Christmas tree.  It worked!  Fifty photos and I had an exact duplicate of the tree.  However, it's not that simple.

There's a lot of artifacting created by the photogrammetry process; so, you will need to edited your exported 3d scan.  This is intimidating and foreign at first but easy once the process is understood.

You'll need something to edit the STL/OBJ file.  Tinkercad is an obvious choice since it imports STL files and makes editing them easy.  Unfortunately, it is limited to 20000 triangles; so, a large complex scanand provides tools fr editing  will be rejected by Tinkercad.

Meshmixer is often mentioned as an option for editing STL files.  I'm not a fan of it.  It's a bit like using Blender or a sculpting program to do edits.  

Fusion360 will import STL/obj files and provides tools for editing STL files but it takes a bit of getting used to.  Product Design Online is an excellent Youtube channel that can help with learning how to edit STL files.

After your scan has been cleaned up and looks great, you can 3d print it!  Your object can be scaled or changed as you wish and then created on your 3d printer.  Even if you are not adept with 3d editing, you can now scan in an object, change it to your needs, and then 3d print it. 



Wednesday, September 1, 2021

Play the MacGyver theme when your 3d print ends


If you have owned a 3d printer for a while then you've probably already added code to beep the 3d printers speaker to notify you that your print has completed.  Otherwise, your stuck occasionally checking the print progress, which can become tiresome.

Why not play a favorite tune when your 3d print has completed?  Maybe a fanfare? Celebration?  "Flight of the Valkyries?"

With the tool at the following link, you can convert a midi file directly to GCODE that will output tones on your 3d printers speaker:  Midi to M300

The M300 GCODE command is used by 3d printers running Marlin firmware to generate sounds, tones.  Many 3d printers use the Marlin codebase so if your 3d printer has a speaker then you should be able to generate music.

The music will not sound like music from your smartphone might sound.  It actually sounds more like a Commodore VIC-20 could be playing the music but it is recognizable and guaranteed to arose curiosity from those not expecting it.

You can of course generate your own midi files like Lazy Game Reviewer (LGR) might, but there are also numerous midi songs available on the Internet.

Since I'm no musician but still am a fan of the original MacGyver show, I found the theme song in midi form and ran it through Midi to M300 and tried it on my printer.

It sounded terrible!

So I went back to Midi to M300 and unchecked boxes for some instruments and channels and tried again.  I had to repeat this several times before I got something that sounded good to my ears.  However, it was too lengthy.  I didn't need to hear the entire MacGyver theme at the end of a print, just enough to be recognizable and get my attention.

So I started trimming M300 lines from the generated code.  The final result has been shorted to around 30 seconds of time and contains the most recognizable parts of the tune.

If you'd like to just try this out on your 3d printer then install a copy of Pronterface and connect to your 3d printers USB port.  Some Creality printers now use the CH340 serial USB driver so you may need to install it to get Pronterface working with your printer - it does not autoinstall on Win10.

Copy the GCODE for the MacGyver theme below and save it using Notepad as a text file.  Change the extension of the file to MacGyver.GCODE.  After Pronterface is connected to your printer, Load the MacGyver.GCODE file in Pronterface.

Now press the Print button in Pronterface and your 3d printer should play the MacGyver theme.  If it is unsuccessful, and your certain that Printer face is connected, double check the MacGyver.GCODE file that you saved and make sure that it only contains the M300 GCODE lines shown below and nothing else.

To play the MacGyver theme at the end of a print, open up your printer configuration in Cura slicer and go to the "End G-code" under the Machine Settings for your printer and paste the following GCODE:

M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P104 S523
M300 P104 S0
M300 P208 S494
M300 P208 S392
M300 P208 S196
M300 P208 S392
M300 P208 S370
M300 P208 S440
M300 P208 S196
M300 P208 S392
M300 P208 S392
M300 P208 S392
M300 P208 S196
M300 P208 S392
M300 P208 S523
M300 P208 S523
M300 P208 S196
M300 P208 S494
M300 P208 S196
M300 P208 S523
M300 P208 S494
M300 P208 S440
M300 P208 S392
M300 P208 S330
M300 P208 S659
M300 P208 S330
M300 P208 S440
M300 P208 S262
M300 P208 S131
M300 P208 S262
M300 P208 S523
M300 P208 S523
M300 P208 S147
M300 P208 S494
M300 P208 S196
M300 P208 S392
M300 P208 S196
M300 P208 S392
M300 P208 S370
M300 P208 S440
M300 P208 S196
M300 P208 S392
M300 P208 S196
M300 P208 S392
M300 P208 S196
M300 P208 S392
M300 P208 S523
M300 P208 S523
M300 P208 S196
M300 P208 S494
M300 P208 S196
M300 P208 S523
M300 P208 S494
M300 P208 S440
M300 P208 S392
M300 P208 S330
M300 P208 S659
M300 P208 S330
M300 P208 S440
M300 P208 S262
M300 P208 S131
M300 P208 S262
M300 P208 S494
M300 P208 S247
M300 P208 S123
M300 P208 S247
M300 P208 S523
M300 P208 S494
M300 P208 S440
M300 P208 S523
M300 P208 S185
M300 P208 S494
M300 P208 S440
M300 P208 S587
M300 P208 S123
M300 P208 S523
M300 P208 S494
M300 P208 S587
M300 P208 S123
M300 P208 S523
M300 P208 S494
M300 P208 S659
M300 P208 S131
M300 P208 S587
M300 P208 S659
M300 P208 S740
M300 P208 S185
M300 P208 S494
M300 P208 S123
M300 P208 S784
M300 P208 S165
M300 P208 S330
M300 P208 S740
M300 P208 S311
M300 P208 S698
M300 P208 S294
M300 P208 S494
M300 P208 S392
M300 P208 S784
M300 P208 S659
M300 P208 S494
M300 P208 S740
M300 P208 S587
M300 P208 S440
M300 P208 S659
M300 P208 S523
M300 P208 S392
M300 P208 S587
M300 P208 S494
M300 P208 S392
M300 P208 S523
M300 P208 S330
M300 P208 S494
M300 P208 S294
M300 P208 S523
M300 P208 S494
M300 P208 S440
M300 P208 S392
M300 P417 S466
M300 P417 S440
M300 P208 S784
M300 P208 S392
M300 P208 S587
M300 P208 S392
M300 P208 S622
M300 P208 S311
M300 P208 S466
M300 P208 S440
M300 P208 S392
M300 P208 S196
M300 P208 S294
M300 P208 S196
M300 P208 S311
M300 P208 S196
M300 P208 S233
M300 P208 S220
M300 P208 S587
M300 P208 S587
M300 P208 S587
M300 P208 S587
M300 P208 S587
M300 P208 S587
M300 P208 S587