Sunday, December 31, 2017

Daft Punk Helmet build

How about something completely different?

Here's a silly project I rushed together for Halloween '17 (only posted 2 months late, a new record!). I've never really made any costume prop  projects before, so I learned my fair share of Bondo, sanding, painting, and ergonomics lessons. We're all human after all, right? With a busy schedule, I really didn't have enough time to complete this to the level of detail I wanted. In the end, it came down to the usual late night rush to get it in presenting order. It was a fun process nevertheless, so please enjoy the pictorial timeline below:

Like any good new 3d printer owner, I was eagerly perusing Thingiverse for instant gratification projects when I came across "Daft Punk Thomas 3D Printable Wearable Helmet" by bendiger (thanks!). Instant gratification might be a stretch with this one, but between the well designed .stl files and an excellent instructables build guide built around this model I decided to give it a shot.

2-3 weeks of 3d printing in
My 3d printer, especially when printing at high feed rates to finish by the deadline, leaves something to be desired with dimensional accuracy. While the pieces are designed to be zip tied or bolted together, I opted to hot glue fit them first (to maintain flexibility), then epoxy and fiberglass the inside for the final connection. This was a mistake, as I learned later in the process.



For the LEDs (because of course it needed LEDs), I opted to stray from an authentic representation of the Thomas Daft Punk helmet and instead go for maximum obnoxiousness. Amazon has a cheap 1-wire protocol addressable RGB LED flexible matrix product that happens to be about the right size, as well as the same LEDs in ring form for the ears. Both of these products are compatible with the Adafruit NeoPixel and NeoMatrix libraries.


Fit check selfie
The Y-height of the matrix was a little tall for the helmet. Because the LEDs are addressed in a snaking fashion up and down the columns, it would have been a major pain to snip off a row and resolder the connections. Instead, I opted to just offset the matrix further back into the helmet and adjust the code to not illuminate bottom or top rows when showing things like text. 

To get this out of the way upfront: no, you cannot see when wearing the helmet. There's no way to poke holes in the matrix, the helmet slits below the matrix only let you see peoples legs and the ground, and I ran out of time to get a camera and internal LCD screen working. I found that typically though, people are too blinded by ALL THE LIGHT AND BLINKING to notice you stumbling.

Beginning the fiberglass layup
With the helmet tenuously glued, I laid up a thin layer of fiberglass on the interior. While strong, the resin and fiberglass mostly laid flat against the surface, rather than getting into the "root" of the joint between panels (as it was still filled with hot melt rubber). Like a weld, poor root fill doesn't lead to a strong joint.

Next up was the Bondo. I've never worked with the stuff before, but I was impressed by how quickly it would dry to a sandable state and how much you could remove with ordinary sandpaper. The smell and dust, however, was substantial. A respirator and adequate ventilation are a good idea.


One quick sanding session later

My first round with the Bondo I only applied a thin smearing over the interface between different panels. It quickly became apparent that sanding the PLA helmet pieces to remove 3d-printing layer lines was a substantial task, as was blending it with Bondo'd areas. I ended up recoating the entire helmet before settling in to a 2 hour sanding session. I picked up Harbor Freight's cheapest palm orbital sander, which ended up being essential for the early sanding stages.

Proud of my sanding job, I primed the helmet, waited for it to dry, and came back to check the result.


It wasn't great. Gaps, scratches, and high spots were everywhere. I gave a small section a spray with metallic spray pain, and the imperfections were amplified even more. There were only a few days to go, but I couldn't have been proud of a final product with such flaws. Hating myself, I re-sanded everything again, until the lowest spots were back down to bare plastic.


After many hours of Bondo'ing, hand sanding, and repeating, I finally had a result I could accept. I don't have any pictures of the re-primed helmet (because it was late at night by that point), but I went ahead and started with the metallic spray.


I ended up giving the helmet 2-3 coats of the metallic spray to get the best finish possible. To speed the process, I set the helmet out in direct sunlight for half an hour to dry. When I returned, to my horror, the helmet sections had started shifting in the heat, spreading and rising like tectonic plates. Visible lines were appearing all over the joints, some even cracking. The hot melt glue had softened in the heat, releasing stress between the pieces and allowing them to flex against the fiberglass. Without many other options, I cooled the helmet back down again and resanded each visible joint, following up with a touch-up paint job. There are still faint lines visible from this incident.

Before any more harm could occur, I decided to start installing the LEDs. I began with the ear rings, 3d printing a 2 layer thick diffuser that could be glued over the tops of the LED rings to spread the light. Both ear rings were run by an Arduino Nano I found laying around, and I wrote a spinning animation with a fading trail to get a cool effect:


Next came the front matrix, which was glued in place and wired to a separate Nano on the interior. The one-wire protocol running these LEDs is very timing sensitive, and I found I couldn't get animations as fast as I wanted on the big matrix if I tried to run everything off a single Nano. Luckily, I had expected this and soldered into two microcontroller sockets on the helmet's protoboard. To power the helmet, I re-purposed a 4S quadcopter lipo that I could conceal in my pocket. I added a replaceable 5A automotive fuse holder inline as close to the lipo as possible. Theoretically, the front LED matrix could draw up to 15A, so I only programmed animations that used lower power and turned down the brightness to avoid permanent eye damage.

Even for low power systems, it's always essential to fuse high current capable batteries, especially if you're carrying them on your person. Relying on the wiring running next to your face to act as the fuse when a downstream wire shorts is an undesirable failure mode, as is waiting on the battery to self-limit current. Especially as the accessibility of lipos has increased, it's alarming how many hobbyists are using them unfused because they don't expect their project to draw much current or don't understand the risks.

To bring the voltage down to acceptable levels for the LEDs and Arduino voltage regulators, I used an inexpensive DC-DC converter from Amazon. The reviews online warned of a tendency for capacitor explosion, so I started by bolting on an aluminum cover that would hopefully at least catch the shrapnel if that happened. I added Kapton tape to minimize the risk of touching and shorting components, then ran it under load for an hour ahead of time to make sure it stayed cool and seemed reliable.


This was thankfully uneventful, so I located the DC-DC in an ear cavity and ran the helmet's internal wiring.

Selfie #2
After another fit check, 2 things were apparent: internal padding was needed to keep the face from drooping, and it quickly got hot inside. With one night to go, I threw in some insulation foam and scavenged a computer fan to build into the chin.


"Danger fan", as I termed it, had a bad habit of grabbing fingers, hair, and glasses as I squeezed my head into the helmet. Fortunately, it was just me wearing it, so I accepted the paper cuts and moved on to programming some animations.I also produced a visor to go over the LEDs. Unfortunately, I ran out of time to tint it a darker color and my attempts to add diffusing to it didn't go well. I ended up wearing the helmet without a visor, and it don't think it affected the result too much.

The lights don't show up great on camera, and I don't happen to have video of the final product at the moment. When I do get around to getting some video, I'll add a link here.

I have renewed respect for all the unbelievably detailed and meticulously made costume helmets on the internet. Most of them put my efforts here to shame. If it were to make this again, what would I do? Probably print carefully, do a much better initial job at Bondo'ing and sanding, and improve the fit and finish quality of the interior. And not use hot glue. At all. The reflectivity of my paint job is also a far cry from the actual article. But most of all:

Work it harder, Make it better, Do it faster...and probably make it stronger.


Sunday, October 15, 2017

3d printer updates 4: It's over, it's finally over.



2014 called, it wants me to finish the 3d printer.

...

Fine, but only so I can move on. After all, I didn't drop over $1.5k and (metaphorically) lug this box across the country just for it to take up valuable floor space:


A quick recap of this project: 

Back as a sophomore, at the height of the 3d printer buzz (or so it felt at the time), I decided to make an overbuilt FDM printer. In the absence of any prior 3d printer experience, the result was a semi-functional but eternally unfinished machine. About once a year I picked it up again for a few weeks and made some minor progress. As frustrating as it is to work on a project I'd design very differently today, I'd rather have a final product at this point than a never ending cycle of changes.

Picking up the pieces from the last work session started with...picking up pieces from all the boxes and corners they'd floated into. I replaced a few things immediately. The electrical enclosure was upgraded to my favorite inexpensive hinged box. After messing around with last post's improved hot end cooling solution, I gave up and just bought a new, better extruder. The tensioning arm and idler on the inexpensive AnyCubic MK8 fixes most of my gripes about the old extruder I spent so long fighting with. As a bonus, it played nicely with the same mounting plate cutout so the swap was relatively painless:



After a day or two of rewiring, tidying, and mounting the new extruder, the firmware battle began. I settled on the Repetier firmware, which was fairly quick to get up to speed with. One challenge was figuring out how to convince the machine to zero the Z axis at the bottom of the bed's travel (where the limit switch was) with an appropriate offset so that it could raise the bed again up to the extruder. Most sample settings I found online were for machines that raised and lowered the extruder instead of the part and kept the limit switch at the other end of travel. At one point, I thought I needed to treat the position with the bed touching the extruder as Z0, with the negative Z being the bed moving down. This would make the position at the limit switch Z-330 (in my case). My mistake was interpreting this as Z_MIN_POSITION in the code. It also made me think I had to flip my Z axis direction around, which wasn't necessary.

