Project tutorial
Focus Stacking System For Gametophyte Ferns

Focus Stacking System For Gametophyte Ferns

Macrophotography of fern gametophytes using a DIY focus stacking system.

  • 5 respects

Components and supplies

Apps and online services

About this project


Jennifer Deegan

Tim Deegan

Richard Mortier

Matthew Couchman


The aim of this project is to home-build a microscope capable of photographing gametophyte ferns. The style of photography aims to produce attractive images of the sort that might normally be seen on the front of Gardeners' World Magazine, or similar.

The technique to be used is called focus stacking and Jennifer Deegan has already worked extensively on developing a system. She has taken a fairly good photograph of a gametophyte fern, using a set up that relies on a modified flatbed scanner (image below). For a full understanding of focus stacking please refer to the flatbed scanner introduction page. The aim of this current project is to significantly improve on that first image.

This project is a collaboration between many people. The principles of the design came from the forum members at The design is particularly based on the Bratcam, by Chris Slaybaugh. The focus block was provided as a gift by one of the forum members (Doc.Al). Some of the electronics and programming, and some of the fitting together were carried out by Tim Deegan. He also helped with the principles of the design. Jennifer Deegan did everything else.

Below are some of the fern photos that we managed to take with the finished setup.

These are also available via the Chlorophyllosophy Image Library.


There is a lot of complex hardware involved in this project, so a structured introduction is given on this page, and each section references another page, on which details of that part are given.

The following is an image of the full photographic setup including the optics, electronics and laptop:

This is the setup including just the optics and electronics:

This picture shows the optics:

Rail Hardware

The hardware for the rail is one of the most critical parts, as this gives very fine control over the movement of the camera, and underpins the quality of the slices from which the stack is derived.

Hardware for the optics.

The quality of the optics is critical, as this determines the quality of the slices from which the final stacked image is derived.

There is also an investigation of the depth of field of the optics, using a stage micrometer.

Hardware for the lighting.

Effective lighting of gametophyte ferns for macrophotography is very tricky. These subjects are translucent and tend to produce specular highlights when the cells reflect the light of a camera flash, or create diffuse white lighting across the whole image. We have attempted to mitigate these issues using the techniques described.

Hardware to minimise vibration

Vibration is an important factor in photography at this tiny scale, so we used specific methods and hardware to control it.

Other hardware

Fern specimens are mounted on a piece of blutac on top of a paint pot. The lens of the camera needs to be slightly propped up to be horizontal and this is done by putting a pencil eraser under it.


There is a lot of software involved in this project. Some was bought, and some was written by Jennifer and Tim Deegan.

In-house software

Software was written in-house to drive the rail. We provide instructions on how to drive the rail system using either an Arduino or a Raspberry Pi. Please see one or other of these pages for the software documentation depending on which hardware you are using.

Bought software

The following pieces of commercial software were used:

  • Helicon focus for stacking the images
  • EOS Remote for focusing the camera and figuring out the camara settings.
  • Adobe photoshop CS3.

Growing ferns

Growing the photographic specimens is one of the trickiest parts of this project. The protocol that I am using is described.

Installation, Maintenance and Testing Guide

A guide to testing is provided.


If anybody would like to copy the hardware and software that we have designed here, they are welcome to do it, but they must provide full attribution, and an appropriate fee in the case of commercial use. The design has been accepted for publication in the Pteridologist Magazine 2018, so attribution should cite "Deegan, J. and Deegan, T. (2018), The Pteridologist Magazine".

The copyright of any photographs produced using this equipment is owned by Jennifer Deegan. Anyone who wishes to use the photographs should approach her directly through the Chlorophyllosophy Image Library or through the University of Cambridge. This copyright also applies to the photographs of the system used on this website.




Img 5946 8qfmikessm


Similar projects you might like

Focus Stacking Rail Made From a Microscope Focus Block

Project tutorial by Jennifer Deegan

  • 9 respects

Driving a Focus Stacking Rail Using an Arduino

Project tutorial by Jennifer Deegan

  • 1 comment
  • 9 respects

Climate Chamber System

by ms_peach

  • 1 comment
  • 10 respects

A fall detection system based on Arduino, Windows and Azure

Project tutorial by Jiong Shi

  • 63 respects

Heart Rate Monitoring System

Project tutorial by Team HRMS

  • 41 respects

Touchless faucet with door control system for COVID-19

Project tutorial by Rucksikaa Raajkumar

  • 38 respects
Add projectSign up / Login