Daniel Ricci

Optoelectronics group meeting, 27 Jan 2006
A software solution for the 12-fibers
ribbon cable test
Daniel Ricci
Web page:
http://indico.cern.ch/categoryDisplay.py?categId=482
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
1
What do we need?
A first-level system to test a 12-fibers ribbon cable.
For the moment we don’t care:
• which kind of cable (single-ribbon or multi-ribbon);
• when the test should be done (cable arrival or during installation).
We started to use the cable prototypes with MPO connectors on both ends.
Test system should be: efficient, automatic, cheap, easy-to-use...
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
2
What is the idea?
The aim is to verify the cables integrity (in some way...) being sure that:
• fibers are not broken;
• fibers are not over-bended;
• connectors are ok.
This can be done, in a first approach, by inserting light into the fibers and
looking at the end if:
• we are able to see 12 lighted spots;
• the light level, for each spot, is above a minimum value
that we can consider acceptable.
A system LED-based, capable to insert light into a MPO-connector, has been
recently developed by R.Grabit, C. Sigaud and J. Troska.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
3
What is the method?
How to recognize the spots?
The idea is to acquire a digital image of the 12 spots and analyze
it, using a software instrument, to understand the cable status.
Shopping list:
light emitter;
camera (Nikon Coolpix 995 with serial cable);
camera objective–MPO adapter;
 software.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
4
The software concept 1
Let’s imagine to have (in some way to be defined later) an image to analyze.
Width
1536 pixels
Full resolution with digital zoom
With LabVIEW it is possible to convert an
image in a map of pixels.
The image depth in full resolution is 24 bit.
The 24 bits are grouped by 8 according to
the RGB color representation.
Of such image is so possible to give a tridimensional view:
Origina l 3D pict ure plot
Length
2048 pixels
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
5
The software concept 2
The image needs to be cleaned  three types of cuts:
 length (10%) and width (15%) cuts: without effects on the area of interest;
 depth cut (variable): to eliminate the spots halo, preparing the image to the
peaks recognition.
Cut 3D pict ure plot
depth cut: 85%
It is now possible to define a spots recognition subroutine which should:
• recognize if the spots are 12 (in case not, identify which is missing);
• “decide” if the spots have enough intensity.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
6
The software concept 3
Integration process
Width (Y) integration:
12 peaks can be recognized by using
a specific function in LabVIEW (we
need to define an “expected” peaks
width).
Daniel Ricci
Lenght (X) integration:
observe that peaks apparently
higher don’t correspond to highest
intensities. Now we need to define a
threshold (absolute? and? relative?).
Optoelectronics group – CERN, Jan 2005
7
The software concept 4
Two examples of problems encountered:
- peaks phantasm (solved)
- how to find the missing fiber number (limit)
Due to the depth cut effects, we could not be able to
identify the right number of peaks  another peaks
check was introduced during the second step of
integration by defining a different algorithm  double
check delete small (< 5%) peaks and gives useful
feedback on image resolution.
A grid on the
expected
peaks
positions has been
defined  we need a
starting point  we
cannot identify the
number of fibers if
missing one on the
edges.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
8
How to acquire a good image?
Remarks:
 Resolution and zoom: we want to avoid any possible digital treatment during the
image acquisition  no digzoom and no compressed resolutions;
 Focus: cannot be automatic (sensor is outside the objective)  must be set at
0.24m (tube length);
 Shutter speed: le light intensity is not compatible with the automatic mode  to
avoid over-exposure a proper value must be set;
 Aperture: cannot be automatic  dark background force to find the right value;

due to shutter/aperture constraints, the camera must work in full manual mode;
 Metering: exposure based on a small area of the picture with dark background ->
