Sunday, May 21, 2023

Cube Pro Duo disassembly, part 1 - Escape from The Enclosure

I had the good fortune of finding a Cube Pro Duo for a low price, used.  The prior owner said the motherboard was blown, so it had sat unused for a while.  Even so, it wasn't all that dusty.  We lifted all 75 lbs of it into the back of my car, and off I went.

There are lots of videos out there about the Cube Pro Duo.  It's a big, heavy machine.  It actually turns out that The Claw was built using the top of this same kind of printer, so I'm familiar with its innards.  

I was able to slide it down a makeshift ramp to get it out of the car, and then put it onto furniture moving "glides" to move it into the garage.

The disassembly started with the removal of the build plate (just lift off), top panel (just lift up), and back panel (pull away -- it's held by magnets).  One of the magnets lost its adhesion, so be careful to make sure you have all of them.

My goal at this point was to just get the metal frame out of the enclosure.  I couldn't really address the electronics issues until I got the cube frame out.  (The power supply, motherboard, and other things are at the bottom of the cube frame.)

Step 1, of course: totally unpower/unplug the machine, and allow caps to discharge before proceeding.

I was able to tip the machine over on its back (onto a soft surface), and remove the screws holding the feet on the bottom of the enclosure.  The screws holding the feet in place also hold the cube frame to the bottom of the enclosure.  The feet themselves could just be pulled off after the screws were out, though one of them gave me a bit of trouble, because it had been mounted so tightly.  Fortunately, there was no glue involved.

This is the back side of the machine with the back panel removed.



There's a "Back, Inside Acrylic" panel (BIA) that houses clips for keeping sheathed cables and Bowden tubes organized  The BIA is bolted in place with a number of metal clips.  The clips then attach to the back edge of the enclosure.  I removed all those bolts that connected to the BIA, and loosened the bolts at the edge to rotate the clips out of the way.


One aspect of the Cube Pro Duo is that there's a lot of acrylic involved.  The acrylic parts can be broken pretty easily. 

I removed the screws at the ends of the metal bar that serves as a cross-brace for the BIA.



I started to remove the bolts that hold the BIA to the bottom posts of the steel frame, but realized it was too early to do that.

In order to get the back panel off, I would have to unhook all the connecting cables.  I started by pulling off the three plastic clips that held the Y axis cable sheaths in place.  These could just be pulled and wiggled off.  If they get hung up on the sheathing, you can reach in from the top and free them.


 Then, I removed the two screws and nuts that were holding the drag chain to the BIA.


I finally unscrewed the last bolts that were holding the BIA to the frame.  This would allow me to lean  the BIA outward and undo the remaining clips.  Or so I thought.  Be quite careful at this point.  It'd be really easy to get the BIA corner caught up somewhere, lean it outward, and crack the acrylic.


 

There is a small PCB at the top of the BIA.  I think that PCB is there just to hold a thermistor for measuring the enclosure temperature.  I started to remove the nuts/bolts that were holding it in place, but that was a mistake, so don't do that. 


Instead, if you lean the BIA outward, you can reach the clip that holds the signal cable to that PCB.    Unclip that.


The BIA is still not free, because it has clips that hold onto the sheathed cables and Bowden tubes.  I thought I could just pull out those clips in the same way as I had done for the little plastic clips earlier.  However, the Bowden tubes go through holes, not C clips, so to get this apart, I would have to thread those tubes through the holes.


The Bowden tubes were connected to a screwed-on ferrule along the Bottom Acrylic Plate (BAP).  Those would allow a proprietary filament box to feed acrylic into the tube from a known point.  The ferrules were zip-tied to the bottom, so I cut those off.  (Pardon the bad photography here.  The shadows make it look like there's a weird shape to the BAP acrylic.)


 I then threaded the tube+ferrule end through (below) the BAP, and then unscrewed the ferrule from the Bowden tube.  


I then threaded each Bowden tube through and out of the BIA clips.  (Note: even though it's a dual-extruder machine, it's set up to accommodate three extruders.)

There was a lot of bending and kinking of the tubes at this point, which was uncool.  I'm not sure if the bends were so bad that I will need new tubes whenever/however I reassemble it.

With the Bowden tubes out, I could gently pull the sheathed cables out of the clips, remove the clips themselves, and take off the BIA.

I wasn't sure what to to do move the frame next. 

The following things need to be done:

Where possible, unplug the stepper motors.  It helps in these steps to move the printer head carriage and Y gantry out of the way and it's best not to risk having current flowing back to the motherboard.  (In my case, assuming the motherboard truly was blown, I didn't really care, but did it anyway.)  It also helps -- but gets greasy -- to manually turn the Z axis threaded rod, thus lifting the build plate high and out of the way when needed.

Remove the upper bolts holding the power switch shield.  That shield holds to the side frame, and gets in the way of sliding the steel cube frame out from the enclosure.

 


Remove any remaining bolts holding the cube frame to the enclosure sides.  If I recall correctly, there are three on each side.



Remove the two lower bolts (one on either side) that hold the power switch guard to the enclosure side, remove the switch guard itself.



At this point, the frame is mostly moving separately from the enclosure.  There are just a few things in the way.

There's a USB and SD card connection on the left side at the front of the enclosure.  It's tricky to remove these.  They can't just be unclipped, because the upper board (USB) blocks removal of the lower board's (SD card) wiring.

What I did, which may not have been right: first, unclip the upper board cable.  Then, with some gentle nudging plastic, the upper board can be pulled inward from the enclosure side and removed.


This reveals the lower cable, which can be unclipped.  You can leave the SD card PCB in place.

 In retrospect, it appears that the whole assembly could have been unclipped from the side of the enclosure with the wires in place.  It looks like the original assembly would have had the worker push this into place, clipping onto the metal (elongated octagonal) clip. So, maybe by pressing gently on that top tab, the whole thing might have pivoted inward.

Finally, there are a few more cords to be unclipped, the main one being the front panel display.  The wire bundle that goes to it is neatly hidden in a wire management thing.  But to unclip the front display requires disassembly of the display.  If you're looking to use this in the future, beware of ESD.

This is a not-so-great picture of the front display.  It's a little LCD panel and a single button.


On the inside of that, I took off four screws...

and then, with the PCB exposed, removed the screws that held the PCB (and display) to the front plastic


and then I was able to unclip the wiring from the front panel PCB.


All the wiring of the USB/SD Card and front panel displays has to come out from a nice, cable management thing so that the cube frame can be removed.  I can't remember exactly how that part worked, and kind of don't care because I won't be reusing those electronics.


Success! I was able to slide the cube frame out from the back of the enclosure.  It was still quite heavy.  You can see here that I used a few pieces of redwood fence board scrap to support the back of the cube as I slid it out.  Otherwise, the weight might have crushed the bottom edge of the back of the enclosure. 

A note on lifting here, too.  I would typically lift the cube frame using the front and back upper bars.  Avoid lifting with the "Y" axis bars (left and right), because they need to stay lubricated and there are belts and such that you don't want to damage.

In the picture that follows, you're seeing the cube frame in the foreground.  The drag chain still holds all three sheathed cable assemblies and Bowden tubes.  The view is from the rear of the printer.  At the top left you can see the empty enclosure.


With all that done, I'm not sure what the resulting weight was, but it was still heavy.  I slid it onto a furniture dolly, and moved it inside for further work.


Tuesday, March 7, 2023

Music box disassembly, spring "repair", and simulation

I picked up a copper-ish music box the other day.  It's made of decorative sheet metal and depicts a horse running out of a barn.  As the music box plays, if the music box could play, a horse and cart come out of a barn door and run around.  The barn door serves as the stopping mechanism (whereas for other music boxes they usually stick something in the way of the governor).

Tin (copper plated) horse music box, "King of the Road" with mechanism removed

The problem with the one I got was that the music box mechanism didn't work.  You'd turn the crank handle, and it wouldn't click.  After enough of a turn, you'd feel the tension increase a bit, but then it would "slip" and go back to feeling loose.

The initial cleaning and disassembly was easy.  I did a quick wipe-down of the exposed surfaces, being careful not to catch the cleaning cloth on any metal hook points.  As I was doing this, I noticed that the underlying metal isn't actually copper.  The whole thing appears to be electroplated in copper in some way, and then left looking "rustic".

The next step was removing the music box assembly.  To get there, I removed the "horse assembly" from the music box.  As it turns out, that part is held on in a "righty-loosy" threading, so I heated up the joint area (just in case there was glue on there), and then rotated the assembly clockwise to take it off.

To remove the music box wind-up handle, I was able to find a way to hold the opposite end of the crank shaft.  Then, I could rotate the handle counter-clockwise and remove it.  After that, it was just a matter of taking out a couple of screws that held the mechanism to the barn.

This next picture shows the horse assembly reattached to the music box mechanism after both parts were removed from the barn.

Horses and cart connect via an arm to the mechanism (righty loosey)

 


 

The mechanism was a little dirty, so I did some careful cleaning of the joints.  Its spring housing is marked "Tokiwa", "JAPAN", with what appears to be an image of Mt Fuji.


 

Unlike many modern, cheap mechanisms, the spring housing is metal, and the initial multiplying gear is metal with a very fine pitch.  The only plastic gearing piece is the one that connects to the wormgear / governor.

Besides those characteristics, the main oddity of this mechanism is that the "music barrel" (the cylinder that has the pegs that pluck the tines) has a shaft extending outward.  It's that shaft that connects to the horse assembly.  It's held in place by a bushing, and the bushing is held onto the assembly with a set screw.  


 

Remove the set screw, and you can pull the bushing out (along the axis of the spindle).  

With set screw loose, push barrel assembly away from spring housing...

...and slide bushing off

 

Then, the barrel/spindle assembly can be rotated out by sliding the spindle out through a gap along the side of the mount.

 

Pivot barrel through slot

Barrel and bushing removed

I assumed the spring was broken or otherwise disengaged from the mechanism.  So, manually turning of the barrel was feasible (and wouldn't overwind or underwind the spring).  It sounded like it would play "King of the Road".

I removed the barrel and bushing from the mechanism, and then wasn't sure what step to take next.  I had hoped to take the barrel to another, similar mechanism, but ran into these differences with my little collection of mechanisms:

  • Wrong gear.  The one I have is fine pitch and metal, and I only have two others like it.  Most others are plastic and have fewer teeth.
  • Mount has the wrong hole diameter for the spindle.  This one has to have enough room for the bushing, and needs a set screw to hold the bushing.  All my other mechanisms have a hole that's smaller.
  • Needs a gap for the long spindle end.  Since this one has such a long spindle end, it can't just be threaded through the mount hole.  It needs a slot chopped out of the side, and the slot has to be at least as large as the spindle (not including the bushing).

All in all, that left me thinking: maybe I can fix the spring assembly.

I looked around and didn't find any web pages that explain how to remove and replace the spring housing from a music box.  From what I've seen, all mechanisms, whether old or new, have the spring housing riveted onto the mechanism frame.

I chose to drill out the rivets.  I had no idea what drill size to use, but picked a small one, put it on the drill press, added some WD-40 to lubricate, and gently went in.  Eventually, it got in, at first piling up a "splash" of metal, and then eventually yielding metal ribbons.  I didn't drill all the way through, but was sure to drill deep enough that I could go through later if I wanted.  I used flush cutters to remove the "splash" and filed down what was left.

Heads of rivets (that held spring housing down) drilled and filed off

In retrospect, I probably should have tried to file (or grind with a Dremel) the rivet heads down slowly, instead of drilling.  I got one of the rivet holes pretty well centered, but the other one didn't go so well.

With the rivet heads mostly gone, I was able to pry up the spring housing.  It popped off one side pretty easily, and with some stronger encouragement I was able to get the other side off.  Fortunately, the housing wasn't glued down elsewhere.

I thought perhaps once I had it off, the spring would want to jump out and make my life really difficult.  But, there are still other pieces in there.  The way it's assembled, there's a crank shaft, a plastic piece that helps the "click" mechanism (call it a ratcheting mechanism), a beveled gear, and the spring.  The crank shaft hooks into the spring, when it's working properly.

The first obvious problem was that the ratcheting mechanism had broken into two pieces.

Broken ratcheting thing

Then, I found that the spindle and beveled gear weren't engaging the spring.  I removed the beveled gear, and then saw that the inner loop of the spring simply wasn't within reach of the spindle's hook.

I took out the spindle, and then gently nudged the inner coil of the spring more towards the center.  I did this by sticking a very small screwdriver between the spring coils, and just prying the inner coil section inward.  I wasn't sure if it would bend enough for that, and I was afraid I would break it.  But, just a little bit of bending was needed.  After enough of that, I was able to put the spindle back, and feel it hook on.

With that in place, I was able to put the beveled gear back on.  This kept the hooked spindle and coil in place.

The ratcheting mechanism is a whole different problem.  I'm not sure what kind of plastic it's made of, but it seems like it has to be tough yet flexible -- kind of like cutting board plastic.  Initially, I tried using CA glue (superglue) but was pretty sure it wouldn't work, and it certainly did not work.

Glued ratcheting thing - looked promising but couldn't take the strain

Then, I tried the "soldering iron" approach, melting edges across from one piece to the other.  That also failed.

So now, I'm considering manufacturing a replacement by 3D-printing in ABS, or milling one out of cutting board plastic.  I'm starting by supergluing the halves together again.  That will let me place the piece in a scanner, and then build a model in Fusion 360.

Some measurements:

  • Spindle OD: 4.5mm 
  • Spindle OD with nub: 5.53mm
  • Channel Depth: 3.3mm
  • Outer Edge: 16.3mm
  • Outer Engagement (tooth tip to tip across center point): 15mm
  • Disc OD: 13.5mm
  • Disc OD to pawls: 14.6mm (With non-pawl radius at about 13.5/2mm, or 6.75mm, the pawl radius is about 7.85mm, which is more than the Outer Engagement radius of 7.5mm)
  • Disc thickness: 2.9mm (which is less than Channel Depth, so that's good)
  • Arm thickness: 1.5mm (gives a gauge of how much plastic is bending)
  • Sweep to pawl: about 120 degrees

I'm also thinking that I could find a replacement in some other music box mechanism, but these mechanisms have evolved, too.  This great YouTube shows the inner workings of a music box, and the newer ones have multiple catch points.  Mine only has one catch point, and one connection point to the spindle.

Since the mechanisms have evolved, I'm afraid the only source for a replacement piece would be one of my other old, metal music box mechanisms.  I only have two left.  One plays the Happy Birthday song, and its housing seems smaller and incompatible.  The other one plays "Somewhere My Love" from Doctor Zhivago, and it just feels too pretty to hack apart.  It's hard to want to sacrifice "Somewhere My Love" for "King of the Road".

Simulation

While I pondered how to repair the ratcheting mechanism, I decided to revive an old project idea: simulating a music box in software using sampled sounds.

Having removed the barrel and spindle separated from the mechanism, I had direct access to the tines, so I could pluck them individually.  In this music box, there are 18 tines, and that is typical of little music boxes.  I could pluck each one with the tip of an old, fine-tip nail.

I tried to get a decent sound recording environment, so that meant removing batteries from noisy clocks in the room, and turning off the forced air heater.  The only other controllable ambient noise at that point was my computer fan, but it was negligible and non-spiky.

I put the mechanism atop a wooden box to get some sound resonance, and stuck my phone inside the box cavity.  Then, I just recorded a video with all the sounds.  The phone recorded an .mp4 file.

Along the way, I found that some of the tines produced the same tone.  It was set up this way so that repeated notes could be done in rapid succession.  (Otherwise, the tine could hit a barrel peg while still vibrating.)

I transferred the .mp4 file to my computer, and then loaded it into Audacity (after having first set up ffmeg for Audacity).  (I also got to fix the clocks that I'd disabled at this point.)

That allowed me to look at the different waveforms for each pluck.  I range-selected the best of each one, and then copied and pasted that into a new document.  Then, I mixed the stereo tracks to mono, hit Ctrl+A to select all, and did a Effect/Amplify to get consistent volume.  (There is one track where a few initial points were so loud that they needed special trimming to get auto-amplifying to work.)  Then, I zoomed in and trimmed off the lead-in silence, and set the overall duration of each track to around 2.5 or 3 seconds.

In some cases, additional silencing was required, where unusual background noise was seen.  That just amounted to range-selecting an area and hitting Ctrl+L to silence the track.

I exported each tine waveform to its own .wav file.

In general, I named the files based on the tine that was plucked.  I chose a numbering system where 1 was the longest tine (lowest tone), and 18 was the shortest.  Afterward, I also compared the sounds to an online tone generator (e.g., https://www.szynalski.com/tone-generator/) so I could know which octave and note was being played.

Even without knowing the specific note, I could watch the barrel pluck the tines to know what was being played, and roughly when.

To get a better idea of the timing of the notes, I looked at online sheet music on different sites.

Thoughts on wave combination

I ran across some pages that discussed the pydub module.  It looked promising, given that it could overlay one waveform on another.

My first thought on how to combine the sounds was like this:

  • Each tine is its own waveform
  • A "pluck" of the tine happens at some time n
  • The next pluck might happen at time m.
  • Set up a silent wave of time n
  • Save lastTime as n.
  • Append the tine's waveform and get its duration d
  • Go on to the next occurrence of this tine (time m)
  • If lastTime+d > m, then truncate the built waveform to lastTime+d, and append m.  Set lastTime to m.
  • If lastTime+d <= m, then add a silent waveform to bring the length to m, and then append.

With that approach, I'd set up 18 songs, one per tine.  Then, I'd overlay all 18 at the end to make a combined song. 

In experimenting with that, I found that the AudioSegment.overlay() function in pydub was doing strange things to the overall added wavelength.  For example, if you overlay a short waveform atop a long one, it truncates to the length of the shorter waveform, thereby risking loss of long resonance.

Second approach to wave combination

As it turns out, the AudioSegment.overlay() function takes a position argument that does what I want without all the complexity above.

  • Create one big silent waveform
  • Go through the song one note at a time, knowing each note occurrence's measure number, start position within the measure, and tine number (or tone).
  • Compute a time offset based on measure and within-measure position.
  • Overlay the tine's waveform on the big waveform
  • Repeat

This approach also allows for chords (just have two tones played at the same time point), and arpeggios (allow a slight offset).

Initial overlay experiment

As an initial experiment, I wrote the following Python code.  It does these things:

  • brings all file names into an indexable array
  • sets up the long, silent waveform
  • walks the tines in reverse order (so, highest tone down to lowest)
    • overlays that tine's sound onto the main waveform
    • positions the next waveform 60 milliseconds later 
  • exports the waveform in mp3 format using 128kHz frequency.

Song Experiment 1

My next step was to construct the actual song rendering.  I also went to a python dictionary approach, rather than using an indexed array.  Eventually, that will allow me to reference notes by name, rather than number.

For the timing, I set up an array of elements, each of which represented (measure number, eighth note number, tine number).  The measure numbering starts at one.  The eight notes are numbered 1 through 8, and allow for fractions.  The choice of eighth notes just worked well for timing representation because the King of the Road music is written that way.  The fractional timing of the eighth notes allowed for things like grace notes and arpeggiated chords.

Here are the tones:

filemap = {1: "1 D5.wav",
2:"2 E5.wav",
3:"3 F#5.wav",
4:"4a G5.wav",
5:"5 A5.wav",
6:"6b D6.wav",
7:"7 D6.wav",
8:"8 E6.wav",
9:"9 F#6.wav",
10:"10 F#6.wav",
11:"11 G6.wav",
....

18:"18b E7.wav",
19:"19 high F#7 from 3.wav"
}

Note how the "F sharp octave 6" value appears on both tines 9 and 10.

Here's a snippet of the "song" sequence:

song = [
[1, 3,     16], # Trail
[1, 4,      9],  # ers
[1, 4,     13],  # ers
[1, 6,      3], # for
[1, 6.125, 10], # for
[1, 8,      5], # sale
[1, 8.125,  8], # sale
[2, 3,      9], # or
[2, 4,     11], # rent
[2, 4,     13], # rent

[2, 5,      4], # embellish
[2, 6,      3],
[2, 8,      2],

[3, 3, 8], # rooms
[3, 3, 15], # rooms
[3, 6, 13], # to (F)
[3, 7, 14], # le- (G) let
[3, 8, 12], # -et (F)
[4, 1, 6], # fif (D)
...

]

(The tone notations above, e.g., D, F, and G, are based on what I saw on sheet music.  The IRL tine tones actually are about three half-notes higher.  For example, tine 3 on sheet music for the word "for" is a D on sheet music, but is "F#5" in reality.  The beauty of music transposition is that if everything shifts an equal number of half tones, it still sounds correct, but just in a different key.)

With all that, all that was left was to define an overall tempo, which I chose to mean "number of seconds per measure".

Then, the computation of the time offset since start was easy:

time = ((measure-1) + ((beat-1)/8)) * tempo

millis = int(time * 1000)

Then, I overlay the tine's waveform at that point in time (in milliseconds).

wavSeg = AudioSegment.from_file(filemap[tine], format="wav");
newSeg = newSeg.overlay(wavSeg, position=millis)

Click here for the non-swing song


Song Experiment 2

The result of Song Experiment 1 was good, but not great.  The song is meant to have a swing beat.  Think of each pair of eighth notes taking up a quarter note of time.  In strict timing, the first happens on beat (at time zero), and then other at time 1/2 (halfway across quarter note, i.e., at the 1/8th mark).  In swing beat timing, the first happens on beat, but the second is 2/3 across the quarter note.

So, to get a swing feel, I just changed the timing computation based on which 8th note timing was in play.

  if ((int(beat) % 2) == 0):
    # even beats get "swing" feel
    # 2,4,6,8
    # become 1.33, 3.33, 5.33, 7.33
    # and then divide by 8.
    beatswing = beat - (2/3)
    beatpos = beatswing / 8
  else:
    # odd beats are right on time
    # 1,3,5,7 -> just do n-1 over 8.
    beatpos = (beat - 1) / 8

  time = ((measure-1) + beatpos) * tempo
  millis = int(time * 1000)
 

With that in place, the overall song sounded much better!

This is the "swing" rendition

What's next

I still want to machine/mill/3D-print a replacement ratchet piece and see if I can fix that original spring assembly.

If not, I may see if I can switch to an electronic representation of the music box, but still replicate the wind-up feel.

A 3D-printed replacement

I'm amazed.

I was able to print a replacement for the ratcheting thing.  It took me five iterations to get the measurements working.  In the end, I had about 0.4mm compensation for shrinkage of the hole around the inner spindle (tight squeeze at 0.3mm), and a 1.5mm radius on the hook nub area, where I'd measured 1.03mm.  I also modified the pawls to extend much farther outward, partly because the original sizes barely caught or missed the teeth, and partly because the 0.6mm nozzle in my 3D printer lost precision on the sharp tips of the pawls.

This is the sketch


and this is what the extrusion command looked like:


After extruding, I did some fillets at various points.  This is what the model looked like afterward.

The slice in PrusaSlicer looked like this:

After printing it, I had to file the inner nub hole a little bit.  I could slip the piece over the inner spindle easily, but getting it onto the nub took more force.  It ends up being a tight fit, but it didn't break as I forced it on.

With this in place, I could wind up the spring again!  So I reassembled everything.  I'm surprise that it hasn't broken so far.  What I have to do now is reattach the spring housing to the frame.  Without that, the tension sometimes causes the whole spring housing to jump off of the rivet posts.

I wound it up and was able to hear the music box's full song for the first time since I got it.  It's not perfect.  The pawls slip sometimes (I'm not sure why).  But it's close enough at this point for me to close up this project.

3D-printed part, Revision 6

Of course, I couldn't leave this project alone, knowing that the ratchet wasn't catching properly.

I took apart the spring assembly again, and got some pictures to add earlier in this write-up, and then took a closer look at why the catch was failing.

As it turns out, the pawls were engaging well when hooked onto a catch, but the design collided with a catch on halfway points (half clicks, if you will).  Pictures to help explain...

This is an example of good engagement, where the metal catch is hooked into the midway point of the pawl.


However, if I do a "half click", both tips of the pawl should reach the edge (in-between metal catches).  It's not doing that in the v5 design, because I had too much material in the way.


I finally paid attention and found that there are 15 teeth in the outer ring, meaning they're space 24 degrees apart.

I updated my design to add ticks every 24 degrees, and then modified the pawl catches to match.


 

With rev 6, this is what it looks like when the pawl is fully in-between metal teeth.  Now, the outermost pawl tooth is reaching all the way in, and engaging the metal catch well.


and this is what it looks like at the halfway point.  It doesn't show well in the picture, probably because of messy 3D printing, but it works well.

Now, to do a super precise job, I'd model the actual teeth, and rotate my model in F360 to make sure it's behaving properly, find some way to model the pawl arm and teeth position under tension, and fix the pawl teeth tips to more closely represent the 3D-printed result (tips must really be curved due to nozzle dimensions).

But now that it's not skipping, I think I'll go back to the issue of reattaching the spring housing.  I'm thinking a solder blob or two might work, if I can heat up the metal components enough to receive the solder.

Friday, December 2, 2022

Milling a propeller

I got a pretty cool (well, I think it is) metal biplane from the thrifting bins the other day.  It's yellow, and labeled "HG41" and even has a security tag on it, so it must be super valuable. 😉

When I got it, some of the struts were bent, and some of the edge sheet metal lips were out of sorts, so I nudged them back into place.

The biggest problem, though, was that it was missing its propeller.

So, I took it upon myself to attempt milling a propeller for it.  I could have 3d-printed one, but didn't want to deal with sanding down lots of supports, since I only have an FDM printer.

Modeling

As a starting point, I found a propeller somewhere out in the STL universe, and brought it into Fusion360.  It started as an IGES file.  Fusion360 allows you to just open that kind of file, rather than importing the point cloud into an existing model.

I'd downloaded the file as "push-propeller-1.snapshot.11.zip" and within there was a Prop.IGS file.

So... that's File > Open > Open from my computer... >  and then navigate to find the Prop.IGS file.


 

IGES to solid body

Immediately after loading it, you can do a Design > Solid > Inspect > Section Analysis and you'll see that it's not being treated as a real body.


 

To make it into a body, go to Design > Surface > Modify > Stitch, and then window-select the whole propeller.  Leave the Tolerance at 0.1mm and hit OK.  Now, if you do a section analysis, you'll see the banded lines that indicate it's a solid body.


 

You also will see in the Navigator area that there's a Prop > Bodies > Bodynn object that's been created, and wasn't there before.  Prior to that, it would have been Prop > Bodies > Unstitched (nn).

Scaling

I looked at some pictures of biplanes online, and with some math, I figured the propeller would have to be about 70mm long in order to look correct on the plane.  I used "i" to get information about the current length of the model, and it reported back at 294.753mm.


 

To scale it down, I'd need a factor of 70 / 294.753, which is about 23.75%.

So, I just did Design > Modify > Scale, and entered .2375 as the scale factor.

With that, I then re-did the "i" information measurement, and found its tip-to-tip measurement came back at 70.001mm.


 

I also then measured from one face of the hub to the other, and got 4.025mm.  I checked that against the propeller spindle on the plane, and found that that would work.


 

The hole for the spindle in the model measured out as having a diameter of 1.425mm.  However, the physical plane's spindle was a little more than 2.9mm.  I added a sketch, and created a new hole.


 

That was all that was needed for the modeling / design side of things.  I've been told there are propeller generators / plug-ins that I could use, but I just used the existing model on Thingiverse.

Milling

Milling something like this gets complicated, because there aren't great places to hold the work, and it has a lot of curvature on both sides.

After waffling on the "how" part of this, I decided to just cut the propeller out of good wood.

I modeled the stock for the propeller as 4.025mm x 8mm x 100mm piece of wood to start.

I had a stick of 3/4" x 3/4" maple laying about, and cut a chunk of that off.  I then roughly band-sawed it in half, lengthwise, to get closer to the desired 4.025mm thickness.

After that, I used F360 to Manufacture a surfacing operation to bring it to 4.025 mm thick.  (I don't have a planer, and besides, it's a really small piece.

For this operation, it was simple enough to just double-stick-tape the stock to my wasteboard.  One side was already quite flat.  The bandsawed edge was facing up.  I just ran the surfacing operation with 0.2mm steps to get it to where I wanted it.

I used the "hole" sketch from earlier, and drew a centered rectangle around the propeller to define the stock.  I added extra room so that I could put fiducial holes on each end, 4mm inside each edge.  The rectangle was 100mm wide, and 19.05mm deep (i.e., 3/4 inch).

(Note: the left-side hole is "19.05/2mm" from the bottom edge, and 4mm from the left.  There are lots of ways to do that.  I also just made a line down the middle, and then mirrored the circle to the other side.)

I extruded it as a New Body with 4.025mm thickness (based on measurements taken earlier).

and then added 1/8" (3.125mm) holes.  Having actual holes is useful when later using the Manufacturing functions to drill.


In the Manufacturing area, I started with the Setup.

Machine: Genmitsu ProVer 3018.  I had already set this up in some earlier project.  I think the main point here is that it's pre-configured to make the post-processing handle the G28 function the right way.

Operation type: Milling

Work coordinate system

Orientation: select X and Y axes (and adjust pos/neg direction afterward)

After choosing X and Y axes, I went to the Stock tab, and chose to dimension the stock based on the solid block I'd defined earlier.  This can have its drawbacks, though, if you choose to modify the model later on.

Then, back on the first Setup tab, I chose to set my origin as the bottom (lowest Y), left (lowest X), upper (top Z) corner.  That main thing here is that I'm defining Z origin as stock top.


 

Lastly, to specify the model, I selected the option in the dialog, and then clicked on the propeller body in the navigator.  That's more easily done in the navigator than in the viewport because of how the stock and propeller are overlapping bodies.


 

Mill operation 1: Drill

Drilling

Select 1/8" drill tool

Spindle speed 5000 rpm

Geometry: 

- Clearance: From Retract Height, 3

-  Retract Height: From Stock Top, 2

- Feed Height: From Top Height, 1

- Top Height: Hole Top, 0

- Bottom Height: Hole Bottom, 0

- Drill Tip through Bottom: Yes

- Break-through Depth: 8mm (because I have a thick enough wasteboard for this.)


The way I do this is to drill a deep hole into the wasteboard that's 1/8" OD.  That way, I can use an old, broken milling bit (1/8" shaft) as a pin for each fiducial hole, when I turn the board over.

Also, keep in mind the direction of the turn you'll be doing.  I set up these holes along the midline of the propeller, so the intent is to flip the board along the X axis.  It can be helpful to mark your stock with "top", "left", and "right" words so you remember which way to flip it.

Mill operation 2: 3d contour

I chose to use a 3d contour to hog out material.  

Tool: 1/8" flat end mill

Geometry:

Machine Boundary: Silhouette

Tool Containment: Tool Center

Additional Offset: 0.1mm

Model: check

Model surfaces: select the propeller body

Include Setup Model: uncheck

Heights: again, 3,2,1

Bottom Height: Model bottom, 0mm

Passes: 

Maximum stepdown: 0.2mm

Stock to Leave: yes, 0.1mm radial, 0.1 axial

Linking:

Uncheck Lead-In Entry

Uncheck Lead-Out Entry

Mill operation 3: Parallel

Tool: 1/16" ballnose end mill

Geometry: Silhouette

Tool Containment: Tool Center

Model: select propeller

Heights: 3,2,1

Top height: stock top

Bottom height: model bottom -- why?  I'm not sure, but it works.


So far, with these three milling operations, we've created fiducial holes and milled out the "top" of the propeller without going over the sides.  The Silhouette and Tool Containment settings kept things from cutting over the edge.

What I did at that point was: save a copy of the design to a separate project, flip both stock and propeller objects over, and then repeat the milling operations (minus the drill operation). So, you get two more flipside mills: 3d contour and 3d parallel.

When this milling is done, you still don't have a piece that will separate from the stock, and that's a good thing.  To do the final edge cutting, I added one more flipside milling operation.  I chose to make this a 3d parallel instead of a 3d contour.  A contour would mill around the edge, potentially cutting the propeller out completely as it's going around it.  I found that a 3d parallel would do more of a sewing machine movement allowing for more gradual removal of the connecting material.

Milling 4 = flipside 3d contour

Milling 5 = flipside parallel

Milling 6 = flipside edge cutout

Operation: 3d parallel

Tool: same 1/16" ballnose end mill we had in Milling Operation 5.

Machine boundary: Silhouette

Tool Containment: this time, use Tool outside boundary

Rest Machining: check

Model: select propeller

Heights: 3,2,1

Bottom Height: from Model bottom, offset 0.1mm

Pass direction: 45 deg

Direction: One way

Up/Down Milling: Down milling (not Both, not Up)

Multiple depths: check

Maximum stepdown 0.2mm

Stock to Leave check

Radial 0.1

Axial: 0.1

 

Here's what it looked like when milling.

Initial "top side" contour / hogout:

Flipside final parallel (edge cutting).  Note change in hold-downs.


After all machining is done, propeller still attached to stock.


I used a hobby knife to cut very carefully around the edges, where the CNC hadn't already gone through.

 

And this is what it looked like after sanding.


 

The propeller shaft on the plane actually was a little messed up, probably because the original propeller got torn off.  After a little filing, it got it smooth again, and the new propeller ended up press-fitting quite nicely onto the shaft.

 

Result

 




Additional notes

Well, based on a quick e-Bay search, it looks like this is the Curtis JN-4 Jenny Yellow S-02 Model Barnstorming Metal Biplane.

The pictures on e-Bay have a big ol' ugly propeller but maybe it's more authentic.

It looks like a real one can be seen at

https://www.militaryfactory.com/aircraft/detail.php?aircraft_id=980

and the propeller there is way fancier, having almost an ess curvature.  But that's a Jenny-4D, so maybe things changed.

Another can be seen at https://www.cybermodeler.com/aircraft/jn-4/jn-4_all.shtml

and yet another head-on at https://www.cybermodeler.com/aircraft/jn-4/images/mof_jn-4_01.jpg

Given the last one, I'd say my propeller is of proper dimensions, but reversed!  Mine is set up for a counter-clockwise motor rotation, but a real one goes clockwise (from the point of view of the pilot).  Noooo!!!!

Yeah.  I have to do it over again.  But now I know how to do it.  I'll probably re-do the mount points and change some speeds if I do it again.

Here's the curvy one.  It's called a Scimitar propeller.  What do you think the odds are that I'll find an STL of one of those?

https://www.historicpropellers.com/woodenpropeller-curtiss-jenny/

Mirrored and re-miilled

And so I gave in and just re-did the milling process.

This time, I bandsawed the material to about 7.6mm thick, so I re-did the surfacing to go from 7.6 down to 4.1mm.

I used the waste from last time's milling to figure out the positioning of the fiducial holes.  I also made the stock a bit longer (the full 100mm, where prior it was closed to 90mm).  Even then, I could probably really use a lot longer stock to allow for the clamps.  Also, I could have changed the surfacing to have even more Y reach.

The F360 operations were easy.  I did a "Save As" of the original project, and then added a midplane (along the long axis, XZ) and did a Create/Mirror of the propeller body.  I renamed the new body as "propmirrored"


 

and then turned off visibility of the original propeller.

 


From there, I just re-computed all the milling operations to be based on the propmirrored model.


 

The sewing-machine-style edge cutting milling operation didn't work as well this time.  That's probably a reflection (no pun intended) of how that last operation was set up for one orientation of the propeller at a particular parallel angle.

Here's what the not-so-great cut path looks like with the mirrored propeller.


You can see that there are a lot of cuts missing around the end points and about half of the hub isn't separated on +Y and -Y.

This is what it looked like for the edge cut on the flipped-material, non-mirrored model:


 Note how the entire hub has cut points, and a lot more edge is covered.

What I forgot to do was to modify the Parallel > Passes > Pass Direction setting.  I had left it at 45, and since the model was mirrored, I kind of had to mirror the milling angle, too.  By setting it to 135, I got behavior similar to the original, but for the mirrored model:

Anyway, the not-as-great milling of the mirrored, flipped model's edge left me with way more connected material, and needed more aggressive hobby knife work.

End result shown here.




Remaining steps

- Maybe take a shot at re-computing the point cloud to generate a scimitar-style prop

- Staining

- Is the plane missing a rear wheel?  I guess I have some 3d-printing to do.

An attempt at the scimitar-style propeller model

I looked at the IGES format of the propeller, and it's pretty cool but also quite complex.  IGES has different sections of data, some acting as directories into entities, and then those entities are definitions of geometric things and modifications.  Among the geometric items in this propeller's IGES file you find transformation matrices and various forms of splines and surfaces.  In short, it's not conducive to having operations done on a per-point-within-a-point-cloud basis.

Instead, I went back to a simplified form of the gcode as the basis for mathematical manipulation.  And, to further simplify that, I changed the roughing (3d contour) milling operations to be plunge-type, rather than helical.  The helical ones would generate clockwise and counter-clockwise gcode commands, which would require generation of a gcode interpreter to get all the interim points.

A scaling algorithm based on an arc

The initial algorithm for doing the scimitar modification is based on this drawing, which I did in F360.

The idea is this:

The "propeller hub center" is the center point of the propeller.

The black line extending to the right is the X axis.

What I'm doing is mapping anything along that line to the arc at the top by doing a linear scaling of the points.

Assume there is a center point (cx,cy) halfway to the max X value of the propeller points.  So, cx is half of max (x in the gcode).

Then, let there be a point (px,py) in the gcode.  In this example, the conversion would only apply to positive px values.

Given the points (px,py) and (cx,cy), I can compute (just by similar triangles) an x-axis intercept point, (ix,iy).

Given the intercept at (ix,iy), I can figure out what the scaling would be to get (ix,iy) to stretch out to a point along the arc.  The scale factor is the ratio of 

(cx,cy)-to-(hub center) hypotenuse divided by.(cx,cy)-to-(ix,iy) hypotenuse 

If I apply that same scale to the (cx,cy)-to-(ix,iy) delta, then I get a new point.

The same approach would be taken for negative (px) values but using the negated (cx,cy) positions.

The amount of curvature is influenced by the magnitude of cy.  The closer cy gets to the X axis, the more pronounced the curve.

I already had some python code that would do a very rudimentary step-through of the gcode, and identify changes in x,y,z,f.  I generalized that a bit further to convert plain x/y/z lines to complete lines.

For example, you could have

G1 X5 Y2 Z7 F333.33

X6 Y4

X3

I would internally treat that as

G1 X5 Y2 Z7 F333.33 

G1 X6 Y4 Z7 F333.33 

G1 X3 Y4 Z7 F333.33 

At each line, I'd apply the transformation.  Here's the original roughing gcode path, and below it is an initial result of the transformed roughing gcode.

front contour, original

 

front contour, transformed, cy = -10

That looked interesting.  But this is what the fine (parallel) yielded.  Again, first the original, then the transformed version.

front parallel, original

front parallel, transformed, cy = -10, attempt 1

Pretty good, right?  But what's with those coarse steps?

There was a further trick in that the gcode points sometimes would stretch long, linear distances.  So in the gcode example above, the "X3" line is stepping 3 full units from X6 to X3.  Since I'm mapping things to an arc, I want incremental steps.  I put in a section into the code that would look for "large" steps.  If the movement from one point to another (based on dx, dy in model coordinates from one line to another) were too big, then I'd generate interpolated steps, and feed those steps through the same transformation, and do a final step as with any normal, not-too-large step.  (NB: I'd do incremental steps, transformed in X and Y, but I also had to do incremental linear transformations in Z changes.)

With incremental stepping added for "long" steps, I ended up with a much cleaner result.

front parallel, transformed, cy = -10, interpolating

Much better.

But now it's obvious that there's a shearing effect happening.  You can see that at the center of the hub, the once circular hole and the hub itself are now elongated.

To highlight this further, I've attempted to create an animated gif, showing the results of values cy from ranges -10 to 45, along with the original image (which is, basically, cy = negative infinity).

Hopefully, this blog will support an animated gif...




front parellel, transformed, cy = {-inf, -45..-10}


So now I'm back to being a little stuck, trying to figure out how to compensate for the shear -- which looks linear but really is probably radial -- without messing up the effect of the transformation.

Credit to ncviewer.com for gcode rendering, and Adobe Photoshop Elements, for screenshot, crop, position, layer, animated gif generation.

Switching to a revolve transformation

One of the problems with the scaling algorithm above is that it not only shears the model, it also resizes the blades.

I think instead I'm going to do something where I'll rotate the points clockwise by an increasing amount, ideally starting at 0 degrees of rotation at the outer diameter of the hub, and increasing gradually as the distance from center increases.  That should leave the hub and center hole alone, preserve the connection points closest to the hub, and mostly preserve the blade widths.

I thought of doing a linear translation instead of the scaling I'm doing now.  That also might work, but I think it would have strange artifacts near the center and tip.

The rotation transformation would probably be ideal if I were to compute an offset plane incrementally along the X axis, slice the model with that plane, and then rotate the resulting polygon (around the Z axis) to a new position.  I'd have to leave it to some point stitching tool to get all the faces glued together again.

I tried the above, and ended up not doing the distance threshold.  I also made the gcode un-rotate all points, post-transformation, by about 2/3 of the transformation angle, so that the model would stay mostly horizontal.

Here's the result, ranging from 0 to 45 degrees of "angle range", stepping 5 degrees at a time.  What that means is that if the distance from origin to a point in the gcode is maxed out, it'll rotate 45 degrees.  The closer it gets to the origin, the rotation gets closer to zero.  The angle change is linearly interpolated.

front parallel, rotational transformation, angle=0..45 step 5

The effect is most evident at angles 40 and 45.  Prior to that point, the original curvature of the "scoop" part of the blade still appears obtuse.  

NB: I had to fix a bug here, too.  Before using {:.3f} formatting in python, I was getting long doubles printed in scientific notion, such as this:

G1 X19.728884661664274 Y8.214719016486072e-05 Z-0.494 F700.0

G1 X10.049908419900351 Y-4.01997769143847e-05 Z0.265 F700.0

That wasn't working correctly in ncviewer.  It would renders as if it were going to Y8.21 or Y-4.01.  Chances are, ncviewer has it right (i.e., gcode doesn't support scientific notation), so I changed the code to print X, Y, and Z coordinates using 3 digits of precision.

I added a few other things to the program: recognition of sys.args[1] for the rotation angle, handling of the G2 and G3 commands and their I and J parameters.

A few other things.  I had done a compensation anti-rotation of 2/3rd of the angle, just to make it look good, but I'm not sure how that will play with the flipped gcode.  So, I chose to anti-rotate 100% of the angle, which is what's shown in the animated gif above.  Note how the max tip point stays stable throughout.

I have to see how this works with the flipped gcode.

And then the next problem is that if I use 45 degrees -- and maybe if I use 45 -- then I think I'll be getting really close to the 19.05mm stock depth (Y range).  That's not a huge deal.  It just means I'd need a different stock source, something other than 3/4" square hobby sticks.

Oh, and the other really important thing to look at: I think maybe my animated gif above, ranging from 0..45 degrees, would end up milling things backwards again for a clockwise propeller.  At a positive 40 or 45 degrees, the tip cuts through the air before the middle of the blade.

I think instead I really want -40 or -45 degrees.  It's hard to visualize in gcode since these are subtractive milling operations.  But I think it's really supposed to be a negative rotation for this transformation.

After some more comparisons with real scimitar propellers, I found that the -20 rotation is actually closer to the "real" thing.  The scale of the blades is different from a real one, but the rotation is about right.

Another cut of the same propeller

I was about to cut a scimitar example, and then blew it.  I selected the .nc files I'd originally generated for the mirrored version.  Oops.

Well, since I went down that path, I decided to go all the way and finish the job.  This one was made from pine stock.  Here's a backlit image of what it looked like after all milling ops.  Pretty cool that it's so thin.