Dewalt DWS713 Miter Saw Dust Port Vacuum Hose Adaptor

My wife got me this really cool Dewalt DWS713 miter saw for Christmas this year, and I have been having fun pimping it out a bit. In a previous post I described how I added a cut shadow line LED light and control box, and this post describes how I added a 3D-printed coupler from the saw’s sawdust exhaust port to a small vacuum I keep in the shop for small cleanup jobs.

My first attempt at a coupler was a straight piece that connected on one side to the exhaust port, and on the other side to the rigid end of the vacuum hose, as shown below:

Unfortunately, I had neglected to consider what was going to happen when I actually tried to use the saw. As soon as I released the downlock and raised the saw, the coupler snapped when the rigid part of the vacuum hose ran up against items on my bench behind the saw – oops!

So, I started over again. I found the TinkerCad ‘bent pipe’ shape generator, and made a few versions that incorporated 45-60 deg bends into the rigid portion of the vacuum hose, but all of these suffered from the same problem with physical interference and cracking when the saw was raised. After some more head-scratching, I discovered I could remove the rigid end of the vacuum hose, leaving just the flexible part. As shown below, this particular vacuum has a detachable end piece that fits inside the flexible hose

Flexible hose connector. Note circular ribs.

So, I decided that I could replace the rigid piece from the end of the vacuum hose with a short coupling piece to connect the sawdust exhaust port directly to the flexible hose. As I normally do with complex projects, I started by printing a test piece – just the portion that couples to the flexible vacuum hose, as shown below:

Short piece to test the flexible hose coupling geometry

Once I had the flexible hose coupling geometry nailed, I did the same thing with the other end, and then connected the two coupling ends with a ‘curved pipe’ shape from TinkerCad, resulting (after a number of revisions) in the piece shown below:

Version 10 – this one worked!

As can be seen in the above screenshot, the final working version was version 10. One of the more wonderful things about 3D printing is the ability to make and discard multiple revisions – all it costs is a little time and a bit of very cheap filament. No need to hyperventilate over mistakes – just throw it away and try again!

The next few photos show the finished coupler installed on the miter saw.

I had uploaded the previous straight-line coupler to Thingiverse here, and I edited it to provide the new design as well

Stay tuned!

Frank

Lab Power Supply

Posted 30 June 2020,

Almost exactly one year ago I ran across some posts regarding a very nice lab power supply regulator and display called the DPS500x power supply front-end.  My existing linear style supply was getting a little long in the tooth, and ran out of gas pretty quickly above about 12V and 1A.  So, I decided it was time to upgrade, and wound up with a very nice, lightweight well-performing unit.  Unfortunately I forgot to document the project and when I recently wanted to point someone else to this nifty product, I didn’t have anything comprehensive to point to!

So, this post is a belated documentation post for the project.

There are three ‘big’ pieces (big in terms of importance, but not in actual size or weight) used in this project; the controller head itself, an appropriate housing, and a AC/DC power supply that will fit inside the housing

The DPS5005 50V 5A constant voltage/constant current digital controller head

This is a really neat little gadget that takes a DC power supply as input and steps it down to the desired output voltage using a highly efficient buck voltage converter technique, and applying some constant voltage/constant current magic to the output, all in a package that is maybe 40 x 60 x 30 mm.  I got mine from Banggood.com, but they are available everywhere.

DPS5005 from Banggood

A suitable housing

In this case, an aluminum two-piece housing and hardware kit custom designed to house the DPS500x series of power supply controller heads.  The upper and lower halves slide together via a tongue-and-groove arrangement, and is VERY well done.  In addition, the housing has three sets of internal rails that make it easy to align/mount internal assemblies – NICE!

As the second photo above suggests, one suggested layout is to have an external 25-50V power supply connected to this piece, with basically nothing inside.  However, I did some research and convinced myself that I could fit a small open-frame AC/DC power supply inside the housing and wind up with a complete unit, just with lower wattage.

An AC/DC power supply

I wanted one that could fit inside the housing between the front and back plates to provide the ‘raw’ DC voltage to the controller head.  In the past I have used a number of Mean Well supplies and found them to be small, reliable, and cheap, so I started looking for a unit that could deliver 24V at 2A or greater (the most I thought I would need for a general-purpose bench-top power supply) while still fitting into the housing.  After a bit of research, I found that the Mean Well EPS-65-24 24V 2.7A open-frame power supply would do the trick nicely, and was available from Mouser for $13.80

Side view of power supply with model number shown

With all the ‘big’ parts identified and ordered, there some smaller issues that needed to be addressed:

Custom 3D printed back panel:

Because I was planning to use an internal AC/DC power supply rather than an external one, I needed a panel-mounted AC plug instead of DC Banana plugs, and I wanted an AC ON/OFF switch as well.  So using the basic dimensions and layout of the existing back panel, I designed a new one in TinkerCad to meet my needs.  I found some designs for 40mm fan grills on thingiverse and used them to create a cutout directly into the back panel, and took the cutout dimensions for the power switch and AC plug from the manufacturer’s specs for the parts.  When I was finished, I had a nice 3D printed panel as shown below:

TinkerCad back panel design

Custom back panel installed on power supply housing

Power Supply Mounting Rails:

The housing sports three sets of internal rails that can be used for parts mountings, so I designed and printed some ‘runners’ that would attache to the bottom of the power supply and mate with the internal rail geometry, as shown below:

3D-printed runners to mate with housing internal rail structures

