Spotting Scope Webcam Adapter

scope-adapterSpotting scopes sold for bird watchers and rifle marksmen can be quite inexpensive compared to serious camera lenses of similar zoom capability. I knew there was a difference in the picture quality but wanted to try it first hand.

Since the picture is zoomed in so far, any physical movement is greatly magnified in the image. Which meant simply holding the webcam up against the eyepiece by hand just resulted in many blurry pictures. Taping them to each other wasn’t good enough – the small movement allowed by tape was enough to distort the picture. What I needed was a solid adapter to hold them against each other.

3D printer to the rescue!

The scope eyepiece unscrews easily, which makes for a convenient mounting point for a 3D printed bracket. The webcam is then attached to the bracket by means of a ring matching the diameter of the webcam. I didn’t want to spend too much time on fancy fastening designs on the first draft, intending to use tape. As it turned out friction was enough to hold everything together well enough for a quick experiment.

scope-camera

Results of the experiment: you get what you paid for. The image quality of a cheap webcam looking through a cheap scope was barely legible. I don’t intend to put more money into this investigation, so I’m unlikely to upgrade to better scopes. What I do have, though, are some better cameras which might be worth experimenting down the line.

One problem that I should have foreseen was the very incompatible fields of view of the two instruments. A webcam is designed to capture a very wide field of view, because during video chats the face is very close to the webcam. A spotting scope is just the opposite – it has a narrow field of view of a very distant object. When I put them together, what I get is the narrow scope view in the middle of a big wide field of black.

backyard-cat
A stray cat resting in the backyard under a leafy bush against a yellow brick wall.

 

 

 

 

Flan jar lid

flan-jar-lidNowadays people are familiar with recycling. But some people forget recycling is only the third alternative in “reduce, reuse, recycle.” The goal of this project is to reuse small glass jars instead of tossing them into glass recycle.

The jars came from an eight-pack of flan in little single-serve portions. The jars were sealed with a layer of foil, which was sufficient to preserve the flan until the expiration date, but the foil top was not reusable.

In order to reuse these jars, I need to make some lids. At first I thought a simple revolve would do the job – draw the profile of a lid with a lip, revolve it 360 degrees, done! Sadly it wasn’t that easy.

Problem #1: neither ABS nor PLA were flexible enough to make a practical lid. What I had drawn up is the shape of a Tupperware lid but my material did not have the flexibility of Tupperware lids. I thought this was solvable by making the lid precise enough so that it only needed a tiny bit of flexibility to work. That’s when I ran into the next problem…

Problem #2: The flan jars were not perfectly round and varied from jar to jar. This was perfectly acceptable for their original usage of sealing with a foil top, but tremendously inconvenient for me! It’s not practical to try to match the precise shape of each individual jar just to make a lid.

To work around these  problems, I switched the design so that the lid slides on to the jar sideways. Half the lid is rigid, reinforced by a strong lip to hold on to the jar. The other half has a small lip at the far end keeping the lid in place. The lack of a strong lip gives the lid a tiny bit of flexibility, so the small lip can be bent out of the way and the lid can slide off the jar.

The lids make the jars useful for holding small tools and parts.

flan-jar-lid

 

Shade for the Garage Door Opener

blindersAll modern garage door openers have a safety feature: a small light beam to detect objects that might be in the way. Most of the time this feature is unobtrusive working in the background for my safety.

Occasionally, though, the sun would be at an angle that blinds the beam receiver. When the sensor is blinded, the garage door opener defaults to safety and behaves as if there was an obstruction in the door. Great for safety, not great for actually getting the door closed. What we needed was a sunshade.

The tolerance requirements were very relaxed relatively to the other projects. I didn’t even need the precision of a caliper, a ruler was enough to get me in the right ballpark.

I rotated the shape 90 degrees, so that it faced down, to enable easier printing. By doing this the shape could support itself as the 3D printer built up the layers, no need to waste material printing supports. Aligning the object in this manner also resulted in a cleaner inner surface for the tube.

At the time of this project, my 3D printer was loaded with transparent filament. I decided to perform a test print even though a translucent shade would be counterproductive to the goal of shading light. I thought I’d make a few test prints and iterate to the final design as my 3D projects usually do, and load a different filament for the final print.

My plan was foiled by the realization it fit and worked right off the bat. Even though the end result is not opaque to light, I suspect it breaks up enough of the sunlight. If the transparency ever becomes a problem, I can always spray paint the exterior of the object.

