April 18, 2024
Description
If you search printables.com for the term “pinhole”, you will find a lot of pinhole caps/lenses models. But they all have one thing in common: It seems like nobody seriously tried to make a lens using a 3D printed pinhole - all of them either use an added plate with a pierced or drilled pinhole, or a giant-sized hole of about 1 mm in diameter.
Well, at first glimpse it does not seem to be a good idea to 3D print a pinhole, but if you take a closer look at the different ways to obtain a hole and compare them regarding the criteria that define a pinhole's quality, you notice that it's at least worth a try:
Well, to be considered perfect, a pinhole should have the following properties:
The usual ways to produce a pinhole are to either drill it, laser it, or pierce it using a needle. Let's have a look at how well these methods perform under the above aspects compared to 3D printing:
This comparison shows that, although obtaining a drilled or lasered (and anodised!) metal foil pinhole will surely produce the maximum photo quality, 3D printing still has advantages regarding hole size management and usability of solid-colored material. So let's have a look at how such pinholes perform in practice.
Here you see a microscopic photo of a 3D printed pinhole followed by a photo taken with that pinhole mounted to a digital camera (click to enlarge). Below that, there's a microscopic photo of another printed pinhole followed by a photo taken with that pinhole, and so on (five pinholes in total):
None of these images was edited except for white point setting and exposure harmonisation. If you want to take a closer look, you'll find the fullres files in the download section (Fullres_JPEGs.zip).
Learnings from this series:
One more thing you can see in the microscopic photos is that retracting (and unretracting) settings influence result quality quite a lot. I didn't have black PLA in stock, so I used PETG - maybe not the wisest choice in that respect; guess that with PLA I would have better results (reason why I'm curious for yours). In critical cases like this accurate retraction settings do not only affect stringing but also the shape of fine details. Anyway, for prints like these correct calibration of any kind (feed rate, retraction, geometry…) is definitely beneficial.
Altogether I'm quite satisfied with pinhole #5’s image quality. Yet the optical defects especially with #1 and #2 also have their own peculiar charm. However, if you're going to print your own pinholes, I can promise you that the process will be quite iterative, meaning you will produce a series of holes with different properties as well…
So, if you are willing to take that challenge, here's how to proceed:
Obviously, you need a digital camera capable of changing lenses (of course, you could use a film camera as well, but this would make iterative processes quite lengthy). Next, you need an M42 adapter for that camera's specific lens mount. Such an adapter looks like a flat ring (like this one) if your camera is an SLR or like a tube (like this one) if your camera is an EVF. If you can afford it, prefer an adapter with a brass or steel bayonet rather than aluminium.
The filament used for printing should be as black and as dull as possible. If you own multiple filament types complying to this, choose the one that behaves most precisely and repeatably in print. There are no special physical (other than optical) material requirements, so PLA is fine.
First, print (at least) one of the three tubes in the download section. Which one you need depends on your camera type:
There are no special requirements for this print.
Next, print an appropriate pinhole plate. This is somewhat special:
Since it is absolutely hopeless to try to print a hole of sufficient quality in the first print layer, we need to just print a bigger hole in the first layer, then a hole of our desired size in the second layer that step-by-step gets bigger again in the subsequent layers. So, if you want a pinhole of (e.g.) 0.2 mm, the loop that represents the hole in layer #1 should have an inner diameter of about 0.6 mm. On top of this, we put the actual pinhole loop with an inner diameter of 0.2 mm in layer #2.
So far, so good - but how do we achieve this precision in real life?
Simple: By the use of your slicer's elephant foot compensation feature (Recommendation: Run my elephant foot compensation test before you print the pinhole). Most likely you regularly use a value of about 0.15 mm for this. Now, if you enlarge this value by 0.2 to about 0.35 mm, this means that the printed hole will have a radius of about 0.2 mm more (= diameter of 0.4 mm more) in the first layer than in the second layer. Thus, the “circle” that is “smeared” to the baseplate (hopefully) does not affect the shape of the second layer's circle but makes a base that is (hopefully) tight enough to support that second layer ring.
This is how this looks in your slicer preview (seen from below, at some enlargement, of course):
in the subsequent layers, the ring/hole gets bigger with every layer added (seen from above):
This is simply achieved by the model's geometry (which would not work for the first layer). Thus we can make sure that the hole has its minimal diameter in one single layer.
I have uploaded six different pinhole plates featuring (nominal) hole sizes between 0.35 and 0.425 mm diameter. I suggest to use 0.4 mm for a first test. Set layer height to 0.15 mm for the first and 0.075 mm for all subsequent layers and play with elephant foot compensation as described. Use a very slow speed setting of about 4 mm/s for small (and first layer) perimeters and confirm it by inspecting your slicer preview set to color by speed.
Tip: Use a small cylindric modifier (about 3 mm in diameter) in the middle of the pinhole plate that limits the speed to 4 mm/s for all affected walls. Thus, all rivaling settings that may keep the speed from getting that low will be anulled at least for layer 2+.
Note: Nozzle size hardly affects precision aspects in this use case. Don't expect more precision with a 0.2 mm nozzle than you would get with a 0.4 mm nozzle. And don't expect decreased precision with a 0.6 mm nozzle. I just recommend to set extrusion width to your nozzle's exact diameter (i.e. use 0.4 mm extrusion width with a 0.4 mm nozzle, and so on).
After printing , hold up the plate against a bright light source. If you can see a minimal spot of light in the middle of the plate: Congratulations, you have a pinhole. If not, use a bigger diameter file for the next test. In case that you can't produce a pinhole even with the 0.425 mm file, you most likely have to (generally) decrease your flow factor value in the current filament's settings.
However, if you succeed in printing a pinhole, next try the next smaller diameter file to be sure to really max out your printer's capabilities trying to print a hole as small as possible.
Note: Since you are operating your printer quite at the limit of its mechanical accuracy, results are not 100% repeatable. Even if you repeat a print without any setting changes, results will differ.
As stated above, a pinhole is not “the smaller the better”. Most likely the “best” in your collection of printed pinholes will not be the smallest one but the one having the closest-to-circular shape. However, you can't predict a pinhole's properties by inspecting it with the naked eye. If you own a microscope, I would like to encourage you to inspect your pinholes at about 50x to 100x magnification. If you don't, just put them onto your camera and take some test shots. In both cases you will doubtlessly find out which pinhole is your favourite. The difference is that, if you take the microscope round, you will know why. ;)
Next, it's definitely clever to somehow mark the plate(s) you like best (or discard the others).
To take photos with the pinholes, you have to (1) screw the pinhole plate to the corresponding tube, (2) screw the tube to your M42 adapter, and (3) connect the adaptor to your camera.
Thanks to today's sensors' high light sensibility, exposure time will be just a fraction of what a pinhole camera needed in the film era, but you will still need a tripod for photographing (expect about 1 to 10 seconds exposure time at ISO 1000 in normal daylight photography).
I don't get tired of stressing that I would never use a 3D printed bayonet to connect anything to one of my cameras directly, this being one of two reasons why I offer these files for use with an M42 adapter only. Maybe you thought different. Until today. But once you have experienced that a nominal hole width of at least 0.35 mm is needed to produce a 3D printed hole of about 0.2 mm, you may want to revise your perception of the accuracy your 3D printer delivers.
If you use a printed bayonet connector, maybe it will fit well. At least after connecting and disconnecting it a few times. But in this case, the difference between “before” and “after” is the abraded plastic particles inside your camera.
So, if you want to experiment with selfmade optical equipment, please buy an M42 adapter. It's quite a universal interface as well as it's the least that should stand between your camera and your experimentiveness. ;)
License:
Creative Commons — Attribution — Noncommercial