In reality, I found that I needed to maintain Z positive as the bed moving up toward the extruder, Z max being the lowest position of the bed (touching the limit switch) and Z min being the bed touching the extruder nozzle. This means that the bottom of the bed's travel (which I think most would call the maximum position of the bed relative to the extruder) should become position 330. This puts the machine in the confusing situation of considering the extruder height position zero and the limit switch position 330, yet move up when you give it a Z10 command (for instance). My recollection of G-code is pretty shaky, so I'm going to chalk this up to something I'm missing when I type in manual G-code commands.

The combination of numerous similarly named constants in the code and very minimal constant documentation (that I could find) made this unnecessarily difficult to debug. In case anyone is similarly confused, here were the relevant config.h lines for me:

#define Z_HOME_DIR 1 //Home downward
#define MIN_HARDWARE_ENDSTOP_Z false //No limit on min
#define MAX_HARDWARE_ENDSTOP_Z true //Limit switch on max
#define Z_MAX_LENGTH 330 //330 mm of bed travel between limit switch and extruder nozzle
#define Z_MIN_POS 0 //Bed touching extruder is the min position, so make this zero

Once the coordinate system troubles were behind me, I ran into another old friend, z-axis binding. Due to the unnecessarily heavy duty components used to make up the z-axis linear guide system (looking at you oil-infused bronze bushings) and the weight of the bed platform itself, the z axis has needed a couple modifications in the past. As I began to test, I quickly found that the z axis stepper driver kept overheating and cutting out at the currents needed to drive the axis without stalling. As a remedy, I enabled 16X microstepping on the driver. This worked very nicely, and also minimized the terrible grinding noise that the motor was previously prone too. I did still notice the occasional overheat after this during long prints. Modifying the firmware setting to disable the z axis between movements seems to have solved it once and for all. One benefit to a hefty leadscrew and high radial load (but not necessarily low friction) bearings is that there's no backdriving or movement even with the motor turning off between layers.

Okay, back to the fun stuff. With firmware sorted and high expectations, I pressed start on my first print:

It might be a mess of plastic noodles, but it's my mess of plastic noodles. The above effect was caused by mis-tuned X and Y motor parameters and a mechanically slipping drive belt. With those sorted, the "ramen" result went away.


 

Gradually.




Some incorrect steps per mm led to my companion cube ending up a little squashed. This was eventually remedied.




Even with correct firmware parameters, I still noticed some disturbing variation in z height. I did a quick study to find the z movement accuracy, revealing that there really wasn't any. I could see up to almost 10mm of variance in parts, and it seemed to compound with different steps and direction reversal. A little head scratching led to an "oh-duh" moment. Back in the day when I designed this machine, I intended to use a solid coupling between the motor and the leadscrew. As usually happens in the real world, the motor shaft did not end up being perfectly co-axial to the leadscrew, leading me to add a helical coupler between the two at some point in the past without fully considering the ramifications. While the helical coupler transmits torque despite angular misalignments, it also acts as a loose spring in the axial direction. I've seen helical couplers used successfully in other printers without axial constraining, but they were typically supporting light loads in compression. To solve the problem, I started by disassembling the z axis and machining the upper and lower leadscrew pass-throughs to accept pressed bearings.







Easy enough. Now I needed a way to constrain the leadscrew against the inner flange of these bearings. My first attempt at turning a shoulder on the leadscrew was a disaster. The steel was far too soft and quickly bent. Instead, I found some conventional shaft collars and faced them off partway, leaving a small ring protruding out one side that could sit against the bearing.


I installed these onto the leadscrew, taking care to ensure there was no perceivable gap between the collars and bearings at either end that would permit wiggle.



It seemed to work. Results weren't spectacular, but they were usable. Over the next two weeks I kept tweaking the formula, trying different speeds, accelerations, retraction rates, materials, layer heights, and just about everything else I could think of. Eventually I got the results to a point that I believe was close to the best I could expect from the machine.


I could go on for a while about the imperfections in print quality. The machine vibrates too much, leading to layer inconsistency. The bent leadscrew creates a slight bump out when the bed raises past a certain point, creating telltale shifts in layer position. Unnecessary gantry mass makes acceleration slower than it could be. Using an imperial pitch leadscrew with metric-centric firmware leads to small rounding errors that show up as layer z-height differences.