Tilt Stand:

The finished power supply worked great, but it was so small and flat that it was difficult to get my fingers on the controls, so I designed and fabricated a custom tilt stand, as shown below

Front view showing tilt stand. Ignore the missing screw 😉

Miscellaneous:

Mean Well AC/DC power supply AC input connector:

Mean Well AC/DC power supply DC output connector:

HP style AC cord panel-mount receptacle:

AC Power switch: KCD3 T85 16A 250VAC, 20A 125VAC.

Here’s a link to the 3D print (STL) files for the tilt stand and the custom rear panel.  If you don’t have access to a 3D printer, there will surely be someone in your local area who can print them for you.

 

Frank

 

Flashforge Creator Pro 3D Printer Motherboard replacement

Posted 07 October 2019

I have owned a Microcenter clone of the very popular Flashforge Creator Pro for several years now and just the other day it gave up the ghost and died; the internal LED lighting and the front panel LCD display started flickering, and then went dark altogether. This wasn’t an entirely unexpected event, as for the last week or so I had been smelling burnt insulation every time I used the printer.

So I turned the printer on its side and removed the bottom panel to have a look around. Everything looked normal until I examined the main power connector to the motherboard; this connector looked a bit brown and charred as shown below:

Motherboard power input connector. Note the discoloration and bubbling

If I wiggled this connector with the power to the printer enabled, I could get the display and internal LEDs to light up briefly and then go out again, so it seemed pretty reasonable that this was the problem.  After removing the motherboard from its mounting posts, I was able to get a better look at the connector, as shown below:

 

Motherboard power connector as viewed from the side

As can be seen in the photo, the plastic power connector has melted and bubbled out to the side, and the mating halves of the connector are fused together.  In order to disconnect the power cable I had to physically pry the two halves apart, as shown in the following photos:

Motherboard half of the burnt power connector

Cable half of the power connector

I didn’t know if the connector fried and caused the motherboard to die, or the motherboard died and caused the connector to die (or maybe a little of both?).    Anyway, I decided to try an replace the motherboard with a new one purchased on eBay.

When the new motherboard arrived, I started preparing for the exchange by carefully labelling all the cables, so I could make sure I got them back to the right places after the exchange. The labelling step is critical, as many of the motherboard connectors and the corresponding cables are indistinguishable from each other; without the labels there would be no way to tell which cable goes to which connector. Then I moved all the cables except for the power cable from the old motherboard to the new one, as shown in the following photos:

After moving all the cables, I still had a problem; the cable end of the power connector was so badly damaged that I couldn’t use it on the new motherboard, and without a power connection, there was no way to test the new board.  I solved this problem by temporarily disconnecting my after-market extruder cooling fan from the ‘EXTRA’ connector on the motherboard, and using that cable connector for the power connection to the motherboard.  After making this change, the printer came up normally when I applied power – YAY!!

So, I still had the problem of not having a connector for my printhead cooling fan cable.  After some more web research, I found this link by Aaron Gilliam (on Thingiverse of all places) describing the part numbers for the entire Flashforge Creator Pro in detail – thanks Aaron!

Flashforge Creator Pro Motherboard connector

Flashforge Creator Pro cable connector

The connector I was looking for was ‘2 pin DIGIKEY # ED2779-ND’ So, off I went to Digikey where I ordered several of the cable connectors, and also several of the mating motherboard connectors.  My plan was to first get the printhead cooling fan back on line, and then maybe try and replace the motherboard connector on the old motherboard to see if that was the only problem; if so, then I would have a complete spare motherboard available – cool!

Stay tuned!

Frank

 

 

 

 

Speaker Amplifier Project, Part VI – Second Production Run

Posted 29 September 2019,

I got an email from Dr. Betty Lise Anderson of the Electrical Engineering Department (I think it’s actually Electrical and Computer Engineering now) at The Ohio State University, asking me if I still had the documentation for the speaker amplifiers I created a couple of years ago for her STEM outreach program.  . Dr. Anderson said these units were very well-liked by her STEM outreach students; so well liked in fact that they apparently walked away on their own!  She asked me if I would be willing to fabricate another couple of amps, and said she would happily pay for all the parts.

Since I never throw anything away, I did indeed have the documentation and even some remaining parts from the original project.  I still had a half-dozen or so of the custom audio level indicator PCBs and at least one Adafruit 20W Class D amplifier left over.  I figured I’d need a couple of wall-wart 12V power supplies and one more amplifier – everything else was already available in my parts bins.  I figured the hundred bucks or so required to get all the parts was not worth worrying about, and besides I could probably write it off as advertising expense for EM Workbench LLC.

The enclosure:

When I made the first set, I 3D printed an enclosure that was a modified version of the nice rounded-corner box design published by Adafruit for just the amplifier.  However, when I tried this trick again, I wound up not liking the result.  Instead, I decided I should be able to create my own rounded corner box.  I searched around on Thingiverse and found a few parameterized rounded box designs, but they all seemed sort of half-baked.  So I broke out my copy of Open SCAD and started figuring out how to do it myself.  I ran across a video that demonstrated the rounded-corner technique using a ‘minkowski’ function, and then I was off and running.  After just a few hours (OK, more than a few, but definitely less than infinity) I had coded a nice, compact Open SCAD module to generate an arbitrary shaped rounded-corner box with an optional companion nesting lid.  The code is available on Thingiverse here.  Using the Open SCAD module, I generated an enclosure and companion lid and exported the result as an STL file, which I then sucked into Tinkercad to add the required cutouts and such for the amplifier project.

