Tag Archives: 3D printing

DC motor speed control using optical tachometer

Posted 04/13/15

In my last post I described my plans for upgrading Wall-E (my Wall-following Robot) with a LIDAR package of some type, and my thought that I might be able to use such a package to not only replace the existing front-facing ping sensors, but (with a bit of rotating magic) the side sensors as well.

In order to replace *all* the sensors, the LIDAR package would have to rotate fast enough so that it could produce front, left, and right-side distance readings in a timely enough fashion to actually implement wall-following.  I’m not sure exactly what the requirements for wall-following are, but I think it’s safe to say that at least the measurements to the followed wall must be in the several-per-second range, or Wall-E could run into the wall before it figures out it is getting too close.  The other side, and the front could be taken at a more relaxed pace if necessary, but the wall being tracked has to be done correctly.

In order to rotate a unit such as the LIDAR-Lite from PulsedLight, I would  need a speed-controlled motor of some kind.  I considered  both stepper motors and direct-drive DC motors.  Since I already had two DC motors (the left and right wheel motors on Wall-E) and they came with ‘tachometer sensors’ (plastic disks with slots for optical wheel motion sensing), I thought I’d give this a try.  Earlier in my robot startup phase, I had obtained  some IR LED/Photodiode pairs, so I had at least the basic building blocks for a tachometer system.  I was  already speed-controlling Wall-E’s wheel  motors for steering using PWM from the Arduino Uno, so that part was already in place.  ‘All’ I had to do was couple the input from a tachometer into the already-existing PWM speed control facility and I would have a closed-loop speed-controlled rotating base for my LIDAR system – cool!

OK, so now I have all the parts for a speed-controlled motor system – I just have to assemble them. First up was a way of mounting the IR LED and IR detector in such a way that the slots in the tachometer wheel would alternately make and break the light path between them.  In the past when I had to do something like this, I would carve or glue something out of wood, or bend up some small pieces of aluminum.  However now I have a very nice 3D printer and the TinkerCad design package, so I could afford to do this a different way.  The confluence  of hobby robotics and 3D printing allows so much more design/development freedom that it almost takes my breath away.  Instead of dicking around for a while and winding up with something half-assed that is used anyway because it is way too much trouble to make another  -better – one, a 3D printer based ‘rapid iteration’ approach allows a design to  be evolved very quickly, with each iteration so cheap as to be literally throw-away.    To illustrate the approach, the image below shows the evolution of my IR LED/IR detector bracket, along with the original 20-slot tachometer wheel that came with the motors and a 10-slot version I printed up as a replacement (the tach signal-to-noise ratio was too low with the 20-slot original).

Evolution of an IR tach sensor bracket, along with the original and a custom-printed tach wheel

Evolution of an IR tach sensor bracket, along with the original and a custom-printed tach wheel

The evolution proceeded from left to right in the image.  I started with just a rectangular piece with a horizontal hole to accommodate the IR LED, and a threaded hole in the bottom to affix it to the robot chassis.  Then the design evolved a ‘foot’ to take advantage of a convenient slot in the robot chassis, for physical stability/registration purposes.  Then I added a second side with a slot in it to accommodate the  IR detector, with the tach wheel passing between the two sides.  This basic two-sided design persisted throughout the rest of the evolution, with additional material added on the IR LED side to accommodate the entire length of the IR LED.  Not shown in the photo are some internal evolutionary changes, most notably the width of the slot that allows IR energy from the LED to fall on the detector – it turns out that the detector opening should be about 1/2 the width of a tooth slot for best signal.  Each step in the above evolution cost me about 30 minutes of design time in TinkerCad, and a few pennies worth of filament.  Moreover, once I have the end design, printing more is essentially free.  Is that cool, or what?

Wall-E's right motor being used as my tachometer test bed

Wall-E’s right motor being used as my tachometer test bed.  Note the piece of scotch tape on the wheel, used for manually timing RPM.

Tachometer sensor bracket, showing IR LED and tach wheel

Tachometer sensor bracket, showing IR LED and tach wheel

Tachometer sensor bracket, showing slot for the IR detector

Tachometer sensor bracket, showing slot for the IR detector

Since I was already controlling the speed of Wall-E’s motors with an Arduino Uno (albeit for steering), I simply modified the wall-following program to act as a test driver for the tach feedback system.  The output of the IR detector was connected to an analog input, and the analog readings were captured and imported into an Excel spreadsheet for analysis.

The first test showed that I wasn’t getting enough signal swing between the slot and non-slot (plug) states of the tach wheel (less than 100 out of a possible 1024 levels), and this led me to start experimenting with different IR detector apertures.  As shown in the second plot below, constricting the aperture provided a marked improvement in SNR (about 3 times the peak-peak variation).

First test of the tach sensor system.  Note the not-impressive variation between wheel slot and plug readings

First test of the tach sensor system. Note the not-impressive variation between wheel slot and plug readings

Paper barrier with a small slot placed in front of detector aperture

Paper barrier with a small slot placed in front of detector aperture

The above results led directly to the final round of evolutionary changes to the tach sensor bracket, where the detector aperture was changed from a large circle (same diameter as the IR LED) to a small slit.  In addition, to further improve the SNR, the tach wheel itself was redesigned from 20 slots to 10  with  the slots and plugs equal area.  In addition one slot was removed to create an absolute wheel position ‘index mark’.  After these changes, the tach sensor test was redone resulting in the following plot.

IR Detector response with a narrow slit aperture and a 10-tooth wheel.

IR Detector response with a narrow slit aperture and a 10-tooth wheel.

Now the signal varies from 0 to 800, allowing easy and reliable ‘off’ to ‘on’ state detection, and index mark detection.

