Wednesday, July 22, 2020

Focusing Masks for Telescope and Camera

I have a Meade 4.5" reflecting telescope that's about 20 years old. It's an entry-level, consumer model, not a high-end unit that serious amateur astronomers would use. Since I got a good Olympus Micro Four Thirds camera that is small and light enough to mount on the telescope, I've reactivated it. (See my other post about 3D printing an adapter.) I've done a lot of work improving the mount hardware and tuning the controller software to be able to take good pictures through it.

One of the hard parts of astrophotography is ensuring the scope is focused as well as possible before taking multiple images. One might think, "just set the lens to the infinity mark", but for a couple of reasons that doesn't work. In 2005 a Russian astronomer invented the Bahtinov mask, and later Chris Lord adapted it into the Lord mask (or "Y" mask). A focusing mask splits light from a bright star into a diffraction pattern. It can be easier to see changes in the pattern as you focus the instrument than it is to see changes in the focus of an actual star image. Here's a great article showing how they work. The consensus on line seems to be that Bahtinov masks work better, but Lord masks are easier to fabricate (by hand or by printing). They are available commercially. A few people have written about 3D printing either kind of mask, but not many. There are a couple of designs on Thingiverse. But the size of the openings in the mask are related to the focal length of the telescope or lens, the size of the total pattern is related to the aperture, and the overall size of the mask is related to the physical dimensions and how you plan to attach it, so the mask designs tend to be specific to a particular lens or scope.

So naturally I planned to design and print my own. Fortunately there is a web site which can generate 2-D Bahtinov mask layouts (as SVG files) for any combination of focal length and aperture. I could generate them for my devices, and design rings to attach them to the front of my lenses and scope. Since the Y mask is far simpler, I worked on that first. The width of the legs of the Y is supposed to be the same as the width of the slots and bars in the B mask. For my telescope, that works out to 3mm wide, which is no big deal to print. I did the designs using parametric modeling so I could tweak the bar width as well as the rim size for a good fit on the lenses.






Here's how the finished Y mask looks. I tried it on my telescope one night, and I kinda-sorta-maybe could see the "spike" pattern that you use for focusing. The images I took of Jupiter were reasonably sharp. But I could not really say this worked.





For my camera lenses, the calculated Y leg widths are problematic:

  • 40mm to 150mm zoom lens: 0.1mm to 0.5mm wide
  • 25mm prime lens: 0.1mm wide
  • 14mm to 42mm zoom lens: 0mm to 0.1mm wide
My smallest 3D printed nozzle is 0.15mm. With careful software settings I can extrude a fraction of that, but it's difficult. A film of plastic that small is very fragile, and any irregularity in the print leaves gaps. There's an option to change one of the calculation parameters by a factor of 3, but that still means that for my smaller lenses the dimension would be 0.1mm to 0.2mm.

With some trial and error I was able to produce some Y masks for my 25mm and 40-150mm lenses. When I tried them I could not see any spikes at all.



So I went to Plan B (pun intended). I generated a Bahtinov mask for my 40-150mm zoom lens. Since the pattern is tied to the focal length, one mask cannot be correct for the whole range. I chose 0.15mm which should work for the middle range, about 50mm to 100mm. Since the B mask is a negative design, slots instead of thin legs, it's much more robust and easier to get a good print even with tiny slits. 



Here's how it looks.







And this one worked great! Here's are images of the diffraction pattern, at normal size and blown up as the Magnify feature of the camera would show it. 




If the angles between the legs are equal, then the lens is in perfect focus. If it's off, then the central spike will be offset to the left or right, which is really easy to see as the angles become unequal.

Here's a test photo of Jupiter and its moons. This is not a great picture - at ISO 8000 there's a lot of noise - but the point is that when zoomed up to full screen, Jupiter shows up clearly round, its moons are visible as small points, and stars behind them are sharp small points. So the focus is perfect. This is 105mm, 1 second exposure.













Next I generated a much larger Bahtinov mask for my telescope. The focusing image is rather faint, but usable.
Here are images of Jupiter and Saturn from my first night of testing with the B mask on my telescope. These are composites of 9 images, stacked with SiriL and sharpened in Photoshop. (Click to zoom in on these.) The source images are sharper than I have been able to achieve before, but still limited by the atmosphere and the telescope optics.





Saturday, July 18, 2020

3D Printing PPE (Personal Protection Equipment) for Medical Facilities




In late March as the COVID-19 cases started increasing and putting stress on hospitals and clinics, I became aware of an effort by makers to print face shields. I first heard of it through a maker club where I work. It's a nationwide company and so our makers are pretty spread out. We shared a lot of info, but I was not able to cooperate with them on distribution.