Despite this, over the past few months I've gotten a huge amount of use out of it. It's a joy to be able to hold prototype parts in my hands a few hours after designing them. Unlike the CNC mill, it requires little supervision and set up. With the addition of a server running OctoPrint, loading up parts and monitoring progress is easy. It's also been remarkably reliable. I'll usually run it unattended for 10-12 hours a day, every day. 

In summary:

Was this a practical use of time and money for the end result? No.
Is the quality of this 2014-era homebuilt machine as good as what's on the market now? No.
Would I spend time rebuilding this project again to make it way more awesome? No.
Was it worth it?

Yes, I think so. I actually learned a huge amount from the project, especially in the design and first revisions back in college. It's satisfying to have a highly functional end result that I can make use of every day. Even the process of going back and considering all the things I would change has been refreshing. It's also character building to go through the pain of rediscovering how the last 20% of the project contains 80% of the work, as usual.

With that said, it's ultimately a tool, and spending most of your time making or fixing the tools makes it difficult to actually accomplish anything with them. I look forward to buying an off-the-shelf printer in the near future to increase my prototyping output.





Wednesday, August 10, 2016

HiTorque Mini Mill CNC Conversion

About 6 months ago, I became the proud and excited owner of a HiTorque Mini Mill from LittleMachineShop.com.

New life goals include buying more things that come on pallets
Owning a mill has been a goal of mine since sometime in high school. Getting to work on full sized manual and CNC machine tools in college only further prioritized this goal to a need. It also revealed that while my manual milling work might be passable, the speed, precision, and geometric flexibility afforded by a CNC setup would be invaluable as my projects became more ambitious. After months of consideration, this was the route I chose to get there. There was essentially no design or analysis involved with getting this tool set up, so the following isn't much more than an annotated slideshow.

But first - the details people actually want to know about:

The Tool & Tooling
1 x Mini Mill - $895.95 (plus ~$200 or so for residential shipping!)
1 x Drill Chuck - $10.95 (I was a dummy and bought a second not realizing one came with the mill)
1 x Tooling package - $229.95
1x Dial Indicator - $24.95

The Conversion Equipment
1 x CNC fusion Mini Mill Kit #5 - $655 (You can pay a little extra for pre-loaded ball nuts, which I did)
3 x "Green Monster" Stepper motors -$224.85 (total)
3 x "MondoStep" 4.2 Bi-polar stepper drivers - $239.85 (total)
1 x 40V 10A Linar Power Supply - $89.95
1 x PBX-MX Parallel Isolated Breakout Board - $69.95
3 x IDC Mondo Cable Kit - $50.97 (total)

The Random Amazon/McMaster Stuff 
1 x Generic Cheap Grey Enclosure - $27.43
1 x Bag of  Tiny Cable Glands - $5.12
1 x Extra Clicky Limit Switches - $6.08
1 x IDC Female Sockets - $11.95 (I find myself looking for excuses to use these everywhere now)
1 x Colorful Ribbon Cable - $10.95 (Complements the IDC sockets)
1 x Uncomfortably Cheap E-Stop - $5.92
1 x Extra misc. parts and fasteners - $100

Total: ~$2,659.82 (shipping not included)

A few thoughts:
-Don't skimp on the tooling package, that was an awesome value for what you get
-CNC Fusion is run by some very nice people who produce really high quality kits. However, turn around time seems to really depend on how busy they are, so consider ordering well in advance.
-Probotix seems a little overpriced, but for peace of mind and a deadline constrained build, it worked out
-The PBX-MX board works fine, but it makes me sad that the CNC world still hasn't really advanced beyond the year 2000's communication standards. If I were to do it again, I'd pay up a little more for something USB capable.
-That linear power supply (at least at the time) was supported with absolutely no documentation, which is a shame, because it wasn't immediately obvious to me how it should get wired. Check out the images below if you're in the same boat.
-Yeah, that IDC cable kit is silly expensive...but at least it looks nice.

So were the results worth the price tag? For me, absolutely. I suspect that will also be the case for anyone else who looks forward to putting in the time to assemble a setup like this. That doesn't mean that there aren't potentially better options out there for different needs though. I spend a good deal of time looking at CNC solutions in the sub-$10k market, and for me it came down to the following highly oversimplified chart:


Here's how the conversation goes in my head:

I don't have the time to design and built a Bridgeport conversion kit from scratch, or the money to buy an off-the-shelf solution. I definitely don't have that kind of space availability either. I've done the CNC router thing before. Although I donated my Franken-ShapeOko creation to a student team a few months ago, I wouldn't be opposed to buying/making another in the future. But those machines still lack the spindle power and rigidity to pull off more demanding machining. The Tormach machines have been documented to death on Youtube as being awesome and surprisingly capable for the price. But that price (especially with the addition of tooling and peripherals) is too high for me right now. One day I'll probably be ready to make the investment, but I feel reasonably confident that that day is far enough away that I'll have gotten my money's worth out of the mini mill by then. Of course, it could just be that my impatience is making up justifications to buy now...