After incorporating the physical changes noted above, an Arduino program was developed to test whether or not the motor could be accurately speed controlled.  Rather than trying to manually threshold-detect the above waveform, I simply used  Mike Schwager’s very cool EnableInterrupt Library (see  https://github.com/GreyGnome/EnableInterrupt) and set the Tach signal analog input to trigger an interrupt on each signal change.  This resulted in two interrupts per slot position, but this was easily handled in the software.

After getting the program working,  I found that I could control the motor such that, when set to 60 rpm, 20 wheel revolutions (as measured by counting the scotch tape on the wheel) took exactly 20 seconds.

Well, I’m not quite sure where I’m going from here.  Now I have demonstrated that I can control a typical hobbyist/robot motor for use as a LIDAR turret.  However, I’m not entirely convinced that a spinning LIDAR can produce wall distance measurements fast enough for successful wall following, and it will be a major PITA to modify Wall-E sufficiently to find out.  For one thing, I can’t really use one of Wall-E’s drive wheels as the LIDAR turret motor without giving Wall-E an unacceptable ‘limp’  (If I did that, I guess I would have to change his name from ‘Wall-E’ to ‘Quasimodo’ ;-)).  For another, to mount the LIDAR and turret on the current Wall-E chassis would be a major project by itself, as Wall-E’s real estate is already heavily populated with ‘stuff’.

So,  I think I’m going to wait until my new 4WD robot chassis arrives (it was unfortunately delayed for a week or so), and then build it up from scratch as a LIDAR-only platform. I can then use one of the motors from Wall-E as the turret motor for the PulsedLight LIDAR-Lite system.  In the meantime, I think I’ll try and mount the NEATO XV-11 spinning LIDAR on Wall-E, as it doesn’t require any additional motors (it has its own motor built in), and see if I can successfully follow a wall using only LIDAR.

Stay Tuned…

 

Frank

 

 

The Ender’s Game Flash Gun Project

3/20/2015

Some months ago, my grandson got interested in the possibilities represented by my rudimentary 3D printing capability, and decided he would like to try and make GlitchTech’s really coo  Ender’s Game Flashgun, popularized in the Ender’s Game book by Orson Scott Card and the wildly popular movie.  Not knowing what a HUGE adventure this was going to be, I encouraged him.  Over the winter of 2014/15 Danny and I collaborated via frequent  Skype sessions about the  project, culminating with Danny, his parents (Electrical Engineer and Attorney), and his sister arriving on our doorstep late last Wednesday night for a 3-4 day geek fest to assemble all the 3D-printed parts and the electronics for the Flash Gun.

The Flash Gun is quite complex.  It consists of over 30 separate 3D-printed parts, and contains a Li-ion battery, a Sparkfun PowerCell battery charger, 2 Adafruit NeoPixel LED rings, an Arduino Pro Mini microprocessor to run it all, and various other small parts.  As an added bonus, the Pro Mini board doesn’t have any sort of programming connector, so something like an Adafruit  FTDI Friend  or CKDevices FDTI Pro board to connect to the Pro Mini for programming.  I happened to have a CKDevices FDTI Pro hanging around from a previous project, so I hoped this would do.

There's a Flash Gun in there somewhere, I'm sure!

There’s a Flash Gun in there somewhere, I’m sure!

 

The Adafruit Neo Pixel rings, the 'Beam LED' and the Arduino Pro Mini

The Adafruit Neo Pixel rings, the ‘Beam LED’ and the Arduino Pro Mini

There were three main threads in the Flash Gun project.  The first and most time-consuming was 3-D printing all the parts – there were a  lot of them, and many had quite complex internal structures.  It became apparent rather rapidly that my little old PrintrBot Simple Metal printer wasn’t up to the task, so Christmas brought me a MicroCenter PowerSpec 3D PRO dual-extruder printer.  With the dual-extruder setup, I could now use HIPS dissolvable filament for the required support structures, then dissolve them away using Liminonene.

As the winter went by and I continued to push out Flash Gun parts, Danny and I also worked on other projects.  We have a Wall-following robot powered by an Arduino UNO, and we also did a jointed robot (pose-able figurine) project.

The original designer of the Flash Gun provided a very complete and elegant Arduino program to run the NeoPixel rings,  but it still has to be  uploaded into the Arduino, and then the whole thing tested.  Also, as we approached this point, it became apparent that the code documentation, while quite robust, still left a few things as ‘exercises for the student’.  In particular, the Arduino Pro Mini I/O pin assignments in the code did not match the photo of the Arduino Pro Mini in the Thingiverse post (http://www.thingiverse.com/thing:417286/#files, fifth picture from the left).  It was at this point that Danny’s father Ken, also an EE with a lot of hands-on experience was invaluable in acting as a second set of eyes and a second brain to keep me from doing anything too stupid.  In particular it was Ken that figured out the pin assignments for the Arduino Mini – Thanks Ken!

As a pre final assembly test, I wired up the Arduino, the two NeoPixel LED rings, the front-facing ‘beam’ LED, and the 10K pull-down resistor on the pushbutton ‘trigger’ pin.  After uploading what I hoped was the final Flash Gun program, and using power from the FTDI pro board, I tried my luck at ‘triggering’ the Flash Gun.  To my surprise and delight – it worked the very first time – no debugging required (see the video below)

 

After running the test a few more times for all the assembled multitudes (well, the family anyway), we moved on to more mundane aspect of the electrical wiring.  I connected  the Sparkfun VCC output through the ON/OFF switch and then on to the main VCC connection point, and connected the Sparkfun GND pin to the main GND connection point.  Now I was able to ‘trigger’ the LED rings using just the Flash Gun’s internal battery – cool!

So, a very good day by any measure.  It’s Friday night as I write this, and we have one more full day to get everything done.  All that’s left on the electrical side is to wire the ‘trigger’ pushbutton into the circuit, so that shouldn’t take long.  Then comes the task of putting all the mechanical parts together, and of course shoe-horning the Arduino into the not-so-large cavity designed for it.  Hopefully by the time we break to watch the Ender’s Game movie Saturday night, Danny will have a real live Ender’s Game Flash Gun to fire at appropriate places in the movie! ;-).