Good enough! I declared the project complete and moved on to the next thing on the to-do list.

Update: I’ve printed and installed an opaque replacement.

img_5099

Worn AA Batteries Get a Second Life

battery-tray-exploded-viewThe “Duck light” project earlier was a lot of fun, crafting an object to be lit with a little LED tea light. I liked the result so much I kept it lit around the clock, which led to the obvious next problem: battery life.

These lights came with a standard CR2032 lithium battery good for 2-3 days of continuous use. Replacement batteries can be found for less than a dollar, but that’s almost as much as the cost of the entire light! I embarked on a project: find a better way to keep my lights glowing.

Online search found some basic details on CR2032. The full power voltage is 3 volts, conveniently a multiple of the ubiquitous AA battery’s 1.5 volt. More interesting, however, is that the quoted minimum voltage is 2 volts. Most AA-powered devices would stop working well before an AA battery drops to 1 volt, which implies that a “spent” AA would still deliver sufficient power for the tea light LED.

With this research in hand, I proceeded to design and 3D-print a small battery tray as simply and inexpensively as possible. Normally an AA battery tray has metal springs to push against the negative end of the battery. My project takes advantage of the fact the 3D printed plastic is flexible, and print a curved arch to provide this holding force.

I need something at each end of the tray to complete the circuit. One end is easy: I pulled the LED component out of the tea light base and used pliers to shape the wires into a Y shape to connect the battery terminals. At the other end, I used a piece of aluminum foil from the kitchen. Normally this is a bad idea because a thin foil of aluminum can’t carry much current, but it should be fine given the extremely low power flow of the LED.

To make the base more presentable, add a cosmetic shell to cover the battery tray and provide support for whatever we want to keep lit, and voila! A small lighted base for any purpose.

I had a pair of AA batteries that had been in my Xbox One wireless controller. I received “battery level low” errors for about a week before the controller refused to turn on at all. Yet these batteries were still powerful enough to light up the LED and keep them lit for many days.

A cheery light powered by batteries that would have otherwise been thrown away. Success!

aa-battery-base

 

 

Geometry Fun with Onshape Loft

300x170Further exploring Onshape’s geometry tools, I started playing with the loft command. This command allows me to select two 2D shapes and Onshape will calculate a volume that spans the two shapes.

It is fairly limited in what it can extrapolate, the shapes need to be fairly similar for this to work. Circle to oval? OK. Circle to polygon? Problems.

I’m sure the feature is only designed to handle things like generate an adapter part to mate one shape to another. It’s not for artistic things. That is more in the domain of a 3D sculpting tool and not CAD.

Still, there’s some room for entertainment, especially since these lofted volumes can then be fed into the boolean operations tool. The picture above is one such result. The exterior of the shape is a square lofted with an identical square that has been rotated 45 degrees. The interior is a very similar operation, but the squares were rotated in the opposite direction. Subtracting one from the other results in the cut-out shape above. The corner of the inner square, rising in an opposite direction, cuts the edge of the outer square.

Not that this is functional or useful in any way, but it is a fun exploration of three dimensional geometries.

loft

Duck Light

Duck lightAnd now for something with aesthetics as its primary function: A duck light. I started with the battery-powered LED lights imitating little tea light candles. These lights are widely available at very low cost from discount stores and dollar stores. My local 99-cent store sold a pair of lights for 99 cents.

The lights consist of the functional base, incorporating the battery, the switch, and the LED. It sits under the cosmetic shell, which is a cylinder pretending to be a candle with an unconvincing imitation flame above it. A little prying action should be sufficient to separate the shell from the base.

The unremarkable cosmetic shell can go in the trash. Then measure the diameter of the remaining base. Use that as a starting point: Go into Onshape and design a custom shell for that base.

My custom shell project started with a surface that describes a variant of the popular bathtub toy duck. It was not difficult to import the surface data into Onshape, but making use of the shape turned out to be more difficult than anticipated. Onshape surface manipulation tools aren’t robust enough (yet?) to deal with arbitrary surfaces imported from elsewhere. In theory I can use the “thicken” command to turn the surface into a solid, but it and many related operations fail with a generic error message.

After some trial and error I found that the split operation works: Define a large rectangular solid, position it over the duck surface, and split the solid block into two: the duck and its negative. After deleting the negative, I have a solid duck shape.