Amplifier enclosure as generated in Open SCAD

Amplifier enclosure after importing the STL file into Tinkercad

Amplifier enclosure after modification for the Adafruit amplifier and level indicator PCB

After getting the enclosure design all spiffed up, I started printing it on my trusty PowerSpec 3D Pro 3D printer, only to have it die on me – so much for ‘trusty’!  This was not an entirely unexpected event, as I had been noticing a ‘burnt insulation’ smell coming from it over the last few weeks, and suspected that it might be on its last legs.  So, this batch of amplifier enclosures would have to be single-color (the last one was dual-color red or the enclosure and gray for the text) – at least until my new MakerGear M3-ID 3D printer shows up :-)).  Here’s the result.

Amplifier and Activity Indicator:

In reviewing the documentation from the original project, I saw that the activity indicator schematic wasn’t entirely accurate, so I brought it up to date – mostly cosmetic/lettering, but…

View showing power indicator LED installation before installing power input terminal connector

View showing 2.2K current limiting resistor for power indicator LED

View showing connections between activity monitor PCB and amplifier board

The finished product:

Two complete amplifiers with companion power supplies

A large part of the motivation for this post was to thoroughly document all aspects of fabricating the second run of OSU/STEM speaker amplifiers, so that when I get that next call from Dr. Betty Lise Anderson… 😉

Frank

Custom B-Ball Face Mask Project

Posted 14 May 2019

In March of this year, I suffered yet another broken nose while playing basketball.  Off to the emergency room where, following the normal interminable wait, I was told “yep – you have broken your nose – here’s a referral to an ENT guy – have a nice day!”  The next day I went to the ENT guy, who said “yep – you have a broken nose, and there’s nothing I can do for you; you need an ‘open reduction’ (aka ‘nose job’), and here’s the name of the plastic surgeon I recommend”.  At this next appointment Dr. Bapna (the plastic surgeon) said “yep – you have a broken nose, and you’re going to need an open reduction.  It’s not going to be a whole lot of fun, but I should be able to get you squared away (literally)” (or words to that effect, anyway).

So, in early April I endured a ‘functional rhinoplasty’ (aka nose job), and indeed it wasn’t much fun.  Fortunately I had learned from an earlier rotator cuff operation that I could rent a powered recliner on a short-term basis, and this at least made the convalescence a little less terrible.

In the subsequent post-op appointments with Dr. Bapna, he made it quite clear that while the operation was an unqualified success, another broken nose while playing basketball might not be repairable.  He strongly recommended that I either give up basketball (and what is a 70-year old man doing playing b-ball anyway?) or wear a protective face mask.  Since I wasn’t really interested in giving up round-ball, I started investigating face mask options.

Some research showed that a number of clear face masks are available on Amazon and other retail outlets, and there were a few firms advertising custom face masks.  When I mentioned this to Dr. Babna, he told me that a local prosthetic business (Capital Prosthetic and Orthotic Center, Inc) also does custom face masks (who knew?).  Apparently the process involves making a plaster impression of the face, and then using the impression as the mold for a custom polycarbonate mask.  While I was researching the possibilities, it occurred to me that I might be able to use the knowledge of 3D modelling I had gained from an earlier project to create a duplicate of a chess piece to create a 3D model of my face, and then print a full-size plastic face replica to use as the basis for a polycarbonate mask.  This would eliminate the need to make a plaster impression, and might open up a new technique for custom face mask fabrication.

So, I talked my lovely wife into helping me make a 3D representation of my head, using the same Canon SX260 HX digital camera I used for my chess piece replication project.  It took us a couple of iterations to get enough good shots, but soon I had sucked 185 photos into Meshroom and it was busily cranking away to create the 3D model.

Except when it crashed.  I had experienced this problem during the chess piece project, and had solved it by finding and removing the problem photos, usually a shot that was badly out of focus. So, I found and removed the photo pointed to by the crash log, and restarted Meshroom’s processing.

And it crashed again, and kept crashing even as I removed more and more photos.  In addition, there wasn’t anything apparently wrong with the photos that caused the crash.

After a LOT of research on the Meshroom GitHub site, I finally ran across a post where one responder noted that Meshroom-2019.1.0-win64, the version I was using had ‘issues’ with photos that weren’t exactly perfect, and recommended downgrading to the 2018.1.0 version.

So, I downgraded to 2018.1.0, and voila – Meshroom processed all 185 photos without complaint and produced a startlingly accurate 3D model of my head, shown below

Screenshot of Meshroom 2018.1.0. From left to right; input photos, selected photo for comparison, textured 3D model

Leveraging on my experiences with the chess piece project, I immediately sucked the 57+ MByte texturedMesh.obj output from Meshroom into Microsoft 3D builder, and set about removing all the background artifacts, resulting in the revised model shown in the screenshot below:

Model in Microsoft 3D Builder, after removal of background artifacts

If you are doing the sorts of 3D modelling projects involving lots of photos and 50+ MByte object files, I highly recommend Microsoft 3D builder; it seems to be one of those little-known unappreciated gems in the Microsoft ecosystem; using 3D Builder was like expecting a tricycle and actually getting a 12,000HP supercar; 3D Builder not only accommodated my 57+ MByte  .OBJ file, it didn’t even seem to be breathing hard;  more like “Yawn – is that all you’ve got?”