I quickly chose to produce a design from Sweden called Verkstan. They seemed to have early acceptance from a number of hospitals and eventually from the National Institutes of Health. I didn't want to have to change designs, because of the learning curve.













The Verkstan design works with off-the-shelf clear folder covers or overhead transparencies. You punch them in a specific pattern with a standard 3-hole punch, and they fit right onto the frame. (They have different designs, because the media size and hole punch patterns vary by country.)

I used one of these shields for a couple of days during a woodworking project, and I found it to be light and comfortable. After a few minutes I hardly noticed it.








I got linked up with a couple of local groups that organized through Facebook. A lot happened in a short time regarding designs, materials, printing methods, throughput, standards that hospitals would accept, distribution, and volunteer organizations. Fortunately the group I joined had also settled on the Verkstan design, which made assembly and distribution a lot easier!

I did not blog about this at the time. Our focus was on quickly producing large volumes of acceptable products. Now that it's settled down, here's a summary of the main points.

From March 26 through June 13 I printed 405 frames, and packaged some of them with punched shields. I gave a few to hospitals directly, but most went through the FB organization. Since my company had us working from home, and eventually furloughed, I was home to keep this little "factory" going. (At the same time, my wife was mass producing cloth face masks for a couple of hospitals.)

I printed with 12 varieties of PLA and PET-G, and a new material called Orbium. I used up most of the PLA and PET-G that I had on hand, and bought a few rolls. At times it became hard to find filament on Amazon and at Micro Center. About that same time, my local Fry's electronics closed. (The Orbium was donated to the group, and I used a couple rolls of it.)

I have always kept track of my print jobs and settings, and what works and what fails. I improved my tracking so I could use a pivot table to see which materials worked better statistically. The oldest spools (it came with my printer) had a dismal 17% success rate... old and brittle. Most had a 50% to 90% yield. Inland PLA White yielded 96%, and CC3D PLA Max Yellow was 100% successful.





Because we were trying to produce a lot quickly, we worked on arrangements to fit multiple frames on the bed at the same time. With my printer's size, the most I could get at a time was two. Someone split the frame into two parts, which could nest a lot more onto a bed, but I was concerned about assembly and breakage, so I stuck with the single design, 2 to a run.






The other aspect was post-processing. All frames needed some cleanup of "nubs" so they would be comfortable to wear. Some products printed much cleaner than others. I made a *lot* of little tweaks within my slicing software, to reduce the amount of Dremel work per frame.










My heated bed has cold areas, and often the parts at the edges would come loose, spoiling a run. Running the machine day and night, the most I produced in one day was 19 frames. 9 to 15 per day was more common. I eventually added some "ears", a little extended skirt that helped some of the narrower parts stick to the bed better.







Some people were able to use a vertical "stack" design which allowed them to print 5 to 10 or more in one run, and then pop them apart. I tried some of their designs, and I tried some of my own. I could never find spacing and settings that would allow the multiple frames to come apart. They were always hopelessly bonded together. So I reverted to 2 at a time, and with some finicky filaments I just ran 1 at a time.

In late June, the OC group announced that they demand for 3D printed PPE had decreased enough that we could cease operations. The supply of commercial products had caught up with demand.

Tuesday, November 19, 2019

Telescope eyepiece adapter for Micro Four Thirds camera

I have a Meade reflector telescope which I haven't used in years. Back when I did use it, I had a Nikon DLSR which was really too big and heavy to even try to use on the scope. Even if the weight did not overwhelm the star tracking motors, the scope has enough "play" in the tripod and mechanisms that I figured it would be a pain to try to align. I never really looked into it back then.

A few months ago I got an Olympus OM-D E-M5 Mark II mirrorless camera. It's like a DSLR, but much smaller and lighter. I learned that some of its advanced features make it suitable for astrophotography, so I figured I'd check into it. One way to mount it is called "prime focus", and place the camera where the eyepiece (final lens) would go. The image forms directly on the camera sensor. The telescope essentially becomes a huge lens for the camera. So an adapter is needed that will fit into the lens mount on the camera, and slide into the focusing unit on the scope.

This camera is built around a specification named "Micro Four Thirds", and other makers such as Nikon, Canon, etc. all make them. I figured someone would have designed a prime focus telescope adapter for MFT, and sure enough I found one to download on Thingiverse, contributed by Nikolaus Spence. Cool! It printed easily. Then... I found that my entry-level telescope has a smaller eyepiece adapter than most. Mine needs a 1" diameter, and the download was a 1 1/4" and not parametric (changeable). Bummer! It looked like I'd have to design my own.