In theory I can use the Onshape “hollow” tool to hollow out the duck shape, but again I was stymied by the error messages. To work around this problem, I started crafting shapes to manually carve out the interior. It didn’t take terribly long to hollow out the bulk of the duck this way.

After sending the hollowed-out duck to my 3D printer, I was able to mate it with the LED light base and now I have a custom duck-shaped tea light!

duck

Sesame Oil & Chili Oil Holder

Sesame oil and chili oil bottle holderThe next problem to solve in the kitchen are a pair of oil bottles – sesame oil and chili oil. Conveniently, they are from the same company so they have the same sized bottles. Inconveniently, they stand taller than other items in the kitchen cabinet, blocking views to the back and easily topple over as I reach for nearby items.

I decided it’d be good to have them on the door instead. Pull them out of the clutter. The easy way to do this is to have a shelf on the door. Unfortunately, tall bottles make this complicated: the shelf needs to be deep enough so that the bottles don’t topple over when I open the door, yet not so deep to make the bottles inconvenient to access.

My solution is to start with a shallow and accessible bottom shelf. Above the center of gravity, the bottle will be held by a flexible clip. The clip needs to be strong enough to keep the bottle from toppling when the door is opened while able to give and release the bottle when I want to pull it free. 3D printed plastic can handle the flexibility part, no problem, but the durability is a question mark. The weakest part of a FDM printed part are between the layers. When something breaks it’s almost always at the layer boundary. It’s important to make sure that the design accounts for the strengths and limitations of the manufacturing technique. We accomplish the goal by arranging the features to avoid the sharp corners that magnify the stress of flexing.

Fortunately Onshape has plenty of tools to round out corners and edges. With the help of those tools and some creative intersection across orthogonal axis, the resulting shape looks more fluid and organic than it actually is. I’m pleasantly surprised at how well the appearance looks especially since I was strictly focused on functionality.

oil

Condiment Shelf Project

Condiment ShelfAfter being duly humbled by the complexity of the planetary gears project, I decided to back off a bit and tackle something simpler. While cooking in the kitchen, inspiration struck as I poked around in the cabinets looking for the condiments I wanted: let’s organize this thing.

This is a problem space ideally suited for 3D printing: Low-volume problem solving. Everybody’s kitchen layout is different, starting from the cabinet dimensions to the selection of spices and condiments to how much a person uses each spice in their preferred meals.

Naturally, I quickly dropped into the rabbit hole of devising a grand master plan to completely organize the kitchen cabinets. It took a while before I reminded myself: “Hey, remember when we decided to do something smaller and simpler?”

Right, that. Let’s get back to that.

The first item with immediate usefulness is a way to keep the sugar and salt containers in a way that keeps them accessible, standing above the fray of the other little jars and bottles. The few initial versions focused on building stack-able jar cubicles, but that ran into problems as the dimensions approach the maximum print size of my little printer.

Retreating yet further, I decided the vertical dimension support can be accomplished via some threaded rods and nuts I can buy at Home Depot. I only need to deal with the horizontal dimension – the shelf itself. The threaded rods are the vertical posts, they go through the small holes in each corner of the shelf. The shelf is then held in a particular position by the nuts on each of the rods.

Successfully reducing the problem down to basics gave me a small shelf that is quick to print and solves the problem. No more time-consuming huge cubes, just a small slice of plastic. It’s simple, it’s fast, it works.

If you also want to organize jars 9 cm in diameter, you can find this item in the Onshape public document library under the title “Condiment Shelf”

stack

3D Printed Planetary Gear

Planetary Gear ToyAfter getting the 3D printer settings dialed in, successfully printing small test objects, I decided to tackle a real project. Move beyond printing static shapes and make a multi-part machine.

In hindsight, that was too big of a step, but I didn’t know until I tried it.

The project of choice was to make a simple planetary gear toy. Such objects are in no short supply on Thingiverse, of course, with a huge spectrum of size and complexity. But I wanted to practice making my own end-to-end.

Why planetary gear? Because of all the basic mechanical machines out there, I was never able to build a planetary gear in LEGO. There was never a LEGO Technic inside-out gear for the annular ring in a planetary gear set.

The first obstacle was actually a surprise – I couldn’t find the gear tool in Onshape. I had expected the basic involute gear to be somewhere in the standard toolbox and found nothing in the documentation.