Frank

 

Flap Handle ClearNav Remote Caddy Done! (I hope)

John tells me that the latest and greatest flap handle ClearNav remote caddy version is alive and doing well in his glider.  The flap grip section fits over the metal flap control handle nicely, and the redesigned remote caddy section with its beefed-up quarter-turn fastener seems to be holding up OK so far.  The ‘caddy garage’ piece also seems to be working to hold the remote caddy in an out of the way place when not in use, allowing John to enter/exit the glider without worrying about damaging the caddy or breaking a cable.  Only time will tell, but for now it looks like I might be DONE!!!

Original flap grip replaced with ClearNav remote caddy

Original flap grip replaced with ClearNav remote caddy

Remote caddy detached from flap grip and connected to 'garage' piece mounted to instrument panel using one of the instrument screws

Remote caddy detached from flap grip and connected to ‘garage’ piece mounted to instrument panel using one of the instrument screws

I Need a Better Class of Pilot!

In our last episode of the Flap Handle Follies, I was sure I had all the bases covered.

  • Larger  set-screws in grip – check!
  • 1/4 turn locking latch connecting flap grip to remote caddy assembly – check!
  • Rotatable remote caddy with spring-plunger detent every 10 degrees – check!

Unfortunately, one essential item  for success with this version was missing from my checklist, and its absence spelled doom:

  • Non-gorilla pilot – check!

A few days after sending the latest version to John, I got an email with some photos and suggestions, and a few days after that I got my folded/stapled/mutilated flap handle assembly back – boy was I embarrassed!  What I had thought was a *brilliant* solution to a problem turned out to be not-so-brilliant when exposed to a pilot who expected things to go together in a particular way.  I had designed the 1/4 turn locking mechanism so the locking direction was opposite the normal “righty-tighty” direction because by doing so, the pilot’s normal thumb position on the remote caddy tended to hold the caddy locked onto the flap grip, as opposed to tending to unlock it.  Unfortunately, I had forgotten to mention this feat of brilliance to my friend, who expected everything to conform to normal lock/unlock conventions – oops!

Ah, well – it wasn’t a total failure, because we learned some things in the process:

  • The 3-piece assembly (flap grip, grip-to-caddy converter, caddy) was too long; John couldn’t reach the CN remote’s buttons with his thumb while his hand was comfortably placed on the flap grip.
  • The 1/4-turn locking mechanism was way too fragile (jokes about gorilla pilots notwithstanding)
  • The dimensions of the rectangular slot in the grip piece seemed to be just about right.

So, back to the drawing board yet again.  hunting through the forest of design possibilities for just the right combination.

  • Minimize or eliminate the grip-to-caddy converter to reduce overall length
  • Enlarge/strengthen the 1/4-turn locking mechanism (but keep the opposite direction actuation)

Minimizing or eliminating the converter piece  required that I  drop the caddy rotation feature.  This was kind of overkill anyway, as John had marked the correct (for him) rotation much earlier in the game;  I was trying to generalize his preference into something other pilots could use as well.   I just needed to think about the rotation feature as something ‘baked in’ to the design, rather than something pilot-adjustable.

Enlarging/Strengthening the 1/4-turn locking mechanism shouldn’t be too much trouble, as the latch parts were available in their own separate design files, so a simple scaling operation should do the trick there.  The only limitation on size being that the latching mechanism has to fit into the top of the flap grip and the bottom of the converter piece.

Based on my now extensive experience with printing parts on my PrintrBot, I also added the requirement that each part be printable in a way that preserves the quality of the mating surfaces.   I have come to understand that there is a right way and a wrong way to print parts; the right way result in very clean and smooth mating surfaces, while the wrong way results in ugly, bumpy surfaces that no amount of sanding can make right.  Fortunately, the combination of careful design and clever positioning of the part on the print plate seems (so far) to be effective.  The trick here is to make sure that parts are positioned so the mating surfaces are  either perfectly parallel or perfectly perpendicular  to the print plate; in either orientation the result is nice, clean surfaces.  In the case of the converter  part,  the mating surfaces aren’t parallel to each other, so it was placed vertically on the print plate  so the larger mating surface (remote caddy interface) was perpendicular to the print plate, and the smaller  (flap grip) surface was tilted 20 degrees from the vertical.  Near-vertical surfaces also print very well, so this resulted in both mating surfaces printing nicely, but the cost was a much longer printing time (2 -3 hours vs about 15 minutes!).

In the previous version, the thickness of the grip-to-caddy converter  part was driven by the need for the caddy to rotate on the converter-to-caddy mating surface, which required that the converter have a hole deep enough to accommodate a reasonably sized axle post on the caddy part.  Eliminating the rotation feature allowed me to eliminate much of this thickness.  I still had the following requirements:

  • The caddy has to be rotated about 25 degrees CCW with respect to the fore-and-aft centerline of the flap grip, when looking at the top of the caddy. This value was measured from John’s marks on an earlier version.
  • The caddy has to be tilted vertically about 20 degrees with respect to the flap grip mating surface (again taken from John’s feedback).