The problem is, the "bayonet" connectors for camera lenses are *very* specific and would be rather difficult to recreate. They look like three equally-spaced lobes around a circle, but they are not equal, so a lens can only go on one way. The tolerances are pretty tight. I reached out to Olympus to get the spec, but they don't give it out for free - it's only available to participating manufacturers.

I found a set of reverse-engineered CAD files on a site called Salvaged Circuitry, contributed by Anthony Kouttron. It included drawings, but even better, 3D shape files I could actually import into Fusion 360.






The shape was for both the bayonet mount that goes in the camera, and a flat flange with screw holes that would attach to a lens or whatever. I did not need the flange, so I used a construction plane and sliced it off, leaving just the bayonet mount.









Then I made a cylinder of the size needed to go into the telescope focuser, and joined it to the bayonet mount with cylinders. From the Thingiverse part I got the idea to make fine threads on the inside of the cylinder, to try to absorb any stray light rather than reflecting it.

Print 1:

The cylinder was too thin, and the attachment to the camera base too weak. It broke right away.






Print 2:

I thickened the cylinder and added a fillet at the joint. This one was more solid, fit into the telescope, and fit into the camera mount after a little cleanup. But it didn't latch into the camera when turned to the right point... it kind of jams in place after turning further. There must be something not quite right in the design or the print. But it works!






I tried it on my telescope one night with a clear sky and a nice moon. I found that the focuser-adapter-camera setup did not travel quite far enough inward to achieve focus. I had read about this issue. The way to solve it is to add a Barlow lens, a short tube with a lens that adds magnification and changes the focal length. My scope came with a 3x Barlow, and it worked well. I was afraid the extra length and the weight of the camera would make the setup bend or slop around, but it was solid. I was then able to focus the image, though it was quite tricky. Here's one of the best shots from that night.





















Later I noticed that the first layer(s) had not printed perfectly; one of the bayonet mount lobes was kind of lifted up and not filled well. I also thought that maybe the thickness of the lobes was not quite right and might be the reason the camera doesn't latch it. So...










Print 3:
Some time ago I had bought a set of different sized nozzle extruders for my 3D printer. The standard size for this kind of printing is 0.4mm. I had had limited success printing with another project with a 0.25mm nozzle, but I think part of that problem was the filament. This KVP PLA extrudes really smoothly, so I figured I'd go all the way down the the 0.15mm nozzle. The problem with tiny nozzles is they take longer to print, but this is a small part. At 0.4 it took just over an hour, and at 0.15 about 2:20, which is certainly reasonable. It printed very nicely - no clogs, but a *lot* of tiny hairs inside to clean up. I don't want plastic bits falling down into the telescope.

Print 4:
While #3 was printing, I had an Aha! moment. Maybe the reason I could not reach focus with the adapter was the fillet I added at the bottom of the cylinder. Maybe without that extra 0.1 inch, it would go down far enough to reach focus at infinity. I let #3 finish, then I hid that fillet, exported it and printed it again. Each part only costs 9 cents to print, so why not! Since I had thickened the cylinder at the same time as I had added the fillet I figured it would be strong enough. It is.








Now I need to wait for the moon to come back on a clear night. Maybe before then I'll try it during the daytime on terrestrial targets. After I test it out I'll upload it to Thingiverse and send thank-you's to Nikolaus and Anthony, and tell the folks on the Micro Four Thirds forums.

Update 2020-07-03: I finally got to test this out. The base is too thin, but with some paper shims I got it to work for now. Here is tonight's full moon:

Update 2020-07-18: I figured out how much thickness I needed to add to the base but found that the 3D file for the connector plate I had started with was not changeable. It was imported into Fusion 360 in a mode which precluded changing the thickness parametrically. I ended up redesigning the whole thing from scratch, using the dimensions from the diagram. After a couple of cycles of test-and-adjust I got a version which fits pretty snugly in the camera. The camera socket does not latch on to it, so it depends on friction. It would be better if I could make a version that securely locks in.