method suggested: “spot”.
Over this settings, we can also play with the software cut.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
9
Camera software 1
A good compromise is:
Resolution
Optical zoom
Focus
Metering
Shutter
Aperture
SW cut
Full basic
Max (no dig.)
0.24m
Spot
1/30
10.3
60%
Can we set these parameters through the serial cable?
We would like to be able to communicate with the camera using a LabVIEW
code...
Nikon has its own serial protocol not published  impossible to use directly the
hexadecimal commands  we need to adapt something existing.
Four free software are available online but only one can be used for our purposes:
PHOTOPC (http://www.math.ualberta.ca/imaging/ )
• it is a remote control driver for Nikon Coolpix cameras;
• it allows to use command line for serial communication (can be integrated in
LabVIEW);
• doesn’t use the original protocol: some commands may generate an error;
• not all commands are available (ex.: shutter and aperture).
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
10
Camera software 2
A LabVIEW code was written in order to automate the camera settings.
The software can:
 set the resolution, optical zoom, metering;
 take a picture (saved on camera flash memory) and transfer it to the HD.
The software cannot set a manual focus, shutter and aperture.
Time required to set the camera: 30s (but this has to be done only one time).
Time to take a picture and download it: 20s.
This delay is due to various factors:
• camera is using a serial port (no USB control is available for this model);
• camera always save the pictures on the flash card;
• camera needs few seconds after a command is sent to close the protocol
transactions.
Both programs (picture analysis and camera controller) were integrated in a unique one.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
11
Testing
The aim is to test the software capability to:
1) recognize peaks  no problems found until now if the tube position is
horizontal;
2) decide if a fiber has enough light  discussion is opened to decide about
threshold.
Some online examples
About point (2), 10 photos has been taken consecutively without touching the
hardware.
Results show that light variation is considerable (AC?, T effects?)
Remarks: - light intensity for fiber #0 is systematically lower than the others;
- software cut affects the integrated light!
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
12
Some results
180x10
6
180x10
6
170
160
150
150
140
140
Intensity
160
130
120
120
110
100
100
90
90
80
80
70
70
770
780
140x10
790
800
810
Position
820
830
840
760
6
140x10
130
120
120
110
110
100
100
90
90
80
70
60
Before cleaning
Shutter 1/30
Aperture 10.3
Focus 0.24
Metering Spot
SW cut 60%
50
40
30
20
770
780
790
800
810
Position
820
830
840
6
130
Intensity
760
Shutter 1/30
Aperture 9.1
Focus 0.24
Metering Spot
SW cut 65%
130
110
Intensity
Intensity
170
Shutter 1/30
Aperture 9.1
Focus 0.24
Metering Spot
SW cut 60%
80
70
After cleaning
Shutter 1/30
Aperture 10.3
Focus 0.24
Metering Spot
SW cut 60%
60
50
40
30
20
770
Daniel Ricci
780
790
800
810
820
Position
830
840
850
770
780
790
800
810
820
Position
Optoelectronics group – CERN, Jan 2005
830
840
850
13
Summary
A software instrument for 12 ribbon cable test was developed.
 camera parameters were defined: some can be automatically set, for
others a manual operation is required;
 the software works well on spots recognition (if picture is horizontal);
Limits: - picture must be horizontal;
- missing border fibers makes impossible to properly identify the fiber(s)
number...but it is able to point out this!
 the double peaks check is able to point out problems in the image
resolution;
 spots intensity measurement is possible but evaluation method needs to
be understood.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
14
Future developments
The cable test will be done under our supervision  we don’t need an
instrument for monkeys  we can tolerate to set manually the camera,
we can avoid to spend time for vertical image recognition, etc...
We need:
 to test the setup on different cables for a better debugging;
 to clarify the light variations behaviour to see if we can achieve a more
stable condition;
 define the thresholds;
 some “maquillage” actions on the code (put a control to verify if barcode
is correct, possibility to scan a barcode with a scanner, etc...);
 to define which kind of cable we want to test.
Daniel Ricci
Optoelectronics group – CERN, Jan 2005
15