To implement  the ‘minimized’ grip-to-caddy converter piece, I went back to Autodesk 123d Design’s ‘sketch loft’ feature.  This is a  very cool capability, and makes it (just) worthwhile to deal with 123d Designs many other ‘non-linear frustrations’ (see 2014/10/tinkercad-vs-123d-design-vs-meshmixer-pick-poison/).  I started with a 2D ellipse that matches the flap grip cross-section, and then added a 2D sketch of the caddy. Then I tilted and rotated the caddy sketch as defined above, and then ‘lofted’ the ellipse sketch into the caddy sketch – voila!

Now that I had the grip-to-caddy converter design worked out, all I had to do was to insert the scaled up 1/4-turn latching mechanism into the top of the grip and the bottom of the converter, and print all the parts.  Scaling and inserting the latch parts turned out to be pretty easy, as I already had all the latch geometry issues worked out from the time before, and all I had to do was use Tinkercad’s uniform scaling feature to ‘grow’ the latch about 150% or so.  After scaling the parts, I latched and unlatched them in Tinkercad a couple of times to make sure that Part A did indeed fit into Part B, and then simply copy/pasted them into the grip and converter designs.

There was one complicating factor; due to printing concerns, I decided to print the converter and caddy parts separately, and then screw them together using 2ea 4-40 screws.  I designed matching 2mm pilot holes in both the caddy and converter mating surfaces, and I added thickness to the bottom of the caddy so I could countersink sufficiently (about 3mm) to hide the screw heads below the bottom surface of the caddy.  However, when I got everything done, I wound up just gluing the parts together with gap-filling superglue from my local hobby shop, and this seemed to do much better than screws.

In summary, I was able to quickly design and implement a new flap-grip version with ‘baked-in’ caddy twist and tilt, and was able to get the caddy about 12mm (about 1/2 inch) closer to the flap grip than in the old design.

As an added amenity for the pilot, I decided to design and implement a ‘caddy garage’ so John would have a place to store the caddy when it wasn’t in use.  As part of the original testing program for the 1/4-turn latch, I had built some thin test pieces with the same cross-section as the flap grip – one with a plug, and one with a socket.  I did the same thing for the larger latching mechanism, so all I had to do was to put some mounting holes in the socket test piece and throw it in the box with the completed flap grip/caddy assembly.  John can mount the ‘garage’ in some convenient location in his cockpit, and simply latch the caddy assembly to the ‘garage’ after unlatching it from the flap grip.

Caddy Garage.  Note mounting holes for convenience

Caddy Garage. Note mounting holes for convenience

OK, off to the Post Office tomorrow to mail the new stuff to John.  I hope this new version will survive the ‘Gorilla Pilot’ test in better order than the last one did! 😉

Frank

 

ClearNav Joystick Part 2 – From TinkerCad to Finished Print

At the conclusion of ‘Part 1 – From Clay Model to TinkerCad’, I had finally managed to get a decent 3D model into TinkerCad as a binary STL file.  Now the challenge would be to transform that blank template into something that could actually be printed on my PrintrBot and used in a real glider aircraft.  To get from where I was to where I wanted to go required the following steps:

 

  • Modify the joystick top to accept a ClearNav remote controller
  • Design in the the ability to install a separate switch, for use either as a ‘climb/cruise’ vario switch or as a separate ‘push-to-talk’ (PTT) switch (the ClearNav stick-top remote controller accessory has it’s own integral PTT switch, but…).
  • Create  a 1″ diameter hole to mount the joystick onto the glider joystick handle/tube
  • Create  a wiring passageway up to the top of the joystick
  • Print it out on my PrintrBot Simple Metal.

 

Modify the top to accept a ClearNav remote controller

This step appeared to be the hardest and most critical part of the design, so I decided to tackle it first.

Of course, a fundamental part of this step required that I have precise dimensions for the ClearNav stick-top remote controller, and this turned out to be rather more problematic than I had expected.  ClearNav, Inc didn’t have any technical specifications for the part on its website, and the support crew there couldn’t provide anything either.  The president of the company promised to send me a 3D design of a blank controller part as an STL file, but never delivered anything, even after multiple inquiries.  Fortunately, I had a hand-held remote controller  left over from my previous life as a glider pilot, and I happened to know that the outside dimensions of the stick-top and hand-held controllers were identical.  The difference was that the stick-top remote has an extra button to replace the normal PTT button, and the hand-held controller does not.  Another non-relevant difference is that the hand-held remote has a telephone-style RJ-45 connector, while the stick-top version uses  a wire pigtail.

So, I was able to use my hand-held controller to produce a blank 3D model for sizing the stick-top cavity.  I started out with a blank that was as precise as I could make it, and then oversized it by about 1mm in all dimensions to use as a ‘hole’ in the design.

Disassembled Hand-held ClearNav Remote

Disassembled Hand-held ClearNav Remote

Slightly oversized blank for joystick ClearNav remote cavity

Slightly oversized blank for joystick ClearNav remote cavity

Then I started trying to fit the blank into the top of the joystick, with very limited success initially.

First attempt at fitting the ClearNav remote into the top of the joystick

First attempt at fitting the ClearNav remote into the top of the joystick

The thickness of the 3D representation of the clay model just wasn’t sufficient to contain the volume of the ClearNav remote, no matter how I moved it around.  So, back to the drawing board (literally!).

I did some more research, and taught myself how to use MeshMixer’s ‘Inflate’ sculpting brush  to add some bulk to the top of the joystick, and the ‘Flatten’ brush to  slim and smooth the neck area.  After several back-and-forths between MeshMixer and TinkerCad, I arrived at a version that would indeed contain the remote.

Close, but no cigar!

Close, but no cigar!

Remote is completely contained now in the joystick, so this one is very close to final

Remote is completely contained now in the joystick.  Note the neck has been slimmed down as well

Design in the the ability to install a separate switch.

