Programming Lessons from 3D Printing
I am on a mission in my home studio to eliminate the need for tripods
I am lucky that I grew up in a household where engineering, making, building, and learning were important values - thanks Dad Jeff Barr .
Be sure to follow Jeff to see some of his really cool 3d printing projects! I have also caught the 3d printing bug and decided to solve this with 3d printing.
Goals and Project Requirements
The project would have 3 major components
For the rail, I considered using V-slot extrusion. However, it is expensive for this application. I may upgrade to V-slot later, but it seemed overkill for V1. I decided on using a 10ft piece of Unistrut. A 10 ft length is available at any Home Depot for ~$45. They are robust, and are perfectly capable of holding some A/V equipment.
Use AI For Help
I am not a mechanical engineer. Not by any means. I am mechanically inclined and have a good idea for what will and will not work. This is my first project where expensive pieces of equipment will be hanging above my head. So, I do want to be confident that the gap between light and head won’t suddenly close to 0mm.
My first step was to ask ChatGPT some rules of thumb.
Adapting that to my use case:
Trolley print orientation
Some of the advice from ChatGPT I already knew, but it is really easy to forget to change certain settings and wind up with a messy pile of plastic spaghetti. Using AI, can help you remember the critical details.
Iterate Quickly
Iteration 1 - Print something from Printables
I wanted to see if something I could find online would meet my needs already. Searching for “unistrut trolley 3d print” led me to this.
This used press-fit skateboard bearings to ride in the track of the unistrut, and then things could be hung from the lower set of pegs. I initially thought that I could print this out, and then build “adapters” to hang stuff on to the lower pegs. I liked this approach because skateboard bearings are cheap - you can get 100 on Amazon for $17. Probably not the best quality for skateboarding, but good enough for this application.?
I printed out the trolley and it slid in the Unistrut reasonably. However, because I put nuts directly through the unistrut, the trolley was too tall.?
领英推荐
Iteration 2 - Modify something from Printables
To fix the problem with Iteration 1, I tried cutting some off of the top in Prusa Slicer. This worked, and iteration 2 successfully slid back and forth in the Unistrut mounted to my ceiling. However, it was a bit too short and stubby, and often bound if there was any sideways load on the strut. Also, the bearings were a tight fit and sometimes got stuck in the track. I suspect that this is because my ceiling is not perfectly flat, and the Unistrut has conformed to the contour of my ceiling.
Iteration 3 - Create a DIY solution
To fix the issues with Iteration 2, I decided to use smaller bearings. I started in Fusion 360 with a rectangle, with 4 pegs for small bearings sticking out of the side. This took a while to print, but it did work. However, when iteration 3 was in the track, it was a bit too narrow and would partially fall out! Also, I needed to iterate faster. 3d printing is slow!
Iteration 4 - Better tolerances
I made the pegs on iteration 4 wider. Crucially, I realized that I did not need to print out the full prototype in order to test how well it slides. I just needed the part that was in the unistrut. So, I fixed my prototype, and then cut off the bottom part (which would eventually be used to hold a camera or light), and just printed the sliding portion. This prototype was the best so far. However, I still had issues with it slipping from side to side. If I made the bearings stick out and farther to the side, they would bind against the side of the strut. I realized that bearings are really cheap, so why not use more??
Iteration 5 - Sideways bearings
I carefully measured the width of the Unistrut. Then, I subtracted 1mm because there may be a narrower portion of the Unistrut, as it is just a piece of rolled steel sheet - it is not a high precision part. I added some pegs for the larger skateboard bearings on the vertical axis, so it could roll against the side of the strut.
From the top, it looks like this:
Following my rapid-iteration process, I printed just enough of the component to test it out. Once it printed, I tested it and it worked great! I was satisfied with this design, that it was enough to go forward to the next part.
Iteration 6 - Holder/Slider Combo - the seams between components
I had initially thought that I would build a trolley for each component. But, it seemed like a much better idea to build a generic trolley and then have different “holders” which I could mount to the trolley. Mounting the light was the first priority. I ended up designing the following:
The idea was that I could make multiple of the trolley (left), and then make different holders as needed. The holder on the right is designed for my new light, a Godox S100D. The interface is an evenly spaced set of 8mm holes. This way, I can slide the holder onto the trolley and use M8 nuts and bolts to secure them together.
This is the seam between components that is going to make things simple. I can improve on the trolley mechanism without making new holders, and I can make new holders without needing a new trolley. This is exactly what I want. They may be slightly over engineered, but I am not making this for mass production.
This orange one is for the camera. The green one is for my light.
The bearings used in this project are 608ZZ and 2RS bearings, which are both cheap and readily available on Amazon. I am using PETG filament because it is a good balance of strength, ease of printing, and it is inexpensive. Unistrut is available at any Home Depot, and although it isn’t a precision piece of equipment, it is good enough for this application. Finally, the interface between the trolley and the holder is itself a standard within this system. It’s easy to model, and only needs M8 hardware to work. I also used a bit of teflon tape and some silicon grease to make it slide smoothly.?
Experiment Inexpensively
The best part about this project was that it works! I am using it right now. It’s easy to build new holders. All I need to do is match the bolt pattern and the width of the trolley, and I’m good to go. After using the light for a few days, I decided to work on the camera holder. I am going to build a camera mount onto some 3030 aluminum t-slot extrusion. I haven’t finalized the design in my head, but I know that 3030 is the next step in the path between “holder” and “camera suspended in air.” I quickly did a modification to the light holder to hold a piece of 3030 extrusion.
Lessons for Programming
This whole process was relatively straightforward. I was able to use AI to get good advice for printing structural components: material selection, print orientation, proper settings, etc. I was able to find a natural seam in the work, where different parts can be changed. Rahul Subramaniam(CloudFix co-founder) has a great saying: “Write code which is easy to delete.” In this case, it would be easy for me to change a holder or change a trolley, without re-inventing the entire system. This is because I have a good interface.?
I was also able to iterate quickly, because I had a clear goal in mind and was not trying to design the ultimate generic ceiling-mount system. I just wanted something which I understood and which worked for my needs. In programming, there is a constant idea that you could code up some abstractions and frameworks to solve a much more general version of the problem than the one you are currently facing. I’ve done this a lot of times, and often the investment does not pay off. The project becomes too expensive in terms of time and complexity. I am sure that there are better ways to mount a movable light to a ceiling, but my approach was effective and is working right now.
Also, I probably could have used less bearings in the trolley. I could have streamlined the design to use less filament. However, at this scale it doesn’t matter - I am not building something to be mass produced and be as cheap as possible. This is a problem I often see in cloud cost optimization - optimizing towards the wrong dimension. For example, if you are picking an EC2 instance, you can pick exactly the one you need at On Demand rates. Or, if you can be flexible, you can get a much larger machine at a lower cost using spot instances. My binding constraints were my time and my CAD skills. So, I would rather use more filament and more bearings than necessary in order to get something done now, rather than optimize towards constraints that aren’t important.
There is also a lesson about using standard components. Too often people are paying way too much to run their own software. For example, many people use EC2 and manually install and manage databases on their EC2 instances. This is an expensive and complicated way of running a database. A much better way to do this to use a managed service! Look at AWS as a set of building blocks that are readily available and work well together. Similarly, this project does not require special hardware of any kind - everything is standard and easy to find.
In the first picture, notice that there is a bungee cord. For my light holder, all of the strain is in the peg. If it ever breaks, it will break by shearing the peg, and the light will fall. The bungee cord is to keep the light from hitting the ground, or any kids that happen to be walking under the light. Lesson: always limit your blast radius! In the cloud, you limit your financial blast radius with billing alerts, practicing the principle of least privilege in your IAM credentials, and having guardrails in place so that you don’t get cost explosions.
Finally, a good lesson is to try the simple thing first! Use Haiku, it is really inexpensive and surprisingly good at even complex tasks. You don’t need to jump straight to gpt-4-vision or Opus. And speaking of Haiku, I better get back to Emacs. I’ve got some fun work extracting metadata from screenshots of my livestream, AWS Made Easy, which I host with Rahul Subramaniam . If you are into cloud, cost optimization, and AI, please tune in every Tuesday! Check out CloudFix for details.
Wrapping up
Taking a functional approach where you iterate quickly and inexpensively is a great way to build things - either software or 3d printed parts!
I help companies resuscitate dead leads and sell using AI ?????????????? #copywriting #emailmarketing #coldemail #content #databasereactivation
10 个月Great insights. Can’t wait to check out the full article.