Search This Blog

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. 



Monday, January 17, 2022

What's Wrong with Octoprint?


 I started a 3d print running from Octoprint, as I often do, and after 30 minutes of printing, the printer halted.

Octoprint had tried to send messages a number of times and they went unacknowledged.  I didn't have the serial.log enabled, so that was all the information that I got.  I enabled the serial.log and tried 3d printing again.  Thirty minutes later, the Creality Ender 3 Pro halted and there was a notification on Octoprint of too many communications timeouts.

At least this time I had a log file. I scanned the log file and found six failed attempts to communicate.  No other helpful information was in the file.  Now what?

I came across an odd recommendation suggesting that it could be the Ender 3 LCD cable position causing communications issues.   I moved the cable and tried 3d printing again.  A 2 hour print ran successfully!  Problem solved!  Not quite.

My next 3d print, 3.5 hours long, failed after 2.5 hours.  Same issue, too many failed communications attempts.  

I tried a new USB cable. I tried using a different microUSB card.  I tried using a different USB port on the Raspberry Pi 4 running Octoprint.  I tried uninstalling and reinstalling the serial port driver.  I tried a whole new install of Octoprint.

It must be the Raspberry Pi 4, it does run a bit warm.  Nope, it wasn't the Raspberry Pi 4.  That left only the Creality Ender 3 Pro as the culprit.

I checked wire connections and especially ground connections on my Ender 3 Pro.  I even considered making my own noise shielding with aluminum foil wrapped around the LCD cable and grounded but fortunately, I tried something on a whim first.

I removed the 3d printed plastic cover for the back of the LCD that I'd 3d printed 2.5 years ago.  

As I began to remove the screws that held the cover to the back of the LCD, I noticed that one screw was very loose and the other three srews were not much better.  Oh well, cover removed and LCD screws tightened down, I ran a 7 hour 3d print.  Because I was tired of wasting filament, I ran the Ender 3 Pro dry.  No filament.  I used the same settings as always but I wasn't wasting any more plastic.

It worked!

I examined the back of the LCD a little more closely and realized that the LCD ground connection to the frame was dependent on those 4 mounting screws. Loose screws could jiggle and create a ground make/break cycle that could worsen with vibration. 

I got rid of that LCD back cover.  I may find or make another one that doesn't use the LCD PCB screws for mounting.  Then again, maybe not.

If you're having communications trouble with Octoprint to your 3d printer, always check every single ground connection and path.  It never occurred to me that grounding to the LCD could affect serial communications, but only because I haven't looked at that area of the printer for over 2 years.