The typical cross-country glider uses a boom microphone and a stick-mounted push-to-talk (PTT) switch for radio communications, and there is often at least one more switch (typically a SPDT toggle) mounted on the forward surface of the stick top.  The stick-top ClearNav  takes over the real estate used by the original PTT pushbutton, but cleverly replaces it with an integrated PTT switch on the remote itself (this integrated PTT button isn’t on the handheld version).  However, I still needed to make room for the front-mounted SPDT switch.

The first step in this portion of the design was to create a 3D model of a ‘subminiature’ SPDT switch.  Fortunately I happened to have one in my design shop, left over from an even earlier lifetime as an electrical design engineer.  Now that I have my high-quality Fowler calipers from McMaster-Carr, it was a snap to measure the switch and create a fairly accurate 3D model in TinkerCad.

Subminiature SPDT switch model

Subminiature SPDT switch model

Once I had the switch, I was able to figure out how to shoehorn it into the top of the joystick, in a forward-facing orientation.  This took a while, and involved creating a smaller ‘sub-basement’ cavity under the one created to accommodate the ClearNav remote.

MountedSPDTSwitch2 MountedSPDTSwitch1

Create the 1″ diameter mounting hole and wiring passages

You’d think this would be the simple part – just a couple of cylindrical ‘holes’ added to the part and we’re done.  Unfortunately, life (or joystick design) just ain’t that simple, and what I thought would be a ’10 minutes tops’ job turned into a multi-day headache, and finally into a fun piece of creative work.  The initial 1″ diameter hole wasn’t too bad, but since the joystick body isn’t particularly symmetric, it wasn’t (and still isn’t really) clear where the hole should go.  I finally opted for the placement that would allow the hole to penetrate the farthest up into the joystick body, as that would result in the widest range of mounting options in the actual aircraft.  Then I created a  smaller diameter  angled cylinder to connect the vertical hole to the top cavity, to act as passage for the necessary wiring.

This seemed to be working really well, until I printed a couple of half-scale models and discovered that both the vertical and slanted cylinders poked through the side of the joystick, even thought the TinkerCad model showed some material thickness all the way around.  I was trying (and failing) to figure out how this could possibly happen when my wife, who knows nothing about 3D printing, pointed out that  the minimum printable wall thickness stays the same regardless of scale, so something that shows 2-3 min thickness walls at full scale might not be even one min wall thickness at half-scale – oops!

OK, back to the drawing board.  I played around with this forever, but finally concluded that I was going to have to give up on the linear passageway idea, and go with something curved if I wanted to have decent wall thickness all the way around the passageway for its entire length from the top of the 1″ mounting hole to the cavity at the top of the joystick.  To make this work, I used TinkerCad’s ‘Torus’ primitive, and adjusted the torus diameter  and  cross-section to get what I wanted.  When everything looked right, I used several rectangular ‘holes’ to cut off the sections I didn’t need.

Final version, showing the 1" vertical cylinder for joystick handle mounting, and the curved wiring passageway

Final version, showing the 1″ vertical cylinder for joystick handle mounting, and the curved wiring passageway

Printing on my PrintrBot Simple Metal

After verifying this hole structure via a half-scale model, I was ready to step up to full scale testing.  However, I really really did not want to pay the time and filament cost for multiple full scale prints, so I decided I would just print the top of the model to verify all the cavities at full scale.  Since none of the hole structures poked though anymore at half scale, I was pretty confident they wouldn’t at full scale.  So, I made a series of full scale prints of just the top portion, and these caused me to make some adjustments in  the auxiliary SPDT switch cavity and mounting arrangements.  With these partial full scale prints, I was able to use the actual full scale real-world parts (ClearNav remote and subminiature SPDT switch) to check for fit and clearances.

First full scale print of just the top cavity structure.  Note the top part of the cavity is incorrect.

First full scale print of just the top cavity structure. Note the top part of the cavity is incorrect.

Second full scale print of the top cavity structure.  Note the top portion of the cavity has been corrected.

Second full scale print of the top cavity structure. Note the top portion of the cavity has been corrected.

Final version of the joystick top cavity structure

Final version of the joystick top cavity structure.  This just required a slight resizing of the cavity to accommodate the actual full scale ClearNav remote, and the actual full scale SPDT switch.

After the full scale partial printouts, I was ready to go for a full scale print.  The overall height  of the joystick (121.6 mm or 4.8″) would be close to the 6″ maximum for my PrintrBot, so I was a bit worried that bad things were going to happen.  Also, since this was to be such a long duration print, I was worried about filament jams and all the other things that could go wrong on a long print.  As it happened, the print went off without a hitch, and produced a near-perfect model.

 Summary and Lessons Learned

  • Although I much prefer to have a ‘real’ project as a motivator when learning a new software package or skill, I probably overreached a bit with such a complex project so early in the learning curve.  Learning how to capture a 3D model from photos, how to use MeshMixer’s sculpting tools, advanced TinkerCad techniques, and a challenging print size and overhang  configuration all rolled into one project!
  • The combination of the Autodesk suite of 3D  applications (123d Catch, 123d Design, MeshMixer, and TinkerCad) forms a very complete and rich design suite for capturing a 3D object in a form suitable for further development and eventual 3D printing.  The fact that all of these applications are (at least for the moment) entirely free is amazing!
  • the 3D capture and design application world is changing and evolving at warp speed. All of the above apps have serious bugs,  deficiencies, and internal  inconsistencies, so staying light one’s feet is an absolute necessity.  If it doesn’t work right now, check back tomorrow!  In my  case the 123 Catch application literally changed overnight – on day 1 I couldn’t seem to get my capture to stitch at all, and on the next it was all done automagically!  The downside of all this is that skills and/or workarounds learned today may be irrelevant tomorrow, so the need for constant retraining is going to be a fact of life.
  • As in other endeavors, success is 1% inspiration and 99% perspiration.  I just kept banging away at the problem until it gave up and rolled over.  It didn’t matter to me whether my progress was due to my brilliance or just sheer doggedness – either one was fine with me ;-).

 