A search on Onshape forums determined that I was not blind – the feature is absent from the basic set. It was, however, available as a “custom feature” published as a public document by an Onshape staffer. Onshape has its own internal programming language called FeatureScript and a spur gear generator was available as a demo of the language. I’ll have to look at FeatureScript in more depth later, but for now I have my gear tool.

The first print didn’t work, as expected. The parts didn’t fit together at all. This is the point where I had to face the fact consumer 3D printers are still far short of professional machining tools in terms of precision. In my specific case, the extruded plastic “squished out” sideways so every dimension along the horizontal (X&Y) axis are too big.

I assumed this wasn’t a new problem so started researching. Eventually I found that some slicer software have the ability to compensate for this particular trait of FDM printers. Cura called theirs the “Horizontal Expansion” parameter. Unfortunately, I had to abandon the Cura 15.04.2 I had been using and restart with Cura 2.1.2 in order to gain that capability.

With some tweaking of the horizontal expansion parameter, I got my printed planetary gear to mesh and turn like I wanted. At least I found success! But that still took way more time and effort than I had originally bargained for.

Moral of the story: Building small scale precision machinery is beyond easy reach of consumer 3D printers. I might come back to this again, but in the immediate future, I’ll stick with simpler shapes and build 3D printing experience that way.

In the meantime, my project is a public document on Onshape. Search for its title “Planetary Gear Toy.”

planetaryruler

Starting Small with 3D Printing

OctagonTestThe current state of the art in consumer home 2D laser printer is that I can expect perfect prints immediately. Take it out of the box, load paper, load toner cartridge, hit print, and out pops a crisp printout.

The current state of the art in consumer home 3D printing is not anywhere near that level of maturity. It took several days of experimentation and many failed prints before I had something that was charitably described as passable.

Example #1: With a laser printer toner cartridge, the user doesn’t need to care about the chemical composition of the toner or the physical attributes of the powder within. The 3D printer counterpart is the plastic filament, and today the user has to know a lot. The user can choose the category of plastic (ABS? PLA? etc.) but the precise chemical composition varies from brand to brand. The user has to adjust the printing temperature to match the plastic. The user also has to keep an eye on the filament diameter because it may vary from the nominal quoted dimension, which impacts the volume of filament being fed into the extruder and thus print quality.

Example #2: With a laser printer paper tray, the user doesn’t need to care about the texture or the thickness of the paper. The 3D printer counterpart is the print bed, and today the user has to know a lot. The bed has to be level relative to the print head movement plane and also spaced appropriately for that important first layer. If it is a heated bed, the user has to specify the proper temperature for the plastic filament. The surface of the print bed has to strike a balance of adhesion. If the extruded plastic can’t adhere well enough, the part would detach mid-print and ruin everything. If it adheres too tightly, the resulting print would be hard to remove from the printer, possibly damaging the printer if you force it.

Because of those and many other variables, it is wise to start with something simple. Something small and fast to print so I can quickly iterate between test prints. Yet complex enough to show if the printer is doing a good job or not hitting the desired dimensions and holding tolerances.

For this, I created a small octagonal solid in Onshape(*). It has straight edges – both aligned with printer axis and not. Two round surfaces, and several horizontal surfaces. One or more features would go bad when the print settings aren’t ideal.

Print, fail, adjust, repeat.


(*) available as a public Onshape document. Log in to Onshape and search under public documents for the name “Octagon test piece”

Onshape Notes

onshape_logo_mediumWhen getting started with 3D printing, it’s easy enough to pull some nifty things from sites like Thingiverse and print them out. But I quickly got bored of that – the reason I got a 3D printer is to turn ideas in my head into reality, not somebody else’s ideas.

There are lots of options to create digital 3D objects, the one I started with is Onshape. It is a completely web-based CAD system with the ambition to take on the big professional engineering CAD systems. I chose it mainly because it ties into another of my interests: learning how web-based applications are replacing traditional desktop applications. CAD has been one of the cornerstones of expensive desktop machines crunching numbers as professional engineering workstations. Can Onshape (& peers) transform that world? I don’t know, but I want to see how well it works (or, potentially, not) first hand while having fun.

