Home Store Project Ideas Project Guide Ask An Expert Blog Careers Teachers Parents Students

Digital Pinhole Camera

Difficulty
Time Required Average (6-10 days)
Prerequisites Must have digital camera capable of taking long, controlled exposures without flash.
Material Availability Readily available
Cost Very Low (under $20)
Safety No issues

Abstract

If you sit under a leafy tree on a sunny day, you may notice spots of sunlight on the ground from light passing through spaces between the leaves. Try putting a piece of cardboard on the ground and examining the spots of light on the cardboard. Even though the spaces through which the light is passing are irregular in shape, the spots on the cardboard are round. What you are seeing, in fact, are projected images of the sun. Light passing through an aperture forms an image. A pinhole camera uses a tiny aperture, instead of a fancy lens, to project an image. What happens to the quality of the picture as the size of the pinhole is changed? This project shows you how to find out.

Objective

The goal of this project is to measure the resolution of a pinhole camera as a function of pinhole diameter.

Credits

Andrew Olson, Ph.D., Science Buddies

Sources

Cite This Page

MLA Style

Science Buddies Staff. "Digital Pinhole Camera" Science Buddies. Science Buddies, 28 June 2014. Web. 22 Aug. 2014 <http://www.sciencebuddies.org/science-fair-projects/project_ideas/Photo_p005.shtml?from=Blog>

APA Style

Science Buddies Staff. (2014, June 28). Digital Pinhole Camera. Retrieved August 22, 2014 from http://www.sciencebuddies.org/science-fair-projects/project_ideas/Photo_p005.shtml?from=Blog

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.


Last edit date: 2014-06-28

Introduction

Light passing through an aperture forms an image. Sunlight passing through spaces between the leaves on a tree projects an image of the sun. Make a loose fist with your hand on a sunny day and you can project an image of the sun through the aperture that your fingers make. For a great introduction to light and apertures, including many interesting demonstrations you can do yourself, see Bob Miller's "Light Walk" pages, in the Bibliography section (Miller, date unknown).

The resolution of the image projected from an aperture is determined by the size of the aperture (until the aperture becomes so small that diffraction of light dominates). Thus, the smaller the aperture, the greater the resolution of the image. When the size of the aperture approaches the wavelength of the light passing through it (roughly 400–750 nm for visible light) diffraction of the light by the aperture limits the resolution.

In this project, you will build a digital pinhole camera. You'll make several different-sized pinhole apertures for your camera, and you'll measure the camera's resolution as a function of aperture size. You can build a pinhole camera for film, but loading and unloading the film has to be done in total darkness. Also, you have to have the film processed before you can see the results. Determining the correct exposure time for a pinhole camera often involves some trial and error, and this can quickly become tedious when using film. A big advantage of using a digital camera is that you can see your results right away.

Since a pinhole does not let in much light, exposure times will be much longer for a pinhole camera than for a camera with a normal lens. Therefore, you must use a digital camera that provides a method for controlling long exposures (e.g., via a remote-control cable). For the lightbox camera described, exposure times may need to be tens of seconds, or even a minute.

There are two ways to make a pinhole camera with a digital camera. Which method you use depends on the type of digital camera you have. If your digital camera does have removeable lenses, you can make a pinhole for it using a spare body cap with a pinhole in place of the lens. With this type of camera, the light coming through the pinhole aperture forms an image directly on the light-sensitive component inside the camera.

If your digital camera does not have removeable lenses, you will use the "lightbox" (or camera obscura) method. With the lightbox, the pinhole projects an image onto a screen at the back of the box. Your camera takes a picture of this screen, through a small, light-tight "window" at the front of the box (see Figure 1).

Figure 1. Diagram of a lightbox-type digital pinhole camera.
Figure 1. Diagram of a lightbox-type digital pinhole camera (Hanft, 2005).

With this type of camera, the exposures are even longer than typical pinhole cameras, because the light from the pinhole does not fall directly on the light-sensitive region of the camera. Instead, the camera is capturing some of the light that is reflected from the projection screen. This, in turn, is only a fraction of the light that originally passed through the pinhole.

The resolution of the image will be determined by how much the light is "spread out" as it is projected through the pinhole. With larger pinholes, this will be determined by the diameter of the aperture. As the pinholes become smaller, diffraction will begin to have a significant effect. Diffraction ultimately limits the resolution of an optical system, even something as simple as a pinhole.

Terms and Concepts

To do this project, you should do research that enables you to understand the following terms and concepts:

  • Aperture
  • Diffraction

Questions

  • How small does the pinhole have to be before diffraction becomes dominant in determining resolution?