ClearNav Joystick Part 1 – From Clay Model to TinkerCad

In a previous lifetime I was a cross-country glider pilot.  This means I would regularly fly an  aircraft with no engine up to six or seven hours and cover hundreds of miles without landing.  Expert glider pilots can do this at average  speeds  approaching or exceeding interstate speed limits.  Since gliders must stop occasionally to regain lost altitude in rising air currents (called thermals), their inter-thermal speed has to be significantly higher than the average, meaning a glider flying along an interstate  will  easily outpace the cars and trucks below.

Anyway, a friend from that previous life showed me a clay model of a custom joystick handle he was working on.  The model was intended to incorporate a complex instrument remote control panel in the top of the joystick, where the push-to-talk (PTT) switch would normally go.  When he first showed it to me, I was just thinking about getting into 3D printing and in my ignorance I thought this would be a perfect 3D printing project (little did I know at the time!).  Later on when I had just ordered (but not yet received) my PrintrBot Simple Metal Kit I asked him to send me his clay model, and promised him I would at least make the effort to turn his clay model into a finished 3D printed product.  This is the story of how I went from 3D ignoramus to Joystick hero in a few short weeks.

 

07/28/14 Capture using Autodesk’s Catch/123d:   I’ve gone through this now a couple of times with BZ’s joystick, and I am now starting to get some clues.

  • The first time through was with just some painter’s tape patches placed on the joystick surface to give some reference points.   This worked, but not very well.   The patches didn’t stick very well due to the oil in the clay, and I got a number of unstitched photos.   Also, I couldn’t manually stitch photos together. just never worked

    Joystick with blue painter's tape 'stickies'

    Joystick with blue painter’s tape ‘stickies’

  • Next time through I used narrow strips of painter’s tape, wound around the joystick in several places.   This worked MUCH better, and in fact I had zero unstitched photos, and was eventually able to generate a full 3D STL file editable in 123d Design and TinkerCad (see below).   However, the only fly in the ointment was that the painter’s tape wasn’t completely conformal with the joystick surface in several places, and this came through on the model as raised ridges.
Joystick wound with strips of  blue painter's tape

Joystick wound with strips of blue painter’s tape

  • The third try was to replace the painter’s tape with felt-tipped marker markings. The thought was that this would be more conformal to the surface, and if done properly would also be appropriate for automatic stitching.   However, what actually happened was that the model came through OK, but with many unstitched photos.   Then when I laboriously manually stitched a number of photos into the model, the re-submission crashed. ouch!   This problem continued even if I re-submitted after stitching only one photo.   This was all done with the PC version, so I tried again with the online version.

    Joystick with Sharpie pen markings for surface contrast

    Joystick with Sharpie pen markings for surface contrast

  • In the online version, I see that I have a number of projects that appear to be In processing’, even though they are older (as in days older) versions of the joystick process, and there doesn’t appear to be any way to remove them!.   The Sharpie’ version is shown to be complete, and when I open it in the online version it looks great, but in the online version there is no lasso’ tool for removing all the background elements.

 

08/07/14:   Working with a newer version of 123 Catch

  • A newer version of 123 Catch became available in the last few days, so I decided to try a new capture using my photos from the Sharpie’ version of BZ’s joystick.   This time when I   uploaded the photos, I didn’t get any unstitched images. yay!!
  • I discovered the mesh resolution’ setting in Catch, and was able to change the mesh resolution from Mobile’ to Maximum’.   This also takes a selection area as a parameter, and re-meshes only the portion of the capture within the selection, so it takes much less time than doing the entire scene.   Remeshing took only a few minutes with the selection limited to just the area around the joystick.

 