After removing all the background artifacts, I exported the model from 3D Builder as a .3MF file that I was delighted to see is compatible with Prusa’s Slic3r PE, as shown below

The .3MF file from 3D Builder imported into Slic3r PE

I fired up my Prusa MK3 printer and printed out the model, and got the following off the printer

Very small scale version of my 3D head model. 0.5mm mechanical pencil provided for scale

Then I scaled the model up a bit and reprinted it, getting the following model:

 

Once I was convinced the model was reasonably accurate, I set out to print a full-sized model.  To get the proper scale multiplier, I measured the distance between the outer rims of my eye sockets and compared this to the measurement on my mid-scale model. This gave me a scale factor of almost exactly 3.5, so I used this to print the full-scale model. The full scale model just barely fit on my Prusa MK3/S print bed, and took an astounding 24 hours to print!  Also, this is the only model I’ve ever printed that actually cost a non-trivial amount of money –

Full scale print setup. Note the print time of almost 24 hours, and the used filament – over 100 m/$8 in cost – wow!!

Partially finished model, showing the internal structure (5% fill)

Finished print

With the finished 3D model, it should be possible to create the desired custom face mask directly, without having to take a plaster cast impression of my face.  However,  to verify that the full scale model was in fact a faithful representation of my face/nose structure, I decided to make a plaster cast of the printed model, and then compare the plaster cast to my actual face.  This is sort of the backwards process used by a prosthetics house to create a custom face mask; they make a plaster cast using the patient’s face, and then use the plaster cast as the model for the final product.

Plaster cast impression using the 3D printed model instead of my face

Plaster cast separated from the 3D model

Side view of plaster cast on my face, showing that the 3D model is an accurate representation.

Summary:

All in all, this project was a blast; I was able to create an accurate 3D model of my face, which should be usable for the purpose of creating a custom face mask for me so I can go back to abusing my body playing basketball.  However, I have to say that if I added up all the time and effort required to take all the photos, deal with Meshroom’s idiosyncrasies, actually print the full-scale model (24 hours, $8), and still have to take the plaster cast impression to verify the model, I might have been better off to just get the plaster cast impression made by a professional.  OTOH, I learned a lot and had loads of fun, so…

Stay tuned!

Frank

 

 

 

 

Alzheimer’s Light Strobe Therapy Project

Posted 24 March, 2019

A friend told me about a recent medical study at MIT where lab mice (genetically engineered to form amyloid plaques in their brains to emulate a syndrome commonly associated with Alzheimer’s) were subjected a 40Hz strobe light several hours per day.  After repeated exposures, the mice showed significantly reduced plaque density in their brains, leading the researchers to speculate that ‘light strobe therapy’ might be an effective treatment for Alzheimer’s in humans.

The friend’s spouse has been diagnosed with Alzheimer’s, so naturally he was keen to try this with his spouse, and asked me if I knew anything about strobe lights and strobe timing, etc.  I told him I could probably come up with something fairly quickly, and so I started a project to design and fabricate a light strobe therapy box.

The project involves a 3D printed housing and 9V battery clip, along with a white LED and a Sparkfun Pro Micro 5V/16MHz microcontroller, as shown in the following schematic.

Strobe Therapy schematic

I had a reflector hanging around from another project, so I used it just as much for the aesthetics as for functionality, and I designed and printed up a 2-part cylindrical housing. I also downloaded and printed a 9V battery clip to hold the battery, as shown in the following photos

Finished Strobe Therapy Unit

Internal parts arrangement

Closeup showing Sparkfun Pro Micro microcontroller

The program to generate the 40Hz strobe pulses is simplicity itself.  I used the Arduino ‘elapsedMillis’ library for more accurate frequency tuning, but ‘delay()’ would probably be close enough as well.

 

I’m not sure if this will do any good, but I was happy to help someone whose loved one is suffering from this cruel disease.

Frank

 

Chess Piece Replacement Project

Posted 15 March 2019,

A week or so ago a family friend asked if I could print up a replacement part for a chess set.  I wasn’t sure I could, but what the heck – I told them to send it to me and I would do my best.  Some time later a package arrived with the piece (shown below) to be duplicated – a pawn I think.

Chess piece to be duplicated

Chess piece to be duplicated

The piece is about 43 x 20 x 20 mm, and as can be seen in the above photos, has a LOT of detail.  I didn’t know how close I could come, but I was determined to give it the old college try!

3D Scanning:

The first step was to create a 3D model of the piece.  I was semi-successful in doing something similar with an aircraft joystick about five years ago, but that piece was a lot bigger, and had a lot less detailed surface.   This previous effort was done using Autodesk Capture123, and it was a real PITA to get everything right.  Surely there were better options now?

My first thought was to utilize a professional 3D scanning service, but this turned out to be a lot harder than I thought. There is a LOT of 3D scanning hardware out there now, but most of it is oriented toward 3D scans of industrial plants, architecture installations and big machinery.  Very little to be found in the way of low-cost high-resolution 3D scanning hardware or services.  There are, of course, several hobbyist/maker 3D scanners out there, but the reviews are not very spectacular.  I did find two services that would scan my piece, but both would charge several hundred dollars for the project, and of course would require a round-trip mailing of the part itself – bummer.

