# Autocollimator

This folder contains instructions and the files to print build the laser Autocollimator used to measure the tilt of the OpenFlexure Block Stage. The OpenSCAD code used to design the parts is also included. A schematic of the laser autocollimator is provided below.

![Tilt_setup](autocollimator.png)

Start by printing the following parts:

* BeamSplitterMount.stl
![](beamsplittermount.png)

* laserdiodeholder.stl
![](laserdiodeholder.png)

* microscope_module_infiniteconjugates.stl
![](microscope_module_infiniteconjugates.png)

* picamera_shim_1mm.stl (you will probably need a few thicknesses which will involve modifying the OpenSCAD file)
![](picamera_shim.png)

You will also need
* 1x 12.7mm diameter, 50mm focal length achromatic lens](https://www.thorlabs.de/thorProduct.cfm?partNumber=AC127-050-A)
* 1x raspberry pi and associated power supply, monitor, keyboard, etc
* 1x [Raspberry Pi camera module V2](https://www.raspberrypi.org/products/camera-module-v2/)
* 1x [CPS532-C2 collimated laser-diode-pumped DPSS laser module](https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=1487)
* 1x A microscope slide
* A 5-6 mm drill bit.
* super glue
* A beam dump
* A standard 1" mirror mount
* Something reflective to measure

Take the microscope module and push fit the acromat len into the somewhat triangular gripper in the top of the part as oriented above (for more instructions and the insertion tool check the [OpenFlexure Microscope documentation](https://build.openflexure.org/openflexure-microscope/v6.0.0/docs/#/2b_high_resolution_optics_module)).

Next using two M2x6 screws attach the the camera to the bottom of the same tube. The module is designed so the camera is slightly too close to the lens, this allows it to be shimmed until it is on the focal plane of the lens. 

Connect the camera to the Raspberry Pi and boot the Pi. Once booted run:

    raspivid -t 0
    
The and point the camera at the far side of the room. Use the camera shims to get the far side of the room in focus. The safest way to do this is to turn off the pi, remove the camera, add a shim, and reboot. If you are very careful you *could* do it without powering off. **But you do risk shorting the pi and camera and potentially totalling both.** Once the far side of the room (or better a tree out the window) is in focus the camera is at the focal plane of the lens.

Next we modify the beamsplitter. the box on the side is a poorly designed light-trap. There is already a small hole from the main bore to this box. Drill this out and the full way through the box. Glue a microscope slide to the sloped surface of the beamsplitter mount (this is your beam splitter), with super glue. You can cut it to size first, but this can be difficult. Use M3 screws to mount the beamsplitter mount to the microscope module. The flanged base of the microscope module is the bottom, the ribbon from the pi camera should also be at the bottom.

Place the laser diode into the printed laser diode holder and mount this in the mirror mount.

Once this is done you need to setup everything as shown in the schematic, using a beam block to block the light out of the hold drilled in the beamsplitter mount You can use `raspivid` to check if the laser spot is on the sensor. Aperturing the laser diode can help with stray reflections.

You can then use the code in the tilt experiment to run the autocollimator (this also has camera settings that reduce the exposure and provide a smaller laser spot).