08/09/14  –  Still working on the Sharpie’ joystick:   I was able to print a ½ scale model of the joystick, but I discovered it was all solid inside, notwithstanding the hollow’ attribute advertised by the Catch/3D Print operations above.   Also, I wasn’t able to figure out how to undo the minimum support’ setting that left the joystick on its side.   So, I’m making another try at this from scratch and will try to document the steps more rigorously.

  • Started a New Capture’ in 123 Catch, using the 07/28/14 Sharpie photos.   This took a long time to process.   Catch asked for a Capture file name, and suggested Capture_2014_08_09_06_17_31′ (date and time).   When it completed, I was presented with the constructed model as shown below.

    First successful capture of the 'Sharpie' model

    First successful capture of the ‘Sharpie’ model

  • I did an immediate Save As at this point, and noticed I already had a Capture_2014_08_09_06_17_31′ folder and .3dp file saved in the same folder as the original Sharpie photos (140728_Sharpie Photos).   I have seen this before, but AFAICT, this folder and file aren’t usable later. can’t figure that out.   I cancelled the Save As operation.
  • I found a 2011 tutorial at http://aucache.autodesk.com/au2011/sessions/4056/class_handouts/v1_AC4056%20-%20It%E2%80%99s%20a%20Snap!%20Take%20a%20photograph%20and%20create%20a%203D%20Model.pdf.   This was apparently a presentation at an AutoDesk conference.   This tutorial explained things like the photo lock’ mode (constrains the scene view to just the available discrete camera locations), but wasn’t all that helpful for my purposes.
  • I somehow got into Photo Lock’ (PL) mode and now I can’t get out again!   If I disable PL, I get a blank screen with just the camera locations and the coordinate axes shown.   Hmm, I clicked on show mesh’ and now I have the scene back. weird.   Yep. confirmed that you have to have show mesh’ checked to get *anything*!
  • OK, selected the lasso selection tool and deleted everything around the joystick.   Shit!   I deleted a small section of the mesh, and *then* got a dialog warning me that I needed to make sure I was in the correct mesh quality setting, or edits might be lost.   So I tried to undo the mesh edit, only to find there’s no UNDO function!
  • Used the rectangle selection tool to select just a small area around the joystick for re-meshing (including part of the deleted area from the previous bullet) as shown.   Note that I rotated the view to a fairly high angle so that my selection was restricted to just the newspaper around the joystick. omitting any of the office background.

    Remeshing a selection of the original Sharpie model

    Remeshing a selection of the original Sharpie model

  • Selected the Remesh icon and selected Maximum Quality’.   This produced a dialog with the original capture name (Capture_2014_08_09_06_17_31) which I assume is a reference to the previously uploaded photos.   Curiously, this field is editable, giving the impression I could have used another name. maybe then it would have saved the re-mesh into a different capture structure?
  • OK, the remesh finished successfully, leaving me with a rectangular patch from the original scene.

    Sharpie model after remeshing a selected portion of the original scene

    Sharpie model after remeshing a selected portion of the original scene

  • I saved this result as 140809 Sharpie Capture After Remesh.3dp’.   I don’t really know if this will actually save anything or be useful later, but I thought it couldn’t hurt.   I also saved it as an .OBJ file, which might actually be more useful/permanent.   By default, both these files were saved in the same folder as the original capture photos, i.e. F:\3D Projects\Joystick\140728_Joystick Sharpie Photos’.   The .3dp file is only 5.3KB, indicating that (as noted in the 2011 presentation) it only contains references to the online location of the Capture files, not the files themselves).   The .OBJ file is a more respectable 4 MB.
  • Back in Catch, I used the lasso tool to further refine the mesh to just the joystick, and saved this in both .3dp and .OBJ format.   Even after being very careful with the lasso operation, I wound up with a big hole on the right side of the joystick base.   I saw this before on a previous run through, but found that the 123d Print application was able to repair’ the hole. strange.

    After the 'lasso and delete' operation, I have a big hole in the bottom of the joystick!

    After the ‘lasso and delete’ operation, I have a big hole in the bottom of the joystick!

  • Saved this as 140809 Sharpie Capture After Remesh And Lasso’ .3dp and .obj.
  • Clicked on the 3D Print button to launch the AutoDesk MeshMixer app.   By default, this opens with the joystick in the minimum support’ orientation. no idea how to change it back to the upright orientation (note – as it turns out, this isn’t the ‘minimum support’ orientation – it just looks like it).
  • Clicked on the Modify’ icon and got a warning message about losing unsaved changes.   Clicked OK, and got the following:
  • After fooling around in the MeshMixer for an hour or so, I finally gave up on this model.   I couldn’t figure out a way to add surface material to repair the hole.    Still fooling around, I selected Edits’ and Overhangs’ and MeshMixer crashed. oops!
  • Back in Catch, I opened the file 140809 Sharpie Capture After Remesh.3dp’, and it indeed opened the correct project, as shown.
  • This time I used this model to go to 3D Print, (which launches Autodesk’s MeshMixer app) and got the following default layout.MeshMixerDefault2
  • This is actually a bit nicer to work with, as the section of newsprint gives me a decent X-Y plane to work with for transforming the joystick to the upright position.   After rotating 270 deg around X axis, and then   Move to Platform’ to move the base down to the Z = 0 level, I  got the following.

    After a 270 degree rotation around the X axis and then 'Move to Platform'

    After a 270 degree rotation around the X axis and then ‘Move to Platform’

  • Hmm, I tried to go back to the Modify’ mode in MM and discovered you can’t do that.   Apparently there are two distinct MM modes. Modify’ and Print’ and they aren’t integrated.   Transforms/Translations in Print’ mode don’t flow back into Modify’ mode. bummer!   To get to Print’ mode, click on Send to Print’.   To get back to Modify’ mode, click on Modify’.
  • OK, finally figured out Rot/Translate in Modify’ view.   The center box’ is for linear scaling for all axes.   The colored arcs are for rotating about the various axes, and the triangles are for translating.   After figuring this out, I was able to rotate the joystick to an upright orientation, as shown.   I still have no idea what the L’, S’, A’, and W’ labels are for.
  • Exported the model as 140809_MeshMixer_Rev3.stl’ in Ascii STL format and tried to import it into TinkerCad, but it doesn’t seem to want to import at all.   Imports easily into 123D Design, however.   Tried this trick again with the binary formatted STL file.   The binary version does import into TinkerCad (and 123d Design) OK. yay!!
  • OK, figured out how to use the Select tools to delete the newsprint mesh, leaving only the joystick (hopefully), as shown.

    Joystick after newsprint removal

    Joystick after newsprint removal

  • After this I was able to use the transform tools in Modify’ mode to rotate/translate the joystick into a more understandable orientation, and saved the model as 140809_MM_Rev5_RotXlt_bin.stl’.
  • Next I tried using the Edit/Plane Cut tool to cut off the garbage at the bottom of the joystick, as shown below.  I accepted the transform, which gave me just a disk. oops!
  • Tried again, with the cut plane rotated 180 degrees.   This time things worked out much better.   The selection and the result are shown below.

    Plan cut operation with the plane rotated 180 degrees from the original

    Plan cut operation with the plane rotated 180 degrees from the original

  • After proper plane cut selection, the joystick bottom is nice and flat

    After proper plane cut selection, the joystick bottom is nice and flat