I tested this version and photographed Jupiter and Saturn over a couple of nights. (Not great photo quality due to a lot of atmospheric turbulence. I'll get there.) I think I hit the focus limit once, but that could be resolved by backing it out of the eyepiece tube a bit.












Now that I have a working version I shared the files on Thingiverse at https://www.thingiverse.com/thing:4546246

Monday, November 18, 2019

Elephant drainer version 2

I wanted to make an elephant drainer for my daughter. Her sink has a bit of a lip, and the current elephant's trunk lays flat on the surface. If the trunk sat on the lip, it would tilt the whole thing backwards and would not drain. So I revisited the design in Fusion 360 and lifted the trunk upward. Unfortunately that meant I needed to recreate the hole through the trunk. I printed a sample of the bottom part and found it needed to be lifted more. It was difficult to reshape it any more, so instead I rotated the front legs down, lifting the head and body off the ground. The downside of that is that it then required support structures under the whole belly, head, and trunk. That would take more time and plastic, but I went ahead with that design.

I thought I had enough of the nice silver (actually gray) PET-G filament, but it ran out about two-thirds of the way up.





















It would look funny, and the divider is designed for the full height. So... I guess I have a flowerpot (with drainage).












Unfortunately Micro Center no longer stocks that PET-G silver, which is too bad because it really prints nicely. I went on line and found eSUN Silk PLA. I printed this helix as a test. Look how silky smooth and shiny!










But that test object prints in one continuous smooth curve. No stops and starts. In real life I had a lot of problems with globs and gaps. I messed around a lot with temperature, retraction, etc. trying to improve it. I don't really remember the solution, but it eventually smoothed out a bit.









Failures #1 and 2 were that it did not stick well to the bed.
















Failures #3, 4, and 5 were that it would fail to feed, causing skips large and small. The small skips just caused unattractive dark lines of missing filament, visible on the side just above the top of the leg. The large skips caused subsequent layers to fail to adhere completely!

I used up the whole spool of filament and never got a successful print. I posted my experience in the review section for the product on Amazon.




Back to Micro Center for an alternative gray. They had Inland PLA+ Silver which looked pretty good. It's actually gray, slightly shinier than the Inland PET-G.  Rather than start out with the elephant, I printed several test cubes and cylinders. It took some futzing, cleaning and lubing of my machine, adjusting temperature, speed, and extrusion width to get a clean print. Were those adjustments the cause of the failures on the eSUN Silk? I don't think so... I think the eSUN Silk had variations in the density or melting point, causing it to temporarily clog and then restart printing.

I had one early adhesion failure, which was fixed by reapplying Magigoo. I eventually got a completed print.

So what is PLA+ ? Apparently it can mean whatever the manufacturer wants it to mean. Different filaments have different additives. In this case, the final product is *really* tough. The divider needs to be bent a bit to insert it, and I had to print it thinner than usual to have any hope of bending it enough.

Ironically, from hints on the Internet and in the packaging, it seems that Micro Center's "Inland" house brand is produced by eSUN. So the PET-G I liked, and the PLA Silk I hated, and the PLA+ I eventually used, with different results, are all eSUN products.

It's not as smooth as the Inland PET-G, but not too bad. And as my wife pointed out, real elephants aren't exactly smooth.







Sunday, September 22, 2019

QuilterCam

My wife is a quilter. She has a Long-Arm Quilting Machine for stitching together the top, batting, and back of quilts up to 10 feet wide.

It can be run manually, but it also has a computer drive mechanism so it can do preprogrammed patterns, doing a strip about 1 foot wide at a time. It's possible for the thread tension to be incorrect or go out of whack, causing the stitches to be uneven or "looped", mainly on the bottom side where it can't be seen easily. In that case one needs to stop it promptly and rip out the ugly stuff.

Since I had previously set up a Wyze camera to monitor my 3D printer from afar, we came up with the idea of having a camera show the bottom view of the quilter, to keep an eye on the stitching quality. But since the quilts can be up to 10 feet wide, a single camera won't show the whole area. So I'm working on a bracket to mount the camera to the bottom of the mechanism, so it will follow along and show the area just stitched.

The bracket needs to fasten onto the mechanism tightly because it's going to be moving around quickly. But it needs to be removable too. Fortunately there are a couple of holes conveniently placed on the bobbin arm.










I designed this angled plug on the end of some slightly flexible arms, to make what I call a "clip" that snaps onto the bobbin arm.

It took quite a few iterations to get the clip dimensions and stiffness correct. Fortunately I was able to print "slices" instead of printing the whole part.















Here's how it looks installed.

The bracket needs to be stiff in the X and Y dimensions, because the quilter head will be moving around quickly. But it does not move up and down, so stiffness in the Z dimension is not so important. In an earlier iteration I had the bracket extend beyond the clip to have some leverage to keep it from wobbling up and down, but that proved not to be necessary.





It's a large object with parts that go up and down from the central bracket plane, which would be hard to 3D print in one piece and would take a lot of support material. So I print it in two parts and plan to glue them together. At the moment they are held together with double-sided tape.

This went through about 3 or 4 iterations before I figured out a simplified design which needs almost no support material. Each part can be iterated separately.



There are some constraints on the location of the camera. It needs to clear the carriage mechanism in the Y dimension at one extreme, so the bracket can't be too short...












... and needs to clear a roller in the Y and Z dimensions at the other. Since it's so long, it has to slope down.












It needs to place the camera down a bit below the fabric so the camera can focus on it, and a bit to the left to look at the just-stitched area.










The Wyze camera comes with a tilt-swivel mechanism, so I just need to get the camera close to the correct location and angle, and then I can fine-tune it. I think I'll have to fix the tilt-swivel mechanism in place with some removable glue... it's not very stiff.








The camera needs power, and conveniently there is a USB port at the back of the carriage. The power cord is masking-taped in place for now, and when this is all finalized I'll fasten them in place with sticky cable clips.








Next step is to try it in action and see if there are any problems with vibration etc.


Tuesday, September 17, 2019

Diffuser for Olympus FL-LM3 flash



I love Thingiverse! It's a repository for the obscure, but it often has exactly what one needs. I recently got an Olympus camera which came with a tiny external flash. I looked on Thingiverse, and sure enough, someone named Dale Armit in Australia had designed a snap-on diffuser for it.

I downloaded it right away and recently got around to printing it in Inland PLA (white, of course).






The first try did not come out so well. The first few layers had a lot of gaps and failures to adhere. And the rest of it had little gaps as well. It's pretty common to have issues the first time around, and fortunately little things like this don't use much time or plastic: it only used $0.33 of filament. So I changed several settings:

  • Reduced the speed
  • Increased the temperature
  • Measured the actual filament diameter with calipers. It was about 3.5% smaller than the previous filament I used. That doesn't sound like much, but it causes the software to underestimate the amount of plastic to extrude.
  • Checked the fan speed settings.
  • Closed the air conditioning vent in my office, so a blast of cold air would not interfere with adherence.
When you're dealing with fractions of millimeters, these little variations can make all the difference!

I was able to test the fit with this part, and it seems to be just fine. The next iteration is looking good.



LGBTQ+ pronoun add-ons to church name tags

A few months ago we held a workshop on LGBTQ+ topics at our church and one topic was how to let people know what to call you - what pronouns you use.  Some people have started to use little buttons or stickers that say she/her/hers, or whatever they prefer. An important aspect is that not only LGBTQ+ people can wear them, but "allies" can wear them too. That helps prevent anyone from feeling singled out, and communicates that you are LGBTQ+ friendly!

At the end of that workshop my wife and I came up with the idea of making standard pronoun name-tags available for people to use at church, that would look like and blend in with our regular nametags, to normalize the idea.  We developed the idea of a magnetic pronoun tag that would attach to our regular nametags. We are not the first or only church with this idea. A small but growing number of churches and temples around the country are starting to do something like this. 





It had to be just the right thickness to bring the pronoun part "up" to match the level of the name tag part. And the dimensions would need to specifically match the name tags that we buy. We learned that regular badge-makers could not produce such a product. They work with flat sheets of plastic and we needed a 3-dimensional part. So 3D printing was the natural solution.









They would be optional (not everyone will want one), and removable (because people may not be comfortable wearing them all the time) and changeable (because people's gender identity and/or choice of pronoun can change over time, or even day to day). We 3D printed some samples and wore them for a couple of months, in various places to get people’s reactions and spread the idea. 




The great thing about 3D printing is the ability to quickly try out designs. I tried just a plastic back that would go between the name tag (which has a magnetic plate) and the "backer" that has three magnets, so it would be clamped between. That was not secure enough, so I decided the add-on needed magnets too, so it became a sandwich. 




The lettering on the prototypes did not come out very well. I wanted to use a very small nozzle to get finer details, but I knew that would make the rest of the part take a long time to print. I used a filament-switching technique I've learned, to print the main part in black and the front part in white, with the letters "cut out" to let the black show through. It was good enough for a prototype.





Once we had worked out the details, we contacted our badge maker and arranged to have the pronoun parts professionally made in the right size to work with the add-on.

Next I worked on mass-producing them. I worked out a layout that would let me put 15 to 20 at a time on the print bed.

Unfortunately the heating of the bed is not uniform, and the parts in the back and corners would not stick, and would curl up. I eventually settled on an arrangement of 15 at a time. (This being PLA, we were able to rescue some of the curled ones by pressing them with an iron.)




We bought magnets on line and glued them to the back with superglue because the bond needed to be strong. Kind of tricky, and messy at times. I used the regular "backers" on the other side of the parts to align the magnets and keep them in place while drying. Then we glued the pronoun plates to the front with Goop because that does not need to be strong, and if it ever becomes necessary to pull them off for some reason, Goop is relatively peelable.

We produced 130 of these and have made them available at church. They're a big hit!