Build the World’s Most High Tech Pinhole Camera: the Z9
How did people do photography before they could buy lenses? They built pinhole cameras, of course. All they would need was a light-tight box with some film inside it. The first mention of creating a pinhole camera comes from David Brewster in 1856, which actually predates the founding of Adorama or B&H photo…
Nikon Z9 with 45mm pinhole lens
The idea of viewing images through pinholes goes back as far as the 5th century B.C. as a matter of fact. Even in modern times, I’ve seen people who forgot their reading glasses put 3 fingertips together to be able to read what’s on the menu by looking through the little gap between those fingers.
I thought I’d goof around and see what it takes to turn my Nikon Z9 into maybe the world’s fanciest pinhole camera. I wanted, of course, to make this pinhole lens interchangeable and reasonably robust.
I found a website at pinhole.cz where a guy named David Balihar created a free program called PinholeDesigner. His site also has some fun information on making pinholes, and he includes a fun pinhole photo gallery.
David’s program uses a formula developed by Lord Rayleigh in 1891, which determines the best pinhole diameter for a desired focal length and light color. The “best pinhole diameter” means that it yields the sharpest image, or maybe the least lousy image.
I quickly discovered that optimal pinholes are really, really small. The smallest sewing needle I could find has a diameter of about 0.71mm. I found some straight pins as small as 0.57mm. I wanted to design a 45mm lens, and it needs a pinhole diameter of 0.3mm (half as big as a straight pin). I own a precision caliper to make measurements like this.
I decided that I’d make a pinhole in the bottom of a soda can, where I’d pierce the metal with a sewing needle. I would try to limit the hole size by only letting a portion of the needle’s taper pierce the metal. I accomplished this feat by placing the aluminum can against a hard metal surface, and then pounding the needle through the can until it was stopped by this hard metal. This procedure also kept the aluminum can bottom from deforming while I was pounding on it.
I chose a soda can bottom for the pinhole material because of its shape. A section of a sphere is very strong. Aluminum is an easy material to work with, and there is no concern about either corrosion or having it degrade with exposure to sunlight. And it’s cheap; I didn’t want any big investment in this fun little experiment.
My basic lens design was to use a lens adapter (I have both the Nikon FTZ adapter and the cheap Minolta Fotasy adapter) and then add extension tubes onto the adapter. Using extension tubes, I have lots of options on the focal length. The pinhole in the soda can bottom neatly slips over the extension tubes. A bit of double-stick tape keeps the can bottom in place.
After I got a really, really small puncture in the can, I rounded it out by gently rolling the needle tip in this hole with my finger tips. If the pinhole isn’t round, it will cause very poor image quality. I would also sand both sides of the hole in the can, to get the surface as smooth as I could. I used a powerful magnifier to make sure the hole looked reasonably good.
Some tools used to make a hole in the can bottom
First, I cut the can bottom using scissors; the thin aluminum is fairly easy to cut. I used vice grips to hold the needle; holding the needle in your fingers is too dangerous. I placed the can bottom onto a rounded metal fence post cap, so the can wouldn’t buckle as I pounded the needle through the aluminum can while using the hammer.
Fence post cap, used like an anvil to hammer against
After each tap on the needle, I would check the can to look for light coming through. As soon as I saw some light, I stopped pounding. I then rotated the needle tip in the tiny hole on both sides of the can until the hole was smooth and round. I also sanded both sides with fine sandpaper. I used my magnifier to monitor my progress, and repeated the steps until the hole looked good. I don’t know the final hole diameter, but it looks like about half of the size of a sample piece of can where I pierced the metal using the 0.57mm straight pin. My goal is to end up with a hole diameter of about 0.3mm, so that I can make a 45mm lens.
Tiny hole in can center, about 0.3mm diameter
Lens adapter with extension tubes and tape
The shot above shows my Minolta Fotasy lens adapter (a hollow metal tube without any electronics). The extension tubes are mounted on the end of the adapter, which yields a focal length of about 45mm. This combination is slightly longer than 45mm, but the curved can bottom goes a bit inside the tubes. There’s some double-stick tape on the tube surface, so that the can bottom will stay in place after it’s slipped over this adapter/extension tube combination.
Can slipped over the extension tubes and lens adapter
Once the can bottom with the hole is slipped over the adapter, it needs to get sealed against light leaks. I used some black electrical tape for this purpose. The shot at the top of this article shows the completed assembly. If I wasn’t so lazy, I would have painted the shiny aluminum with some flat black spray paint (but mask the pinhole).
Pinhole Designer showing diameter needed for 45mm lens
The shot above shows the Pinhole Designer in action. Note that the light wavelength is for green light (550nm, or 0.00055mm). My lens has a calculated aperture of f/151. My tested aperture turned out to be really close to this value.
After I made the lens, I compared shots of subjects against another camera with its lens zoomed to 45mm. This pinhole lens does indeed cover a 45mm lens field of view almost exactly.
Now you know how I ended up with the 45mm focal length and the 0.3mm pinhole design. I just relied on this Pinhole Designer program.
First, the good news: focus speed happens to match the speed of light. Chromatic aberrations are nearly absent. Optical distortion is near zero. Vignetting performance is good. Astigmatism is the lowest I’ve ever seen.
Now for the bad news. Make no mistake: pinhole camera lens resolution is crap. Contrast is even worse. I thought I’d try to get some numbers on just how bad the lens performance actually is.
Focus chart with measurements added
Chart section up close: MTF50 resolution is about 4.9 lp/mm
The focus chart image looks simply terrible. The black square edges look mushier than any results I have ever seen with a lens. I consider resolution to start looking sharp at about 30 lp/mm. Really professional lenses get MTF50 resolution measurements in the 60’s and 70’s. These pinhole results show a peak performance of 4.9 lp/mm. Most of the little targets can’t even get measured. Embarrassing.
MTF contrast plot
These are the lowest readings I have ever observed. The only good news is that the meridional and sagittal values are the same, which means that there is no astigmatism.
I made all of these measurements using the MTFMapper program by Frans van den Bergh. I actually had to alter the program's "threshold" value before it could even see the chart details, because they were so fuzzy and low contrast.
Fountain 1/5s, ISO 400, sunshine.
Mexican palm 1s, ISO 100. Sunshine.
Statue up close, shade. 6s, ISO 100
Rusty the Rabbit, 1/160s ISO 12800. Hand-held, sunshine
Succulent Close-up, hand-held. 1/100s ISO 12800.
If you ever want to take shots that look like they were made in the 1800’s, this is a way to do it. You might want to convert them to black and white first, though. And sepia tint.
Close-up shots actually look a lot like they might be a painting. Landscapes have everything look equally sharp (or unsharp).
I found this to be a really fun exercise. To me, it’s just amazing that images can be made with no optics at all. With modern cameras being so good at high ISO’s, you can actually get away without using a tripod while shooting at f/151! You probably want to stick with mirrorless cameras for pinhole 'lenses', so you get to see a bright image while shooting.