Saved this as 140809_MM_Rev6_PlaneCut_bin.stl.   Then I opened it in TinkerCad successfully, as shown below.   Note that the joystick in TinkerCad is still laying on its side, so   maybe the transformations in MM aren’t getting into the export file?

 

TinkerCad model after successful Plane Cut operation.  Note that the model is on its side

TinkerCad model after successful Plane Cut operation. Note that the model is on its side

  • Tried undoing the rotation transformation in MM and re-exporting.   OK, this worked!   Apparently, the coordinate systems in MM and the rest of the world are defined differently. so if going from Catch to MM to TinkerCad, don’t have to rotate in Meshmixer.

    After undoing the rotations & translations

    After undoing the rotations & translations

  • After this, I went back into MM and used the Flatten’ brush to smooth out some of the rough spots, saved it as Rev8Flattened, and imported that back into TC

Summarizing lessons learned so far:

  • MeshMixer can be used to remove the newsprint background from the Catch export
  • No need to rotate/translate in MM when going from Catch to MM to TinkerCad
  • Probably need to establish a scale in Catch, as the resulting model winds up being very small in MM and TC (3.5 x 6 mm).   OTOH, I can just as easily establish the scale in TC (this is what I wound up doing).

08/09/14:   Starting from 140809 Sharpie Capture After Remesh.3dp:

  • Click on 3DPrint to launch MeshMixer and load the file:   Opens as 2014-08-09-13-06-47_8466_41.obj’ in MM, with the Print’ mode active.
  • Click on Modify’ to get into that mode.
  • In Modify’ mode:

o     Analysis/Inspector/Auto Repair All

o     Edit/Plane Cut & adjust as low as possible with a solid bottom.   This should also remove much of the newsprint area.

o     Choose Select tool with Unwrap Brush active and double-click anywhere in the remaining newsprint area to select it all.   Then hit DELETE to delete it all.   Save this state as a .MIX file, and export it as a binary STL.   Check in TC to make sure it can be imported properly (140809_MeshMixer_Rev4_JoystickOnly_binary.stl)

o     Choose Sculpt’ and the Flatten’ brush.   Run the brush over the entire surface, flattening out minor bumps and wiggles.   Spent some quality time on the top surface, flattening it out for future work.   Went through a bunch of revisions, but saved the last one as 140809_MM_Rev9_Flattened_bin.stl.

08/09/14   – in TinkerCad:

  • Imported 140809_MM_Rev9_Flattened_bin.stl.   This was very small, but it was properly oriented with the joystick upright. yay!
  • Found the all axis scale’ function. Alt-Shift-Corner resizer.   This allowed me to scale all axes until the vertical dimension matched the measured 121.5mm from the original clay model.   Saved this in TinkerCad to 140809 Rev 9 Scaled to Clay Model’

Next up – Modifying the basic model in TinkerCad  to incorporate the mounting hole for the joystick, wiring passage to the joystick head, and mounting arrangements for an auxiliary switch and the ClearNav remote  head.  Stay tuned!

 

Mounting Clamp

Clamp for Bicycle Aux Instrument Holder

Just as I was contemplating the dive into 3D printing, a friend came to me with an interesting problem.  Ray  is an avid bicycler, and he has a number of auxiliary gadgets attached to his bicycle.  One of these gadgets is an auxiliary instrument holder that clamps onto the horizontal tube from the vertical fork tube to the handlebars, and provides its own small ‘handlebar’ for more instruments, as shown in the following picture

Side view

Side view showing aux instrument bar holder clamped to horizontal fork tube

20140812_061016_resized

Side view of aux instrument holder

Unfortunately, after a short time the strap that holds the instrument holder to the bicycle  broke, rendering the whole thing useless.  The first time he thought it was maybe it was just a random manufacturing defect, but after going through several that all exhibited the same failure mode, he basically gave up on that model.  When I  mentioned that I might be able to help out with my brand-new PrintrBot 3D printer, he brought me the parts.

When Ray brought the broken clamp in, it quickly became obvious what the problem was, and why it was breaking so quickly.  the system uses a metal band that is drawn down into a cavity by an adjustment screw, and this action requires the clamp band to make a right-angle turn right at the nut on the screw.  The band metal is thin steel, and quickly develops fatigue cracks right at the bend.

Mounting Clamp

Mounting clamp interior view showing the capture nut

Mounting Clamp

Mounting clamp and steel strap. Note the break occurs right at the right-angle bend

capture bolt

Capture bolt/nut. Notice the strap residue still on the nut

After some thought, I decided that the solution was not to try and reproduce the system exactly,  but to redesign the clamping system to use a standard pipe clamp instead of the steel strap.  The trick would be to ‘cut’ a slot through the body of the plastic clamp in such a way as to still allow the mounting bolt to attach the clamp to the rest of the system, while still leaving enough thickness to prevent the pipe clamp from breaking through the plastic part under load.

After going through a number of revisions and downright mistakes, I finally got a product that worked.  One of the mistakes I made was trying to create the part without a decent set of calipers for precision measurements, resulting in a part that was about 10% undersized in one dimension, and about 10% oversized in the other.  I remedied this problem by getting a very nice Fowler digital caliper from McMaster-Carr.  Another minor problem was that the capture screw was too long, and interfered with the pipe clamp band.  I solved this problem by simply cutting down the bolt a bit with a hacksaw, as the extra length was no longer needed.  Also, as this was my first real 3D printing project, the print quality left something to be desired.  Since this project, I have figured out how to get much higher quality prints.

Bike Clamp Versions

Original clamp on left, mis-sized version in center, final version on left. Note slots for pipe clamp band

After action reporting:  Ray reported that the new clamp worked perfectly on his bike, and seems to be holding up very well.

20140812_071325_resized 20140812_071224_resized 20140812_071253_resized 20140812_071317_resized