Fortunately they’re very friendly to hobbyists like myself:

  1. Their subscription plan has a free tier specifically for hobbyists and makers. The storage space is limited and you can only keep a few things private. So the scale and complexity of free projects are restricted, but all Onshape functionality is identical. This was important because a few other CAD solutions restrict functionality at the lower cost tiers… functionality such as export to STL. If I can’t export to 3D print, that would defeat the point of the exercise.
  2. There is an extensive self-training resources section. A free service isn’t much good if I have to fork out a fortune to learn how to use it. With Onshape, I don’t have to.
  3. There is an online community around the tool. Onshape is new and still has quirks and idiosyncrasies. (Well, to be fair, all software do.) With the help of other like minded people on the forums, I don’t have to reinvent the wheel and solve all problems by myself.

After spending a few days in the training section, I was able to create simple things in Onshape. As I started getting fancier, I started running into problems that need digging into the documentation and/or the online forums. As I learn more about Onshape I’m increasingly impressed with what they’ve done and what they’re planning to do.

It’s a fun and functional tool. Highly recommended.

Cura Notes

CuralogoA critical part of a 3D printing workflow is the slicer software. It translates the theoretical mathematical representation of the STL format into printer-specific commands of the G-code format.

Monoprice recommended Cura as the slicing software for the printer I bought, even including a copy of version 15.04.2 on the microSD card bundled with the printer. I went to the website to find the latest version, and found that Cura had completely revamped the entire UI with new version numbers. Do I go with the older generation or the new hotness?

Given that I am in completely new territory, I decided to stick with known quantity of the recommended product. That was a good call, because setting up for the Monoprice printer was much easier in the old software. With all its faults, the old software was able to get me started and let me learn about the basics of 3D printing parameters. And wow, there are a lot of parameters to learn.

The slicer software highlighted how non-standardized the 3D printing world is. I knew that the printers have a great deal of variation – a natural thing in a rapidly-evolving field – but it’s a bit intimidating to get started. I hadn’t known that the plastic feed was barely standardized. There are basic classifications of the plastic type, yes, but the formulations differ from one brand to another which affects the proper printing temperature. Even the physical diameter of the filament can vary. My printer uses nominally 1.75mm diameter filament, but the spool of filament I’m printing is actually closer to 1.79mm. This is significant enough of a volume difference to impact proper feed speed of the plastic stock. Just one example among many things I learned first hand.

I stuck with the old version of Cura (15.04.2) until I had a compelling reason to move to the latest version (2.1.2) of the new revamped series. That reason was the “Horizontal Expansion” parameter, available only on the new version. I needed it to compensate for 3D printer behavior, so I switched over. It was far more difficult to set up for the Monoprice printer, but thanks to the time spent learning on the old, I was able to get far enough to start printing with the new software.

I don’t know how well Cura stacks up among its peers in the slicing software world, as I haven’t used the others. I know it still feels like hobbyist software, missing a lot of polish I’d expect of a paid product.

However, it’s working well enough for me to learn and experiment, and that’s all I ask.

 

Entering the World of 3D Printing

153651And now for something completely different… I got a 3D printer! I’ve been keeping an eye on the field for years, and I knew it was only a matter of time before the price point drops to a point where I can no longer resist.

The Monoprice Select Mini 3D Printer (Item #153651) is their entry-level offering at $199. For an entry-level item, it has an impressive array of features. All the basics plus some not-so-basic features like a heated build bed. At the standard price it was already quite tempting. When Monoprice threw a 4th of July sale that cuts 20% off the price of any Monoprice-branded item… I could no longer resist.

As advertised, it came completely built and almost ready to go: the build bed levelling had to be double-checked because that can easily shift in transit, and indeed I had to make a few minor adjustments before it was level. It came with a micro-SD card with a G-code file ready to go, plus a short sample of PLA filament. I was up and printing within half an hour – very impressive!

The only complaint is that their sample filament is too short to actually complete the sample print job on the microSD card. If you look at the picture above (from Monoprice web site) it’s in the middle of printing the same object, and it is stopped at around the same point as the filament running out. I’m not sure if that’s a coincidence or intentional. In any case, I couldn’t complete the print until I got more filament to feed the machine.

Now I’m learning all the basics of tweaking a 3D printer. Temperature, speed, all that good stuff. It also means I need to learn some new tools. A 3D design program (I’m looking at Onshape, but there are many others) and a slicer to turn the 3D design into a G-code file (Monoprice recommended Cura for this printer.)

My Ruby on Rails education has been seriously sidetracked by this adventure, but it’ll be fun!