(Just as a note, LittleMachineShop does also sell a Sieg prebuilt CNC option, which seems to fall into the cost and capability space between a benchtop conversion and Tormach. Unfortunately, it has a fairly limited y-axis travel distance, which was a deal breaker for me.)

The Documentation

(Please note that this is far from comprehensive. Just a quick tour of some of the highlights from the build)



It turns out that I don't have the patience to do nothing while waiting for parts to arrive. So instead, I built this big box to hold the mill. The idea was to have big sliding doors with polycarb windows to seal off the machining area. I never got around to installing the doors because....


The conversion kit was here (not pictured: lots of additional parts). Following the CNC Fusion assembly guide in parallel with a video guide, I took apart the brand new Hi-Torque bed.


This was a fun and informative process. I'd not seen gibs before, nor how the leadscrew nuts were retained. It turns out they're allowed to float in machined slots on the x and y axes (visible with nuts still installed above), before being tightened down with set screws once threaded and aligned with the leadscrew.

Slightly more detail of the x-nut slot
Fitting in the ballscrews basically involves reversing the previous process with some new hardware, except with ball nuts.


And grinding. Somewhat excessive amounts of grinding. To be fair, the instructions note that the y ballscrew is slightly too long for this model of mill. A small relief has to be put at the back of the base for it to fit.


It doesn't hurt to grind a little more than you think is necessary. I probably stopped before I should have, and now get very occasional grinding noises from the y ballscrew if I approach the max table travel. It doesn't seem to affect performance, and it's not quite annoying enough to convince me to take the whole thing apart again.


Mounting the z-axis is probably one of the trickiest steps, as it requires somewhat precise drilling into steel that doesn't want to be drilled into. I messed up one of the holes by using a wandering dull drill bit, so had to make full use of the slotted mount points on the z-block. Getting the mill head support block aligned with the ballscrew and the z-block was also slightly time consuming, and took a little fiddling before I got clean up and down operation. Clamping the head or resting it down on a block is probably a good idea for safety.


And suddenly, a nearly complete mill appears. Installing the motors and lovejoy-couplings was fairly uneventful. A single bolt on a motor mount block was bent from shipping, but it was redundant and easy to replace.


In parallel with the machine, I was making progress on the control box.


It's not perfect, but I think I did an acceptable job at keeping things neat. I used a scrap piece of plastic to act as a back plane in the enclosure. The E-Stop and main power switch are mounted on the outside facing the operator, while the parallel port and stepper lines exit near the back.


The crucial shot. No, that's not the stock fuse...


The E-Stop really is a must. It saved me from countless crashes during the "getting to know you" stages of Mach3 wrangling.

All told, I'd guess the built took 2 days going at a slow-medium pace. True to my expectations, the debug period involved about another 3 days of playing around. As my experience grew with the software and the controller layout, it became much more convenient to use.

For my first "test" project on the machine, I machined a LED lamp casing for a friend. It involved some tricky to fixture and indicate parts, as well as gave me a chance to get familiar with Fusion 360 CAM. 

Material prepped on the lathe

Temporary clamps to spot drill holes




It's a good idea to protect nearby outlets from flying aluminum chips
Some deep inner and outer cuts, plus fixture plate action



The finished piece
 Overall, I was pleased with the surface finishes being produced by the machine. After completing the piece, I noticed some x-axis slop that I then corrected for. I think that it should be fairly easy to get within a few thou on most parts with this setup, and that's perfect for most of the work that I do. A couple annoyances I discovered:

- Jogging with the mouse and keyboard is frustrating. I might invest in a peripheral for this.
- Resetting the tool height for every tool is extremely time consuming, and increases the risks of crashing because I have to stop and restart the program from a certain point. I started outfitting certain endmills with collar stops (kind of like a cheap version of the Tormach Tooling System), which should allow me to get consistent tool heights.
- Using the drawbar to swap endmills is slow. I see the appeal of power drawbar systems. I often found it faster to just do drilling tasks manually on the drill press

Unfortunately, my time with the machine was limited due to winter break. Since then I haven't had the chance to do an accuracy or precision study on the parts the machine produces. Nevertheless, I'm extremely happy with how the conversion turned out, and hope to get years of prototyping out of it. If I ever spend some time making modifications or updates to the machine, I'll be sure to document those as well.