Next, I started researching possibilities for creating a scan from photos – basically the same technique I used for the joystick project.  While doing this, I ran across the ‘Photogrammetry’ and ‘Photogrammetry 2’ video/articles produced by Prusa Research, the same folks who make the Prusa Mk3 printer I have in my lab – cool!  Reading through the article and watching the video convinced me that I had a shot at creating the 3D model using the Meshroom/AliceVision photogrammetry tool.

At first I tried to use my iphone 4S camera with the  chess piece sitting on a cardboard box for the input to Meshroom, but this turned out to be a disaster.  As the article mentioned, glossy objects, especially small black glossy objects, are not good candidates for 3D photogrammetry.  Predictably, the results were less than stellar.

Next I tried using my wife’s older but still quite capable Canon SX260 HX digital camera.  This worked quite a bit better, but the glossy reflectivity of the chess piece was still a problem. The wife suggested we try coating the model with baby powder, and this worked MUCH better, as shown in the following photos.  In addition, I placed the piece on a small end table covered with blue painter’s tape so I would have a consistent, non-glossy background for the photos.  I placed the end table in our kitchen so I could roll my computer chair around the table, allowing me to take good close-up photos from all angles.

End table covered with blue painter’s tape

Chess piece dusted with baby powder

Chess piece dusted with baby powder

Chess piece dusted with baby powder

Next, I had to figure out how to use Meshroom, and this was both very easy and very hard.  The UI for Meshroom is very nice, but there is next to no documentation on how to use it.  Drag and drop a folder’s worth of photos, hit the START button, and pray.

Meshroom UI

As usual (at least for me), prayer was not an effective strategy, as the process crashed or hung up multiple times in multiple places in the 11 step processing chain.  This was very frustrating as although voluminous log files are produced for each, the logs aren’t very understandable, and I wasn’t able to find much in the way of documentation to help me out.  Eventually I stumbled onto a hidden menu item in the UI that showed the ‘image ID’ for each of the images being processed, and this allowed me to figure out which photo caused the system to hang up.

Meshroom UI showing hidden ‘Display View ID’s’ menu item.

Once I figured out how to link the view ID shown in the log at the point of the crash/hangup with an actual photograph, I was able to see the problem – the image in question was blurred to the point where Meshroom/AliceVision couldn’t figure out how it fit in with the others, so it basically punted.

Photo that caused Meshroom/AliceVision to hang up

So, now that I had some idea what was going on, I went through all 100+ photos looking for blurring that might cause Meshroom to hang up.  I found  and removed five more that were questionable, and after doing this, Meshroom completed the entire process successfully – yay!!

After stumbling around a bit more, I figured out how to double-click on the ‘Texturing’ block to display the solid and/or textured result in the right-hand model window, as shown in the following photo, with the final solid model oriented to mirror the photo in the left-hand window.

textured model in the right-hand window oriented to mirror the photo in the left-hand window

So, the next step (I thought) was to import the 3D .obj or .3MF file into TinkerCad, clean up the artifacts from the scanning process, and then print it on my Prusa Mk3.  Except, as it turns out, TinkerCad has a 25MB limit on imports due to its cloud-based nature, and these files are way bigger than 25MB – oops!

Back to the drawing board; first I looked around for an app I could use to down-size the .obj file to 25MB so it would fit into TinkerCad, but I couldn’t figure out how to make anything work.  Then I stumbled across the free Microsoft suite of apps for 3D file management – 3DPrint, 3DView, and 3DBuilder.  Turns out the 3DBuilder app is just what the doctor ordered – it will inhale the 88MB texturedMesh.obj file from Meshroom without even breaking a sweat, and has the tools I needed to remove the scanning artifacts and produce a 3MF file, as shown in the following screenshots.

.OBJ file from Meshroom after drag/drop into Microsoft 3DBuilder. Note the convenient and effective ‘Repair’ operation to close off the bottom of the hollow chess piece

Side view showing all the scanning artifacts

View showing all the disconnected scanning artifacts selected – these can be deleted, but the other artifacts are all connected to the chess piece

The remaining artifacts and chess piece rotated so the base plane is parallel to the coordinate plane, so it can be sliced away

Slicing plane adjusted to slice away the base plane

After the slicing operation, the rest of the scanning artifacts can be selected and then deleted

After all the scanning artifacts have been cleared away

Chess piece reoriented to upright position

Finished object exported as a .3MF file that can be imported into Slic3r PE

Now that I had a 3D object file representing the chess piece, I simply dropped it into Slic3r Prusa Edition, and voila! I was (almost) ready to print!  In Slic3r, I made the normal printing adjustments, and started printing trial copies of the chess piece.  As usual I got the initial scale wrong, so I had to go through the process of getting this right.  In the process though, I gained some valuable information about how well (or poorly) the 3D scan-to-model process worked, and what I could maybe improve going forward.  As shown in the following photo, the first couple of trials, in orange ABS, were pretty far out of scale (original model in the middle)

I went through a bunch of trials, switching to gray and then black PLA, and narrowing the scale down to the correct-ish value in the process.

The next photo is a detail of the 4 right-most figures from the above photo; the original chess piece is second to right.  As can be seen from the photo, I’m getting close!

All of the above trials were printed on my Prusa Mk3 using either orange ABS or gray (and then black) PLA, using Prusa’s preset for 0.1mm layer height.  Some with, and some without support.

After the above trials, I went back through the whole process, starting with the original set of scan photos, through Meshroom and Microsoft 3D Builder to see if I could improve the 3D object slightly, and then reprinted it using Prusa’s 0.05mm ‘High Detail’ settings.  The result, shown in the following photos is better, but not a whole lot better than the 0.1mm regular ‘Detail’ setting.

