top bar


Revision as of 13:16, 20 February 2013 by Kdb (Talk | contribs)


pgFocus is an open source and open hardware focus stabilization device developed by Karl Bellvé at the Biomedical Imaging Group (PMM, University of Massachusetts Medical School).

The pg in pgFocus is short for "Pretty Good". pgFocus isn't "Perfect", or "Definite" but it is pretty good!


pgFocus uses the same Atmel ATMEGA 32U4 as seen in the Arduino Leonardo.

pgFocus is connected to a computer via a USB port. USB is used to power and to communicate with pgFocus.


After the Arduino Leonardo was released, pgFocus was redesigned to take advantage of the bootloader from the Arduino Leonardo. If you can write an Arduino sketch, you can modify the source code to pgFocus!

pgFocus software reports the following:

  • Light profile as seen by the Linear Light Array.
    • Use this to align the physical position of pgFocus with the return laser beam.
  • Current centroid location of the light profile as seen by the Linear Light Array.
  • Microscope stability based on the running Standard Deviation(converted to nM movement at the objective).
  • Digital to Analog converter voltage output need to maintain current focus position.

pgFocus software can do the following:

  • Lock focus at the current position.
  • Move focus up by a specified amount (currently set to +50nM).
  • Move focus down by a specified amount (currently set to -50nM).

pgFocus software has not be released yet since it was designed for the prototype version of pgFocus rather than the this version. It will be released as soon as possible.


pgFocus uses a laser beam that is total internally reflected off the cover glass/water interface to monitor the microscope focus. Hence, an objective with an NA of at least 1.45 is required. The laser beam wavelength should be different from that being used for science (808nm is a good choice) and must be coaligned with the TIRF beam. This can be done using a mirror, beam splitter and a short pass filter. Care must be taken to ensure that the fluorescence filter cube and other microscope optics will allow the return of the pgFocus beam back along its input path and back to the pgFocus detector and that the microscope optics will NOT allow the laser light to pass into the user's eyes or to reach the camera. Once the position and angle of the pgFocus beam is coincident with that of the TIRF beam a strong return pgFocus beam will be seen that moves with changes in microscope focus. The pgFocus detector array can now be aligned and centered on the beam.


pgFocus is designed to track and control focus within ±3nM at 30Hz under optimal conditions (tested with a high NA 60X Objective plus 1.6X optivar).

Movie,, of pgFocus in action. 200nM beads were TIRF imaged with uManager's burst mode with a 60X objective with a 1.6X optivar.

The microscope is enclosed in an environmental chamber. The doors to the chamber were opened at image 300 and closed at image 600. You will see a disturbance to the focus at both times, but focus is soon corrected within moments. The focus is disturbed due to the change in the temperature gradient across the microscope.



pgFocus couldn't have been designed without the support of the Open Hardware community.

Adafruit industries

Sparkfun Electronics


© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact