Difference between revisions of "Team:Cambridge-JIC/Design"

Line 6: Line 6:
 
         <div style="width: 80%; margin: 30px 50px;color:#000">
 
         <div style="width: 80%; margin: 30px 50px;color:#000">
 
             <h1>Resolution Limits of a Microscope Based on Raspberry Pi Camera</h1>
 
             <h1>Resolution Limits of a Microscope Based on Raspberry Pi Camera</h1>
<p><h2> Camera Specifications: </h2>
+
<p><h3> Camera Specifications: </h3>
 
pixel size: 1.4um x 1.4um <br>sensor size: 2592x1944 pixels <br>total: 5MP <br>focal length: 3.6mm <br>aperture: 1.25mm <br>
 
pixel size: 1.4um x 1.4um <br>sensor size: 2592x1944 pixels <br>total: 5MP <br>focal length: 3.6mm <br>aperture: 1.25mm <br>
 
<a href="https://www.raspberrypi.org/documentation/hardware/camera.md" class="blue"> Source: Raspberry Pi </a> </p>
 
<a href="https://www.raspberrypi.org/documentation/hardware/camera.md" class="blue"> Source: Raspberry Pi </a> </p>
<p><h2>Theory of Optics:<h2>
+
<p><h3>Theory of Optics:</h3>
 
The resolution can be limited by two independent factors: <ul> <li>pixel size;</li><li>diffraction effects.</li></ul>The larger of these determines the actual limitation of the system. In our case we know that the pixel size is 1.4 um, so we now need to work out the diffraction limit, that is the smallest spot size which can be produced by the lens with the given specs. To calculate this, recall the Rayleigh criterion for a circular aperture:  
 
The resolution can be limited by two independent factors: <ul> <li>pixel size;</li><li>diffraction effects.</li></ul>The larger of these determines the actual limitation of the system. In our case we know that the pixel size is 1.4 um, so we now need to work out the diffraction limit, that is the smallest spot size which can be produced by the lens with the given specs. To calculate this, recall the Rayleigh criterion for a circular aperture:  
 
sin⁡θ=1.22 λ⁄d
 
sin⁡θ=1.22 λ⁄d
Line 22: Line 22:
 
2r≈3.8μm
 
2r≈3.8μm
 
This is almost three times the size of the pixel on the CCD, which imposes the actual limit on the resolution. The pixels of the CCD outresolve the theoretical lens limits.
 
This is almost three times the size of the pixel on the CCD, which imposes the actual limit on the resolution. The pixels of the CCD outresolve the theoretical lens limits.
 +
</p>
 +
<p> <h3> <b> Final resolution estimate of a microscope based on Raspberry Pi camera: 3.8um </b> </h3> </p>
 +
<p> Compare this with a typical size of a chloroplast: 3-10um. Our resolution will be just enough to image them, which is exactly what we have managed to do on this picture of Spirogyra cells: (picture) Note that these are larger than typical chloroplasts though. To obtain a better resolution, a lens with either larger aperture and/or shorter focal distance can be used, without the need of a better CCD. However, this is a tradeoff in terms of worse aberration and contrast. An improvement to the resolution will however be required in order to image bacteria, for example, which are of the order of 1μm in diameter.</p>
  
Final resolution estimate of a microscope based on Raspberry Pi camera: 3.8um
+
<p><h3> Inverting the Lens: Why and How: </h3>
 
+
The way a camera works is by focusing an image of a distant large object as a small set of points onto the CCD, which is positioned close to the lens (in its focal plane). Theoretically however, it might as well do the opposite (because light paths are reversible – a well known and intuitive physical principle): that is, inspect the CCD pixels and project their greatly enlarged image onto a distant screen. <br>The lens has a small aperture (1.25mm) at one end, and a larger one (4mm) offering a wider view angle at the other, which is required for viewing close up objects. This is normally oriented towards the CCD.  
Compare this with a typical size of a chloroplast: 3-10um. Our resolution will be just enough to image them, which is exactly what we have managed to do on this picture of Spirogyra cells: (picture) Note that these are larger than typical chloroplasts though.
+
 
+
To obtain a better resolution, a lens with either larger aperture and/or shorter focal distance can be used, without the need of a better CCD. However, this is a tradeoff in terms of worse aberration and contrast. An improvement to the resolution will however be required in order to image bacteria, for example, which are of the order of 1μm in diameter.
+
 
+
Inverting the Lens: Why and How
+
The way a camera works is by focusing an image of a distant large object as a small set of points onto the CCD, which is positioned close to the lens (in its focal plane). Theoretically however, it might as well do the opposite (because light paths are reversible – a well known and intuitive physical principle): that is, inspect the CCD pixels and project their greatly enlarged image onto a distant screen.
+
The lens has a small aperture (1.25mm) at one end, and a larger one (4mm) offering a wider view angle at the other, which is required for viewing close up objects. This is normally oriented towards the CCD.  
+
 
(image)
 
(image)
So, if we want to image a sample on a microscope slide, we need to:
+
<br>So, if we want to image a sample on a microscope slide, we need to:<ul>
position the lens close to the sample – at roughly the focal distance, that is 3.6mm;
+
<li>position the lens close to the sample – at roughly the focal distance, that is 3.6mm;</li>
orient the lens with its larger aperture towards the sample;
+
<li>orient the lens with its larger aperture towards the sample;</li>
position the sensor behind the lens, now at a much larger distance (roughly 2.8cm) – for this we have designed a special camera mount.
+
<li>position the sensor behind the lens, now at a much larger distance (roughly 2.8cm) – for this we have designed a special camera mount.</li></ul>
Now we have the Raspberry Pi camera working as a microscope!
+
Now we have the Raspberry Pi camera working as a microscope!</p>
  
The problem: how to unscrew the lens from the camera
+
<p><b>The problem: how to unscrew the lens from the camera</b>
 
The Raspberry Pi camera is sold with the lens screwed (and lightly glued) into the sensor casing. To unscrew the lens, you will need the right type of pliers: ideally with ridged surface. Grip the top part of the plastic casing of the lens firmly, being careful not to crush it, and rotate counterclockwise.  
 
The Raspberry Pi camera is sold with the lens screwed (and lightly glued) into the sensor casing. To unscrew the lens, you will need the right type of pliers: ideally with ridged surface. Grip the top part of the plastic casing of the lens firmly, being careful not to crush it, and rotate counterclockwise.  
 
(image)
 
(image)
After the first small rotation, you should be able to unscrew it fully manually. ATTENTION: might not work from the first time! Do not try to cut out the lens or force it out in any other way.
+
After the first small rotation, you should be able to unscrew it fully manually. <i>ATTENTION: might not work from the first time! Do not try to cut out the lens or force it out in any other way.</i>
 
  </p>
 
  </p>
 
         </div>
 
         </div>

Revision as of 16:50, 29 July 2015

3D Printing

© All About 3D Printing, 2015

The majority of the microscope parts were printed using a MakerBot Replicator Mini and an Ultimaker 2. These have RRPs of around £1,200 and £1,300 respectively, making them the most expensive aspect of the microscope project. However, this is relatively cheap in the context of standard laboratory hardware and once purchased, it can also be used for plenty of other projects.

The printer has 200 micron layer resolution. This is sufficient for the detail of the microscope chassis, optics bench parts and stage. The much finer detail of the Epi-illumination cube means that a printer with higher resolution may be necessary. As the name suggests, the printer is relatively small. It has a build volume of 10.0cm W, 10.0cm D and 12.5cm H. It comes with its own printing interface software, and is compatible with .stl files.



OpenSCAD Design

We are using an open-source software called OpenSCAD to design our components. Here the focus is on the CAD aspect, making it extremely powerful for designing machine parts. It is not an interactive modeller, and instead reads a script and compiles a 3D image. This allows configurable parameters to be programmed in to the designs.

When creating lens holders for the Optics Bench, this became extremely useful as the parameters for each lens could be filled in individually. A single design was readily modified to make each individual component. The software outputs .scad files, which can then be converted to .stl for printing.