Bibliography

  • The following sites have useful information on pinhole cameras, including making pinholes, calculating exposure times, and calculating dimensions for building cameras:
  • This webpage has specific information on building a lightbox-type digital pinhole camera:
    Hanft, A., 2005. "Pinhole Camera (part 3)," Be A Design Group Blog [accessed April 3, 2006] http://www.beadesigngroup.com/blog/archives/2005/01/pinhole_camera_part_3.php.
  • Bob Miller has created many exhibits at the Exploratorium in San Francisco built around light projected through apertures. If you can't visit Bob's exhibits at the Exploratorium, you can still visit his "Light Walk" pages online. They are a good intuitive introduction to pinhole optics. You can also learn how to make your own pinhole viewer.
    Miller, B., date unknown. "Bob Miller's Light Walk," Exploratorium [accessed April 3, 2006] http://www.exploratorium.edu/light_walk/pinhole_todo.html.
  • Diffraction and the limit of resolution in photography:
    McHugh, S.T., date unknown. "Tutorials: Diffraction and Photography," Cambridge in Colour [accessed April 4, 2006] http://www.cambridgeincolour.com/tutorials/diffraction-photography.htm.
Measuring Resolution
  • Modern Photography, a magazine now out of business, published a kit for performing lens tests using the 1951 USAF target. At the very bottom of this source you'll find links to scanned copies of the instructions for performing the tests. Unfortunately, these are rather clumsy to read:
    Monaghan, R., date unknown a. "Lens Testing," Medium Format Photography Megasite [accessed April 4, 2006] http://medfmt.8k.com/usaf/.
  • This is a less detailed set of instructions, but much easier to use:
    Doty, J., 2000. "Lens Testing with the USAF 1951 Chart," JimDoty.com [accessed April 4, 2006] http://www.jimdoty.org/Tips/Equipment/USAF_Test/usaf_test.html.
  • You can obtain the actual target here:
    Monagan, R., date unknown b. "USAF Bar Target," Medium Format Photography Megasite [accessed April 4, 2006] http://medfmt.8k.com/mf/USAF.pdf.
  • Norman Koren's site also provides relevant information:
    Koren, N., 2005. "Understanding Image Sharpness, Part 5: Lens Testing," Norman Koren Photography Page [accessed April 4, 2006] http://www.normankoren.com/Tutorials/MTF5.html#whytest.
Measuring Sharpness: The Modulation Transfer Function (MTF)

Materials and Equipment

  • Box
  • Flat black paint
  • Aluminum tape
  • Scissors or a hobby knife
  • Rubber from bicycle inner tube
  • Soda can
  • Tin snips
  • Needle
  • Scrap wood (a few pieces)
  • Sandpaper, coarse and fine
  • Digital camera (must be able to take long, controlled exposures without flash)
  • Optional: Photo editing software will be useful for analyzing results.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.

Experimental Procedure

  1. The illustration shows an example of a lightbox-type pinhole camera, suitable for use with a digital camera (Hanft, 2005).

    Figure 2. A lightbox-type digital pinhole camera.
    Figure 2. A lightbox-type digital pinhole camera (Hanft, 2005).

  2. Here are some tips on constructing a lightbox-type camera (for more details, see Hanft, 2005):
    1. The box depth is determined by how close your camera can focus. The further your projection screen is from the pinhole, the dimmer the light will be, and the longer exposures you'll have to take, so try to keep this reasonably short (10-12 inches, if possible).
    2. Paint the inside of the box flat black to prevent stray reflections. This is especially important with the long exposures you'll be using.
    3. Cover the outside of the box entirely with aluminum tape, to ensure that your box is light-tight.
    4. For the "window" for your digital camera, use a piece of rubber tubing from an old bicycle inner tube to make a tight-fitting rubber seal that will fit around the lens of your camera. This will perform two functions: 1) make a light-tight seal, and 2) hold the camera firmly in place.
    5. Also, remember that the camera needs to be tilted down slightly so that it does not block light entering the pinhole (see Figure 1 in the Introduction).
  3. Turning a digital SLR camera into a pinhole camera is much easier. All you need are some spare body caps, which you should be able to order from the camera store where you purchased the camera. Find the center of the body cap and drill a hole in it. Glue a pinhole made from thin aluminum, over this hole, and make the glue joint light-tight by covering it with black tape.
  4. Here are some tips on making and measuring a pinhole (used for either type of camera:
    1. Here are instructions for making a pinhole from David Balihar: "A piece of metal cut from a drinks [soda] can, approximately 4 x 4 cm, is sufficient. First, using coarse sandpaper, remove the paint from the area where the hole should be, and try to make the metal as thin as possible. Then finish the surface by using fine sandpaper. Place the plate on a flat wooden block and, using a sharp needle, make the smallest hole possible. Be careful not to injure your hand and use a hard block to press down on the needle. Remove the embossed material from the reverse side of the plate using fine sandpaper. Place the needle into the hole again and, by gently pressing and turning the needle between your fingers, make the hole round. Smooth the hole again using sandpaper. It is necessary to repeat the process until the required diameter is achieved. A regular round hole in a very thin plate can be made with a bit of patience." (Balihar, 2006) Use the same size for each of the aluminum pieces, so that your pinholes are easily interchangeable on your camera.
    2. Remember to paint the back side of the pinhole metal flat black after you have made the pinhole. The back side will be inside the camera, and you want to prevent stray reflections inside the camera.
    3. There are many ways to measure the diameter of your pinholes. You can use a alide projector, overhead projector, or enlarger to project light through the pinhole, and measure the diameter of the enlarged image. To check the scale (enlargement factor) also measure the projected size of the edge of the aluminum. Another method is to use a flatbed scanner at 600 or 1200 dpi.
  5. Make a set of at least 3 different pinholes (more is even better) for your camera spanning a range of diameters from about 1.0 mm to 0.2 mm (or less).
  6. Experiment with exposure times so that you can photograph the same scene with each different pinhole to achieve about equal gray levels in the photographs. (The references in the Bibliography have information and calculators that should help with this. Knowing the diameters of your pinholes will also help.)
  7. If you are using a lightbox-type camera, it is best to keep the aperture setting constant, and change only the exposure time.
  8. Keep the camera steady by attaching it firmly to something heavy (e.g., a brick).
  9. The Bibliography has references that will show you how to quantify both resolution and sharpness for your photographs made with different-sized pinholes.
  10. Here are some questions you can attempt to answer with your pinhole camera.
    • What pinhole diameter maximizes resolution for your camera?
    • What pinhole diameter maximizes sharpness for your camera?
    • How do these compare to the predicted results from the pinhole calculators in the Bibliography? If there are differences, can you explain them?

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.


Variations

  • How does resolution with a pinhole compare to resolution with a normal camera lens?
  • How does depth-of-field with a pinhole compare to depth-of-field with a normal camera lens?
  • How does sharpness with a pinhole camera compare to sharpness with a normal camera lens?
  • Examine exposure time in relation to pinhole size. Remember to keep digital camera aperture constant for lightbox-type camera. Use photo editing software and adjust exposure time to match gray values in the images taken with different-sized pinholes.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.

Ask an Expert

The Ask an Expert Forum is intended to be a place where students can go to find answers to science questions that they have been unable to find using other resources. If you have specific questions about your science fair project or science fair, our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Ask an Expert

Related Links

If you like this project, you might enjoy exploring these related careers:

Mechanical engineer building prototype

Mechanical Engineer

Mechanical engineers are part of your everyday life, designing the spoon you used to eat your breakfast, your breakfast's packaging, the flip-top cap on your toothpaste tube, the zipper on your jacket, the car, bike, or bus you took to school, the chair you sat in, the door handle you grasped and the hinges it opened on, and the ballpoint pen you used to take your test. Virtually every object that you see around you has passed through the hands of a mechanical engineer. Consequently, their skills are in demand to design millions of different products in almost every type of industry. Read more
precision instrument repairman working on watch parts

Precision Instrument & Equipment Repairer

One of the basic truths in the universe is that objects tend to go from a state of higher organization to a state of lower organization over time. In other words, things break down, and when those things are precision instruments or equipment, they require the services of very specialized technicians to restore them to their working order. Precision instrument or equipment technicians often combine a love of music, medicine, electronics, or antiques with delicate mechanical repair work. Read more
Female physicist working

Physicist

Physicists have a big goal in mind—to understand the nature of the entire universe and everything in it! To reach that goal, they observe and measure natural events seen on Earth and in the universe, and then develop theories, using mathematics, to explain why those phenomena occur. Physicists take on the challenge of explaining events that happen on the grandest scale imaginable to those that happen at the level of the smallest atomic particles. Their theories are then applied to human-scale projects to bring people new technologies, like computers, lasers, and fusion energy. Read more
physics teacher helping student model a nanostructure

Physics Teacher

Our universe is full of matter and energy, and how that matter and energy moves and interacts in space and time is the subject of physics. Physics teachers spend their days showing and explaining the marvels of physics, which underlies all the other science subjects, including biology, chemistry, Earth and space science. Their work serves to develop the next generation of scientists and engineers, including all healthcare professionals. They also help all students better understand their physical world and how it works in their everyday lives, as well as how to become better citizens by understanding the process of scientific research. Read more

Looking for more science fun?

Try one of our science activities for quick, anytime science explorations. The perfect thing to liven up a rainy day, school vacation, or moment of boredom.

Find an Activity