ATM - Martin Cibulski - 2004-01-10
Start > Automated Foucault Test


Automated Foucault Testing

I wrote a program for full-automated foucault testing with a webcam. It sends moving commands to my microcontroller board (normally used for my stepper motor driven split ring mount) via a serial port. The microcontroller moves the X/Y platform with the foucault tester. Without a stepper driven platform the program can be used too. Then the user has to move the platform to positions given by the program.

Now I added some features to the program.

1. The moving commands are configurable to use a mount controller for moving the X/Y platform. The mount controller must understand commands for moving in one direction where the length of the move is given in steps.

2. The number of ROC positions and the number of mirror zones ist configurable.

3. An output file can be produced which can is readable by the program Foucault.exe (written by Jim Burrows) to give the surface errors.


This is my first working version of this tool.

To get an idea of how the program works first download the program autofouc.exe.

Then perform the following steps (this has to be corrected for version 1.0.0):

1. Install a webcam behind the knife edge of your foucault tester. The webcam should (perhaps must) have a lens with a longer focal length than usual to get a larger image of the mirror on the screen. The mirror must have a dark background where its image will appear as a bright disk.

2. Start the program. The webcam driver should be already installed on the system.

3. Adjust the camera in a way that the mirror covers the center of the image. So the program later will be able to find the mirror searching from the middle to the outer areas of the image.

4. Click on (File/Source) and set the brightness control of the camera to manual. Click on (File/Format) and set the camera to RGB mode (24 bit per pixel). How this will be done is camera specific.

5. Set the X position a little bit inside ROC. This will later be taken as ROC position 0.0 for the test.

6. Adjust the knife edge to have a full illuminated mirror.

7. Click on (Image/Collect Samples) to get a first still image of the mirror.

8. Click on (Mirror/Find Mirror Frame) to let the program find the edge of the mirror.

9. Adjust the displayed frame around the mirror by pressing the cursor keys for changes in position or PgUp/PgDn for changes in size.

10. Adjust the knife edge to have a half illuminated mirror. If you don't the program will ask you to do that during the test until the average brightness of the mirror disk is near 127 (half intensity of 0-255).

11.Click on (Sequence/Start Test) to start the test procedure. The program will go to 20 ROC positions in steps of +0.1 mm. In manual operation it will prompt you to set the positions. At every ROC it scans 100 concentric zones and compares left and right brightness in sectors of +/- 45 degrees. After scanning all ROC positions the brightness comparisons for each zone are searched for the ROC where the zero line is passed. The ROC for exact zero is calculated by linear interpolation. At the end the program will write the ROCs of the zones and all raw data (brighness comparisons) in a file 'autofouc.txt'. Here is an example of the data file taken from my 6" mirror.