Three of the best prints, with the original for comparison. The second from right print is the 0.05mm ‘super detail’ print

I noticed that the last model printed was missing part of the base – a side effect of the slicing process used to remove scanning artifacts.  I was able to restore some of the base in 3D Builder using the ‘extrude down’ feature, and then reprinted it. The result is shown in the photo below.

 

“Final” print using Prusa Mk3 with generic PLA, Slic3r PE with 0.1mm ‘Detail’ presets, with support

Just as an aside, it occurred to me at some point that the combination of practical 3D scanning using a common digital camera and practical 3D printing using common 3D printers is essentially the ‘replicator’ found in many Sci-Fi movies and stories.  I would never thought that I would live to see the day that sci-fi replicators became reality, but at least in some sense it has!

Stay tuned!

Frank

 

 

 

 

 

 

 

 

Better Battery Charging for Wall-E2

Posted 08 February 2019,

After recovering from my bout with #include file hell, I’m back to working on Wall-E2, my autonomous wall-following robot.  In a previous post I described the integration of the TP5100 charger module into Wall-E2’s system, but I have lately discovered that the TP5100 end-of-charge (EOC) detection scheme isn’t very reliable in my application.  The TP5100 uses a current threshold to determine EOC, which works fine in a normal application where the battery pack isn’t simultaneously supplying current to the load, but in my application, Wall-E2 stays active and alert while it’s docked at it’s feeding station; it has to, in order to be able to respond to the EOC signal and detach itself.  So, the current going through the TP5100 never goes below the idling current for Wall-E2, which is on the order of 300mA or so.  This is enough to keep the charging current above the TP5100 EOC threshold, and so Wall-E2 hangs on to the charging station forever – not what I had in mind!

Life would be good if I somehow measure Wall-E2’s idling current while on charge and the total charging current.  Then I could subtract the two values to get the excess current, i.e. the current going into the battery but not coming out – the current actually going into increasing the battery charge level. When this current falls below an appropriate threshold, then charging could be terminated. This scenario is complicated by the need to measure the current on the high side of the charging circuit and of the +Vbatt supply to the rest of the system.

Well, as it turns out, Adafruit (and I’m sure others) makes a high-side current sensor just for this purpose, based on the 1NA219 and INA169 chips. The INA219 module reports current via an I2C connection, while the 1NA169 module provides a open-emitter current source proportional to the current through an onboard 0.1Ω resistor (see this data sheet for details).  My plan is to use two of these modules; one at the charging circuit input, and a second one at the 8.4V +VBatt supply from the battery to the rest of the system. Since Wall-E2 stays awake during charging, it should be simple to monitor both currents and decide when charging is complete (or complete enough, anyway).  As a bonus, I should be able to extend the life of Wall-E2’s battery pack by terminating the charge at less than 100% capacity. See this very informative post by François Boucher for the details.

03 March 2019 Update:

After the usual number of mistakes and setbacks, I think I have the dual current sensor feature working, and now WallE-2 charges by monitoring both the battery voltage and the actual charging current (total current measured at the charging connector minus the run current measured on WallE-2’s main power line).  As a final test, I discharged the main battery pack at about 1A for about 1 hour, and then charged it again using the two-current method. As shown in the Excel plots below, Charging terminated when the actual battery charging current fell below 50mA.

Complete charge cycle, after discharging at approx 1A for approx 1 Hr

Last 20 minutes or so of charge operation, showing detail of end-of-charge behavior

two 1NA169 high-side current sensors mounted in the battery/motor compartment.  Note the 3D-printed mounting plates.

Here is a showing the installation of the two 1NA169 sensor modules in WallE-2’s battery compartment.  The one on the left measures running current, and the one on the right measures total current (charging + running).

The following figure shows the system schematic for WallE-2, with the two new 1NA169 sensors highlighted

System schematic with locations of new current sensors highlighted

Now that I have the current sensors and the new charge algorithm working, it’s time to go back an take another look at the charge/discharge characteristics of the Panasonic 18650B cells I’m using to see if I can extend their life with a more intelligent charge/discharge scheme.  The following plot shows the charge characteristics for this cell.

Charge plot for the Panasonic 18650B LiPo cell

As noted by François Boucher, the red line above is the total energy returned to the battery during charge.  As he notes, the battery acquires about 90% of its total capacity in the first 105 minutes of the charge period, when charged at 0.5C at 25C.  My battery pack is a 2-cell parallel x 2-cell series stack, and currently I’m charging to a 50mA cutoff.  According to Boucher, this is way too low – I’m charging to almost 100% capacity and thereby limiting the cycle life of the battery pack.  Looking at the end-of-charge detail plot above (repeated below), I should probably use a charge current threshold of around 500mA charging current (250mA per cell in the parallel stack) for about 90% capacity charge.

End-of-charge detail with approximate 90% charge current highlighted

On the discharge side, Panasonic’s Discharge Characteristics plot below shows a discharge down to 2.50V/cell.  WallE-2’s typical current drain is about 1A or about 0.3 – 0.5C, and the cutoff I’m using is 3.0V cell.  From the plot, this gives about 3150mAH of the approximately 3300mAH available at 0.5C, or about 95%.  So, it looks like I should raise the discharge cutoff voltage to about 3.2V or about 3000mAH of the 3300mAH available, or about 90%.

Conclusion:

So revisiting WallE-2’s battery management seems to have paid off; I now have much better visibility into and control over charge/discharge of the 18650B battery pack, and at least some expectation that I can use WallE-2’s new found battery super powers for good rather than evil ;-).

Stay tuned!

Frank

 

Digital Tension Scale, Part IV

Posted 25 December 2018

In my copious free time I have been refining the design for a low power battery operated tensionometer.   In my last post on the subject, I had described the components I had planned to use, and in the ensuing weeks I have been working on implementing this design.   There are several challenges in this project:

Bluetooth Link:

There are a huge number of Bluetooth products out there in the Maker-verse, with varying degrees of Arduino support, and widely varying performance characteristics.   To add to the confusion, there is ‘regular’ Bluetooth and the more recent  ‘BLE’ (Bluetooth Low Energy) which are completely incompatible with each other.   As I now understand it, BLE is synonymous with Bluetooth 4.0+ (the iPhone 4S was the first smartphone to implement the new standard).   However, the most common product in use in the Arduino world seems to be the venerable HC-05 ‘regular’ Bluetooth module, available from your local grocery store (well, not quite, but from almost everywhere else!) for not much more than a few pennies

I had no previous experience with BT modules, so this part of the project took some time, and was the last major part to be accomplished.   After receiving my HC-05 modules from China, I used this tutorial to get started.   The real challenge for this part of the project wasn’t getting the HC-05 hooked up to the microcontroller – it was sorting through all the layers of BT-related settings on my Win 10 laptop to pair with the HC-05 device and determine which serial port did what.

  • In Windows 10, I used the ‘Bluetooth and other devices settings’ panel (Settings -> Devices -> Bluetooth and other devices) to find and pair to the HC-05.   The device shows up as ‘HC-05’ and the default pairing password is “1234”.
  • When the HC-05 is paired it automatically sets up at least two serial ports that show up in device manager as ‘Standard Serial over Bluetooth’ ports, as shown below.   However, only one of these ports is actually usable for two-way communication, and it isn’t clear to me why, or how to tell which is which;   I had to experiment with each available ‘SSoB’ port to figure out which to use  (so far, it seems like the highest-numbered port is the proper one).
  • After the HC-05 is paired and the com ports are set up, then any serial terminal app (I used RealTerm) can be used to communicate between the PC and the microcontroller via the HC-05.
  • On the microcontroller (I used a Teensy 3.2 with multiple hardware serial ports), I wired the HC-05 to Serial1 leaving Serial (Serial0) available for normal communication between the Teensy and my Visual Studio 2017 Community Edition/Visual Micro add-on for Arduino development platform.

Physical Layout:

The original idea behind this project was to create a self-contained battery-operated digital weight scale that could display weight values on a local display, but could also stream the data live to a remote recording station like a laptop or smartphone. The ‘self-contained’ part requires that all the electronics be mounted on the S-shaped load cell assembly itself, and to that end I designed a housing that connects to the two bolts that hold the arms of the load cell.   The idea is that all the electronics save the LCD display and the battery will be mounted to the underside of the box lid so that servicing would be easier.   Also, by mounting everything to the lid, I can make cutouts for the charger and Teensy USB connectors for easy charging and reprogramming.   After several iterations in TinkerCad, I came up with the following design

Looking up at the underside of the box lid, showing all modules except the battery and the LCD display

Showing the top of the lid with the mounting bracket for the load cell

Isometric view with transparent box walls. The LCD display module is under the battery.   Note the cutouts for the charging and programming USB-C connections

Module Integration:

I had previously tested each module individually, but hadn’t had all of them working at the same time.   I had tested the HC-05 with an Arduino Mega, and I had tested the load cell with both a Sparkfun Pro Micro and with a Teensy 3.2, and I had tested the Nokia LCD display with a Teensy 3.2, but I hadn’t put everything together.   So I wired everything up on my half-size ASP plugboard and got it all working together with a simple program (included below) that exercised the LCD Display, the load cell, the BT module, and the battery charger, as shown in the following photos

RealTerm Serial Terminal Program showing load cell readouts collected wirelessly via the Bluetooth HC-05 modules

HC-05 Bluetooth, HX-711 Load Cell Amp, Sparkfun Charger, and Teensy Microcontroller modules integrated together. Note disconnected USB cable showing that the circuit is running on battery power. The scale is currently measuring 1.8 liters of water in the suspended plastic bag (note the ‘1.8 Kg’ reading on the LCD display)

 

Software:

The software used for the above integration tests is a reasonably complete sketch for day-to-day use of the digital weight scale.   It displays the measured weight on the LCD display, and also sends it to the USB serial port for display on a directly connected PC, and to the HC-05 Bluetooth module for display/capture via a BT-connected laptop or smartphone.   This program is shown below:

However, this program depends on the proper calibration of the load cell, which I have been doing with a separate sketch (also included below):

What I need to do now is to combine these two programs into a single sketch with ‘operating’ and ‘calibration’ modes.   My calibration program already does this to some degree, as it waits 5 seconds on startup for the operator to send the ‘y’ key via the direct-connect serial port. If the ‘y’ character is detected within this window, then the program starts the calibration sequence; otherwise it starts taking measurements as normal.   This behavior needs to be expanded somewhat in that it should accept a calibration command either through the direct-connect serial port (Serial) or via the BT port (Serial1).

Low Power Operation:

I have already done some experimentation on low-power operation of the Teensy 3.2, using Colin Duffy’s fine ‘Snooze’ library, and have determined that I can easily drop the Teensy’s operating current from around 20-30 mA to about 1-2 mA by putting it to sleep during periods of load cell inactivity.   Assuming I get the full 2500 mA hours out of the battery, then I can expect something like 1000 hours or about 40 days between recharges.   However, more work needs to be done to get the low power mode fully operational.

 

Stay Tuned!

Frank

 

Digital Tension Scale

Posted 27 October 2018

I recently underwent rotator cuff repair surgery on my left (dominant) shoulder, and am now starting the rehab process.   My PT person was adamant that I not re-start my normal rowing routine for at least six weeks post-op, due to the possibility that I could re-tear the tendon.   This made me curious as to what the tension really was on my arms when rowing, so I decided to try and build a digital dynamic tension sensor, capable of plotting rowing strap tension in real time.

To start, I had to educate myself on the world of strain gauges and load cells, and what the differences are.   As I came to understand, what I wanted was a  load cell configured for tension measurement, with a  strain gauge as the active sensing element in the load cell.   So, I started searching for load cells, and was immediately inundated with ‘too much information’.   This deluge is certainly better than the old days where I had to search through paper (really, no internet!) magazines and catalogs, but at least you didn’t have to worry about overload headaches! ;-).

Anyway, I found this item ‘Degraw 40Kg Tension Load Cell and HX711 Combo Pack Kit‘, as shown in the screenshot below

Amazon catalog item for Degraw load cell

This looked perfect for my intended use, as I could hook one end onto my rowing machine strap, and connect some sort of handle to the other end.   Now all I had to do was figure out how to hook the thing up and get it to work.   Fortunately Degraw also provided a sketch of the hookup using an Arduino Uno, so that part was pretty easy.

Degraw-provided hookup diagram

After a bit more research, I found a nice HX711 library by bogde and some example programs, and got the whole thing to work using an Arduino Mega 2560.   Once I got a program running with some preliminary (but believable) results, I started thinking about how I was going to manage the physical aspects of hooking this assemblage to the rowing machine and recording dynamic tension.   I couldn’t really just let the HX711 board hang by the strain gauge wires while connected with jumpers to the Mega board, as the #28 strain gauge leads would surely break.   So, I came up with the idea of somehow attaching the HX711 board and a small microcontroller to the load cell assembly, and then connecting the whole thing to my laptop with a USB cable.   Hopefully the USB cable would be long enough to allow full extension of the rowing machine strap so I could collect full rowing cycle data.

After some digging around in my parts cabinets, I came up with two candidates for the ‘small microcontroller’ part of the plan; a 3.3V Teensy 3.2, and a 5V/16MHz Sparkfun Pro Micro.   I tried the Pro Micro at first, and almost immediately went down the rabbit hole (my term for getting lost in some technical wonderland without a clue how to get back) trying to figure out how to program the device – a challenge due to the way it handles com ports through the USB connector (it actually implements two different ones, depending on whether the boot loader or the user firmware is running – yowie!).   After climbing my way out of the rabbit hole, I decided to try the Teensy 3.2 instead, as I familiar with it from several other projects.   With the Teensy, I got a test program running and started taking data with known weights attached to the load cell. The way I did this was to suspend a plastic bucket from the load cell, and poured water into the bucket one liter (1Kg) at a time while recording data.   This was successful because I got good data, but unsuccessful because the data didn’t make much sense, as shown in the plot below

Results of pouring 1L (1Kg) water at a time into bucket suspended from load cell, using a 3.3VTeensy 3.2

As can be seen, the data was anything but the stairstep function I was expecting to see.   At this point I wasn’t sure if I had a hardware problem or a software problem, or something else entirely, so I sent an email to Degraw Product support with the above plot attached, asking if they had any insight into the problem.   Amazingly, they replied almost immediately, and offered to send me another load cell unit gratis so I could eliminate their hardware as the cause of the problem.   Although I was quite pleased with their offer of support, I thought maybe the 3.3V supply of the Teensy 3.2 might be causing the non-linearity (the HX711 advertises 2.7-5V operation but the lower voltage might be causing output linearity problems).   So, I tried again with the Sparkfun Pro Micro, and this time I managed to make the programming magic work. Then when I did the same test as above with the 5V Pro Micro instead of the 3.3V Teensy, I got the plot shown below.

Tension vs time plot created by pouring 1L (1Kg) of water at a time into bucket suspended from load cell, using Sparkfun 5V Pro Micro

So, now that I had the software and microcontroller problems solved, I started working on the mounting issue.   After a few minutes in TinkerCad and some quality time with my PowerSpec 3D PRO 3D printer, I had a mounting platform that clipped onto the two vertical rods in the ‘S-shaped’ tension load cell, as shown in the images below.

Reverse side of assembly, showing mounting plate clips attached to load cell vertical members

Sparkfun Pro Micro and HX711 board mounted on load cell

After getting all this set up, it was time to take some real data. Since I was still in the ‘no rowing’ zone after my surgery, I enlisted my lovely wife to do the honors while I recorded the data.   We have an Avari magnetic rowing machine, which thankfully doesn’t make much noise.   I recorded a total of 12 rowing cycles on two different ‘wave’ settings (I’m still not sure what the different ‘wave’ settings mean) at the lowest tension level, with the results shown below

As shown in the above plot, the peak tension reading was around 18Kg (about 40 lbs).    I’ve included a short video of the test below.