SlideShare a Scribd company logo
The Design and Build of a Non-contact Extensometer for D.I.T’s
tensile test machine
By
Morven Gannon
No: c12760661
Faculty of Engineering
Thesis presented for the Degree of
Bachelor of Engineering Technology in Automation Engineering
DT003A
Supervisor: Ken Keating
Date: April 2015
Declaration
I hereby certify that this project report which I now submit for the award of Bachelor of Automation
Engineering is entirely my own work and has not been taken from the work of others unless otherwise
cited and acknowledged within the text of my work or in the Bibliography at the end.
This project report was prepared according to the regulations of the Dublin Institute of Technology
and has not been submitted in whole or in part for an award in any other Institute or University.
The Institute has permission to keep, to lend or to copy this report in whole or in part, on condition
that any such use of the material of the report is duly acknowledged.
The original design content of this report cannot be reproduced without the direct consent of the
author.
Signed………………………………………..
Date…………………………………………..
Abstract
The Lloyds LR30K Materials Testing Machine located in DIT Bolton Street materials laboratory has
been proved to give inaccurate extensometer readings. This generates inaccurate data that could have
an adverse effect on DIT’s intellectual property. The proprietary alternatives are beyond the
materials labs present budget so price was a consideration.
The principle objective of this project and the report is to resolve this problem by investigating,
designing, programming and installing a purpose built non-contact extensometer. This would take the
form of a vision system
The resulting vision system
Table of Contents
Chapter 1................................................................................................................................................vi
General introductions.........................................................................................................................vi
1.1 Introduction..............................................................................................................................vi
1.2 Project Aim..............................................................................................................................vi
1.3 Project Objectives .............................................................................................................vii
1.4 Chapter Summary ...................................................................................................................vii
Chapter 2...............................................................................................................................................vii
Literature Review..............................................................................................................................vii
2.1 Chapter Introduction ...............................................................................................................vii
2.2 General background history of tensile testing.........................................................................vii
2.3 Review of Materials Testing Machines .................................................................................viii
2.4 The Customer...........................................................................................................................ix
2.5 Detailed Problem Definition.....................................................................................................x
2.6 Tensile Test Procedure............................................................................................................xii
2.7 The Test Results.....................................................................................................................xiv
2.8 Tensile Test Samples ..............................................................................................................xv
2.9 Extensometer Types...............................................................................................................xvi
2.10 PC and Software .................................................................................................................xvii
2.11 Chapter summary.................................................................................................................xix
Chapter 3..............................................................................................................................................xix
Specifications and design Concepts.................................................................................................xix
3.1 Chapter introduction ..............................................................................................................xix
2.8 Considerations for using an Optical Vision System ..............................................................xix
3.2 Specifications.....................................................................................................................xxviii
3.3 Design inspiration .................................................................................................................xxx
3.4 Design concepts ....................................................................................................................xxx
3.5 Design concept matrix ..........................................................................................................xxx
3.6 Final design choice...............................................................................................................xxxi
3.7 Feasibility................................................................................ Error! Bookmark not defined.
3.8 Chapter summary.................................................................................................................xxxi
Chapter 4............................................................................................................................................xxxi
Final Physical Design ....................................................................................................................xxxi
4.1 Chapter Introduction ............................................................... Error! Bookmark not defined.
4.2 Design Description.................................................................. Error! Bookmark not defined.
4.3 Parts and Components Selection............................................. Error! Bookmark not defined.
4.5 Chapter summary...............................................................................................................xxxiii
Chapter 5..........................................................................................................................................xxxiv
Programming................................................................................................................................xxxiv
Materials Testing Vision System - MTVS...................................................................................xxxiv
The Path of the Image..............................................................................................................xxxiv
Choosing the appropriate IMAQ function to follow the image: ................................................xxxviii
Reading MTVS and Nexygen values and writing to a new array, graph and text file......................xli
......................................................................................................................................................xli
Write to Value and Array Sub (VI):..............................................................................................xli
The Timing Structure:..................................................................................................................xlii
Document Management and Graph Building: ............................................................................xliii
Sort to File and Array Sub (VI): .................................................................................................xliii
Read and Write File and Array SUB VI: ....................................................................................xliv
Graph Selector SUB VI: ..............................................................................................................xlv
Calibrating the image, converting the input values into real-world measurements and adapting the
mobile microscope function.............................................................................................................xlv
Calibration Gauge SUB VI ........................................................................................................xlvii
Range Gauge Application SUB VI ............................................................................................xlvii
Calibrated Real Measurement Conversion SUB VI...................................................................xlvii
Reset Sub (VI): .........................................................................................................................xlviii
5.6 Instruction Manual....................................................................................................................xlix
Chapter 6.............................................................................................................................................xlix
Validation of Project Objectives and Design Specification............................................................xlix
6.1 Chapter Introduction .............................................................................................................xlix
6.2 Project Objectives .................................................................................................................xlix
6.3 Design Specifications............................................................................................................xlix
6.4 Design Validation and Verification Matrix...........................................................................xlix
6.5 Chapter Summary ......................................................................................................................l
Chapter 7..................................................................................................................................................l
Conclusions and Recommendations ....................................................................................................l
7.1 Chapter Introduction ..................................................................................................................l
7.2 Conclusions................................................................................................................................l
7.3 Recommendations......................................................................................................................l
7.4 Reflections and Closing Statement ............................................................................................l
7.4 Chapter summary.......................................................................................................................l
Bibliography ...........................................................................................................................................li
Chapter 1
General introductions
1.1 Introduction
In a materials lab, the quality of research is sometimes determined by the quality of the equipment. In
order to produce accurate data you need to have complete confidence in the available equipment. In
a materials lab the tensile test is the most common way of determining the properties of a material and
its suitability for purpose. If the data gathered on a material is erroneous it could have disastrous
consequences at a later stage; for example, a tension test to determine the shear point of a bolt used to
hold stadium bleachers in place.
The machinery to perform this test can range from relatively inexpensive hand powered screw, lever
or balance machines, electric gantry or single post desktop systems to extremely powerful gantry
hydraulic floor based machines.
They are generally used to fulfil the function of reading a change in displacement against a change in
an applied force, to give a stress and strain graph and ultimately a ‘Young’s Modulus’.
In the DIT materials lab the tensile testing machine is a Lloyds LR30K. It is a well-engineered
machine and has a highly accurate range of load cells that give quality data about the applied load.
The LR30K’s internal optical decoder sensor which gives the
displacement measurements for stress measurements has
however, been proven inaccurate on frequent occasions. In order
to get equally accurate displacement readings, external
extensometers are required.
These range from electronic strain clip on systems, to extensive
vision systems using either laser tracking or optical mapping.
These are expensive additions to the machine and have been
beyond the materials lab budget since the machine was
purchased.
This project report contains a detailed literature review including
extensive investigation and research, with concept development,
system designs and calculations to produce an affordable
alternative to the available proprietary options that can deliver a
more accurate stress and strain graph than the present internal
The reports shows the methodology used, steps taken, objectives
targeted, progression of objectives, conclusions and
recommendations for further developments.
1.2 Project Aim
This project aims to design, and build an alternative extensometer system for the Lloyds LR30K that
can give comparable and if possible, more accurate readings than the present internal system. It
should be non-contact (more specifically a vision system), inexpensive, easy to use, fit for purpose
and adaptable.
Figure 1: The Lloyds LR30K Materials
Testing Machine (Capital Asset
Exchange & Trading LLC. , 2011)
1.3 Project Objectives
 Objective 1: Define the systems present deficiencies, the operation and procedure
of a tensile test using D.I.T’s Lloyd LR30K, and the test samples used.
 Objective 2: Compare the contact and non-contact extensometer systems on the
market, and assess an ideal solution.
 Objective 3: Upon determining an alternative, investigate its properties and
applications.
 Objective 4: To design and build a fully functional non-contact extensometer for
D.I.T’s tensile test machine at a reasonable price, using available software.
 Objective 4: Develop an interface that is comprehensive to use, with a calibration
capability and user defined functionality.
 Objective 5: Evaluate the performance of the system and refine the output to gain
comparable and if possible improved readings than the present system.
1.4 Chapter Summary
This introductory chapter has outlined the function of a tensile testing machine, and the problems
facing the currently used Lloyds LR30K tensile testing machine in D.I.T Bolton Street. The main aim
of the project was explained in a statement and then detailed in a list of primary objectives.
Chapter 2
Literature Review
2.1 Chapter Introduction
This chapter assesses the history, variety and function of the materials testing machine. The Lloyds
LR30K’s inbuilt extensometer function has been analysed and a full problem definition is given by
error testing the machine and examining the primary user’s complaints. The test procedure has been
examined and a common usage for the machine has been defined. Different core components of the
system; the test samples and the accompanying software are investigated. Alternative extensometer
methods have also been researched.
2.2 General background history of tensile testing
Recorded tests to determine a material’s ability to safely sustain a load before breaking have been
documented as early as 4th
Century BC. The ‘Stele of Eleusis’ is ‘a stone tablet inscribed with the
specification of the composition of bronze spigots used for keying together the stone blocks used for
constructing columns in Greek buildings’ (Varoufakis, 1987)
In the 16th
Century Leonardo da Vinci recorded quantitative methods to measure the differences in
material properties. ‘In one of Leonardo Da Vinci's notebooks, an experiment is described where
strengths in tension are measured for various lengths of wire. The notebook indicates that the results
of these experiments were that longer wires were weaker than shorter wires. This result defines
classical mechanics of materials.’ (Lund & Byrne, 2000)
The modern definition of a tensile test can best be summed up by (Higgins, 2010) as ‘The tensile test
of a material involves a test piece of known cross sectional area being gripped in the jaws of a testing-
machine and then subject to a tensile force which is increased in increments. For each increment of
force, the amount by which the length of a known ‘gauge length’ on the test-piece increases is
measured. This process continues until the test-piece fractures.’
2.3 Review of Materials Testing Machines
Industry standards are highly specified for materials testing in general. The most common standard
for the tensile testing of metals is ISO 6892 or ISO 9513 and ISO 527 for plastic samples.
ISO 6892 defines the test as “Straining a test piece by tensile force for the determination of one or
more of the mechanical properties” (ISO, 2014)
Materials tests are performed using a number of different variations:
 The Tensile test
 The Compression test
 The Peeling test
 The Tearing test
 The Creep test
 The Relaxation test
 The Flexural test
All of these functions are looking for the stress (change in displacement measured in meters) versus
the strain (change in load in measured in Newton’s)
For the purposes of this project the tensile test will refer to the test procedure in general, as all that is
required is a correct reading in displacement.
There are no vendors who specialise exclusively in tensile testing machines. Of the twenty largest
suppliers who inhabit 90% of the market, six are from Europe, seven are from U.S.A and the other
eight are Asian. These companies deliver a range of highly calibrated and standardised machines for
testing materials in lab and workshop environments. The specialised demand of the market
commands a high premium for any machine that is not hand operated and any accessories or
extensions to the system.
The most common set up is a universal gantry rig, which can perform bending, and compression tests
as well as extension tests.
Three types of machine are predominant:
 Hand powered or mechanical. Using screw, lever or hydraulic hand pumped action to apply
the force.
 Benefits: Very affordable and relatively easy to operate.
 Drawbacks: Limited to less than 1kN of force and usually inaccurate
readings.
 Electromechanical. Using an electrical motor, gear reduction system and screw displacement
to move the crossbar up or down these machines are usually bench or table mounted.
 Benefits: An electric motor is clean, accurate and relatively inexpensive to
maintain.
 Drawbacks: Normally unable to perform tests over 150kN
 Hydraulic. Hydraulic pistons move the gantry on the y axis, these machines are heavier and
floor mounted.
 Benefits: Normally able to perform tests up to 1MN.
 Drawback: A hydraulic environment is needed, messy to operate and
expensive to maintain.
The focus of this project is the Lloyd LR30K Universal Materials Testing Machine located in room
261 at Bolton Street DIT.
This is a universal gantry rig using an electromechanically driven screw displacement capable of
applying anything between 0.1mN and 30kN of force with an accuracy of <0.5% of movement.
However, the statement of a <0.5% accuracy is questionable due to the limitations of the Nexygen
and
It has an extension resolution of <0.5 microns at a speed ranging from 0.001 to 508 mm per minute
with a steady state accuracy of <0/2%. The power source is a domestic 230Cac at 50-60Hz and it has
digital and analogue RS232 serial inputs.
Even though the output data is set at a default of 12.123 readings per second it samples data (load and
displacement) at a rate of 8 kHz and uses the provided NEXYGENv4.0 data analysis software.
The machine met the EN ISO 7500:2004 Class 0.5 ASTM E4 standards for a tensile testing machine
at the time of sale,
At present the standards ISO 527 for plastic samples testing and ISO 6892 or ISO 9513 for metallic
sample testing is not being met.
It is used an average of four times per week and often overnight.
The results are used for educational labs, project support and IP development.
2.4 The Customer
The project benefits from having regular access to the D.I.T Materials Lab. This enables a continuous
assessment of the needs and wants of the customer. The following is a sample of answers to a
preliminary ‘Voice of Customer’ questionnaire:
Table 1: VOC Questionnaire
Voice Of Customer Questionnaire
1
Is there a problem with tensile
testing materials on the Lloyd
LR30k?
There is a discrepancy between true elongation usually
measured with a digital and that registered by the
machine.
2
What is currently being used to
measure the displacement?
Measurements taken from the servo motor which moves
the load cell.
3
What sort of resolution would
you need to gain the desired
results?
20µm
5
What sort of sensitivity would
you need to gain the desired
results?
± 0.5% of true measurement.
6
What is the primary reason a
non-contact solution would be
better?
A large variety of parts are tested, shapes require
specific gripping mechanisms for contact measurement.
7
What interface is best suited to
purpose for set up, presenting
results and recording data? And
what format would you like the
acquired data to be presented in?
The NEXYGEN software delivers a suitable interface
and data presentation.
The system set up and data recording from an external
extensometer should be easy to use, fit to integrate and
easy to manipulate. The best format to grab values with
for us is a .txt format
9
Why has a solution not already
been implemented?
Cost.
Answer number 1 is the primary objective of this project and the subsequent answers are to refine the
solution.
With this data and the continuous input from the customer it is possible to develop an ideal solution.
In general, the primary user has lost confidence in the accuracy of the system and also stated that
“Since Windows 7 was installed in all DIT PC’s three years ago, including the designated materials
testing machine PC, the Nexygen software has become unreliable.”
He went on to explain that he contacted Lloyds Instrumentation Technical Support and was informed
that the only way to ensure consistency in the software and the output was to upgrade to a specific
NexygenPLUS software package and purchase a new machine. This was an expensive option at
$1025USD for the new software licence, and over €30,000 for a new machine and installation.
2.5 Detailed Problem Definition
In this chapter the first and most prominent point of the VOC questionnaire is addressed:
 “There is a discrepancy between true elongation usually measured with a digital and that
registered by the machine.”
The internal mechanism to measure displacement is examined and the actual error in output from
Nexygen is assessed.
2.5.1 The LR30K’s Optical Decoder
In order to look closely at the change in length
between a physically measured test sample and
the one supplied in the test report, it is worth
considering the measuring system in the LR30K.
11
Would you like the implemented
system to run in tandem with, or
instead of the current system?
In tandem with the current system and able to cross
reference.
12
Are there any other aspects of
the tensile test that you think a
vision system could enhance?
Very useful in fail analysis. May be able to I.D. fault
lines.
14
What are the tensile test results
used for per semester and how
many per subject?
Education and project support purposes. Extensively
used in all materials labs. Used in IP development.
Figure 3: Mounted Optical
Encoder
Figure 2: Open motor compartment
Optical encoder
mounted here
Belt to drive
the encoder
mounted
The internal optical decoder works on the standard principle of a digital rotary encoder. It is mounted
in its own unit and rotated by a belt drive attached to the main shaft of the large servo motor that
drives the twin screws that lower or heighten the cross bar.
The optical encoder as seen in figure.4 is a replacement
disk. The fact that it is accessible to outside intervention
should also be considered as a contributing factor towards
erroneous readings.
If we look at the actual digital output into Nexygen
software, the real displacement value has to travel through
six different stages from the test piece. This could be
affected at any of these stages by anything from electrical
noise, to a loose washer.
2.5.2 The Error in Output from Nexygen
In order to gain an understanding of the nature of the error in readings, it was necessary to take a
sample of broken pieces and measure them with digital callipers after the test.
By comparing the Nexygen output and the physical readings of the overall pieces it is possible to see
a difference in reading. Using MITUTOYO AOS 0-150mm digital callipers with a resolution of
0.01mm, the final actual length of the test piece was approximated.
Table 2: Random sample of tests - all values are in mm
Sample
Type
Pre Test
Length
(mm)
Slippage Elastic
Region
Plastic
Deformation
Point of
Fracture
Total Post Test
Length
(Nexygen)
Total Post Test
Length
(Actual)
Difference
in Reading
Carbon
Fibre Weave
73.42 0 to 0.32 0.32 to
1.79
1.79 to 5.63 5.63 79.05 78.15 0.9
ABS
Polymer
180.01 0 to 2.28 2.28 to
8.28
8.28 to 21.41 21.41 201.42 203.11 1.69
POM
Polymer
180 0 to 3.51 3.51 to
12.00
12.00 to
34.01
34.01 214.01 212.4 1.61
Annealed
Aluminium
37.41 0 to 0.04 0.04 to
0.22
0.22 to 6.34 6.34 43.75 43.92 0.17
Normal
Aluminium
37.44 0 to 0.12 0.12 to
0.19
0.19 to 8.453 8.435 45.875 45.211 0.664
Steel @ 4%
Carbon
37.39 0 to 0.09 0.09 to
0.35
0.35 to 6.75 6.75 44.14 44.15 0.01
Carbon
Fibre Weave
73.42 0 to 0.32 0.32 to
1.79
1.79 to 5.63 5.63 79.05 78.15 0.9
ABS
Polymer
180.01 0 to 2.28 2.28 to
8.28
8.28 to 21.41 21.41 201.42 203.11 1.69
In Table.2, the 8 samples taken show the full range of materials.
I have calculated the actual error in reading from these samples using basic statistical analysis.
Figure 4: LR30K's Optical Encoder Disc
Test Piece
Holding
apparatus
Crossbar
Twin Drive
Screws
Servo
Motor
Drive belt
Encoder
Disc
Nexygen
Software
Figure 5: Transit of the displacement value from test piece to software
N = number of tests
X = difference in reading
Y = Length of test piece post test
∑ 𝑥
𝑛
=
5.044
8
= x̅ = 0.6305
∑ 𝑦
𝑛
=
626.491
8
= y̅ = 78.3114
y̅
x̅
= 0.00805 = 0.805 % 𝑒𝑟𝑟𝑜𝑟
This amount of error has been deemed by the primary user as a definite reason to find an alternative
extensometer system.
To purchase a plug and play, fully compatible contact extensometer from Lloyd’s for D.I.T’s LR30K
machine would cost £4000 (GBP) for each type of sample tested. D.I.T needs to test a variety of three
different sample types which would mean spending £12,000 (GBP). Even then there is no guarantee
of greater accuracy. The only non-contact option available from Lloyds the last time a solution was
researched was a laser system costing £20,000 (GBP).
2.6 Tensile Test Procedure
The sequence the user operates the LR30K in will be an important factor in this project. The
alternative offered should not cause the user any extra complications input errors. The fewer steps
needed the better. The LR30K is most commonly used for tensile testing purposes in the sequence
detailed in Figure.5 on the following page.
The left hand sequence is largely the mechanical end of the setup and the right hand deals with the
PC and data logging part. There are 24 separate steps to complete a single test. This is simplified
when the user wishes to repeat a test, but only by a few steps.
There is consistence evidence that the Nexygen software, and indeed the Lloyds provided LR/LRX
console control software is out dated with a Windows 7 interface. The yellow reset button should
only need to be pressed when the machine has been switched off with the e-stop, and the HMI will
frequently inform the user that there is no PC connected to the machine.
This is resolved by initiating the LR/LRX console and the Nexygen software in alternating order
before pressing the B input on the HMI.
Turn on Power to LR30K
Press the large yellow ‘Reset Button’
Open the LR/LRX Console
Operator on the designated PC
Select ‘B’ from HMI – to operate
remotely via the LR/LRX Console
Place the appropriate load cell using the threaded
shafts and plug it into the RS242 connection
Place the test piece in the jaws
of the machine and tighten
Load the appropriate holding
jaws onto threaded shafts
Measure the test piece with micro
callipers for both length and thickness
Control the transit of the cross bar
via the LR/LRX console to get as
close to a zero load as possible
Zero the load and displacement
readings on the LR/LRX console
After the test, retrieve the text piece and
measure length and thickness and compare
Press OK
Press play icon on home screen
Input titles for ‘Batch Name’ and ‘Test
Name’ from the pop up window
Press OK – Test Runs
Open Nexygen Software on Designated PC
Select ‘Strain Until Break’ from
listed test types in folder
Select ‘New Test’ icon
from the stating screen
Select ‘General Purpose’ folder
from test type pop up window
When test is completed select graph
line icon to view graph
Right Click on the graph screen and
select ‘Export Data to File’
Name file and file location in pop-up input
Select ‘Save’
Input test parameters in the ‘Test Settings’ window –
speed of displacement and maximum load usually
Figure 6: The tensile test setup procedure for the LR30K
2.7 The Test Results
Figure.7 is a Nexygen produced graph with detail overlaid. These are the desired features of a stress
and strain graph.
The present Nexygen system has a wide variety of functionality, giving Young’s Modulus, ductility
The testing of materials in this way is to determine:
 Engineering Stress of a material:
Calculated by the load applied divided by the cross sectional area where F = force, Ao =
Original cross sectional area and the units are in Newton’s per meter squared:
o 𝐸𝑛𝑔𝑖𝑛𝑒𝑒𝑟𝑖𝑛𝑔 𝑆𝑡𝑟𝑒𝑠𝑠 𝜎𝑒 =
𝐹
𝐴 𝑜
 Engineering Strain of a material :
Calculated by the change in length of the sample divided by the original length where L =
length, and Lo = Original Length. There are no units as it is a ratio and not a quantity.
In this region
the sample
settles in the
clamps jaws
This is the ‘Elastic
Region’. Where the
material is still able
to return to its
original form
This is the ‘Plastic
Region’. Where the
material can no
longer return to its
original form
Figure 7: Nexygen output stress and strain graph of an ABC Polymer tensile test
o 𝐸𝑛𝑔𝑖𝑛𝑒𝑒𝑟𝑖𝑛𝑔 𝑆𝑡𝑟𝑎𝑖𝑛 𝜀 =
𝐿−𝐿 𝑜
𝐿 𝑜
The mechanical strain of the system is the focus of this project. The stress reading report from the
Nexygen software has proven to be highly accurate, and the quality of the load cells is not in question.
The extensometer to be developed for this project needs to read a change in displacement at an
extremely high resolution (20µm as stated in the VOC) to provide an improved accuracy.
2.8 Tensile Test Samples
Test samples in the DIT materials lab have varied from human hair to Nitinol SMA, but the two types
regularly used are pre manufactured dog bone steel specimens and D.I.T made polymer samples
shaped to ISO 3167 standards.
There are four dog bone sample which are purchased from TecQuipment Ltd, an engineering supplier
from Nottingham in the UK. They all have a 5.05mm diameter and an overall length of 37.25mm
±2%
These cost €4 each and are purchased in batches of 20.
The ones used most often are:
 0.1% Carbon Steel. As drawn. To British Standard Specification 220M07 or 230M07. No
identification rings.
 0.1% Carbon Steel. Normalised at 900°C. To British Standard Specification 220M07 or
230M07. One identification ring.
 0.4% Carbon Steel. As drawn. To British Standard Specification 080M040. Two
identification rings.
 0.4% Carbon Steel. Normalised at 860°C. To British Standard Specification 080M040. Three
identification rings.
These are used primarily for educational labs and it is planned to make them in D.I.T’s metal
fabrication workshops to specification at a later date instead of buying them from a supplier.
The polymer specimens are crafted in the plastics lab at D.I.T.
The tests are commonly carried out for project support and IP development and the specimens are
machined to standardised dimensions.
The material properties vary greatly in these tests.
The following is a sample of the standard ISO 3167:2014(E) requirements:
‘4.4.2 Test specimens having a width of 10 mm shall be cut symmetrically from the central parallel-
sided portion of the multipurpose test specimen.
The surface of the central parallel-sided portion of the test specimen shall remain as moulded:
The width of the machined portions of the specimen shall be not less than that of the central parallel-
sided portion, but may exceed the width of the latter by not more than 0,2 mm.
During the machining operation, care shall be taken to avoid any damage to the moulded surfaces of
the central portion.
For test specimens longer than 80 mm, the broad ends of the type ‘A’ multipurpose test specimen (or
type B for test specimens longer than 60 mm) portion.’ (ISO, 2014)
2.9 Extensometer Types
The extensometer of a tensile testing machine is a device that measures the elongation of the material.
They are commonly supplied as extra applications by the machine’s vendor.
There are generally two main types of extensometer:
2.9.1 Contact Extensometers
These are clip on or feeler arm devices attach either to the jaw holding the sample, or the
sample itself. The displacement is measured by a strain gauge or a similar sensor to a high
resolution and communicated with the machines software.
 Benefits:
 If mounted and used properly it can give highly accurate readings.
 Is relatively acceptable in price.
 A simple system to use.
 Drawbacks:
 Can only measure a maximum of 100mm as a mechanical limitation.
 The contact can affect the performance of the test specimen.
 It needs more manual intervention, thus is more prone to human
error.
 Application is limited by the sample shape and size.
 Some sample shapes require specific gripping mechanisms leading to
more expense.
2.9.2 Non-contact Extensometers
These systems do not interfere with the test sample or the rig in any way.
There are two main types of non-contact extensometer:
1. Laser:
The device reflects two beams off the test piece and reads the reflected light on an
internal sensor. The action of the laser beam on the material marks a virtual reference
point on the test sample by mapping speckles caused by unevenness on the material’s
surface. These two speckle patterns are followed during the test sequence and
translated into a displacement of the material.
 Benefits:
 Ability to measure any type of material of any size used in the
machine.
 Highly adjustable operating range that can transfer data quickly
and within clearly defined parameters
 No long term mechanical wear.
 No contact vibration to cause errors.
 The test sample cannot be disorientated or have its result
tainted by physical contact.
 The system is calibrated each time the procedure is set up.
 Drawbacks:
 Set up involves ensuring the beams are symmetrically lined up
leaving room for human error.
 These systems are very expensive. Lloyds Ltd quoted £20,000
(GPB) for D.I.T’s LR30K machine.
2. Optical:
A traditional optical system will operate along the same lines as a laser system
except the ‘speckles’ need to be applied as distinguishable marks on the test
sample or gripping jaws as the reference points.
When the test sample is being elongated, the camera captures a continuous
image of the area between the markers edges. This distance is converted to a
pixel address and mapped against a pre-calibrated value.
The field of interest needs to be shielded from background interference by
using backlighting or other stage setting.
 Benefits:
 A potentially affordable solution provided the vendor specific
products are not used.
 No limit to the sample size.
 Minimal sample interference.
 No long term mechanical wear.
 Highly adjustable operating range.
 Friendly to data transfer.
 Simple set up procedure provided the software is
comprehensive.

 Drawbacks:
 Slight possibility that the marking of the sample might affect
the performance of the material during the test.
 Vision systems can prove difficult to initially install correctly.
 Set up involves human application of reference markers, so the
system is open to human error.
2.10 PC and Software
2.10.1 The Designated Materials Testing Machine PC
There is a dedicated PC that has a moderate to small workload. It is attached via standard RS232
cable adaptor to the Lloyds LR20K.
It is a generic desktop Dell OptiPlex 7020 that runs on Windows 7 Professional and all D.I.T owned
software licences are accessible.
It is on the network as a commonly available D.I.T. terminal and has administrator privileges for the
lab technician.
For the purposes of the project the PC fulfils the required criteria:
 Processor: Intel 4th
Gen i3 Dual Core PDC
 Graphics Card: Integrated Intel HD Graphics 4400 (i3). Built in to the main processor the
portion of the chip acting as the graphics card is capable of 2.07 megapixels per frame. None
of the optical vision systems on the market demand more than 1.4 megapixels per frame.
However, some tensile test machine optical extensometer vendors for plug and play systems
require a stand-alone graphics card for their systems. This is moving towards ‘Frame
Grabbing’ systems.
 I/O ports: 4 x USB 3.0; 6 x USB 2.0; 1 x RJ.45; 1 Serial; 1 x VGA; 2 x Display Ports; 2 x
PS/2; 2 x Line In stereo microphone; 2 x Line Out stereo speakers/headphones. The most
relevant in this list would be the USB 2 or 3 ports. However, some vendors of plug and play
systems only use Firewire400 (IEEE 1394) for communication that can carry 400MB/s. If
this is the case a USB 3 port can still out perform it 480MB/s.
2.10.2 Software Provided By Lloyds Instrumentation for use with the LR30K
The Lloyds LR30K uses NEXYGEN 4.5.1 Version 3 materials testing software.
This comes with its own video and still picture capturing system software, but this will only interact
with the Lloyds optical vision systems. There is a data export utility that writes in real time for
connection to LIMS (Laboratory Information Management System, like LabVIEW or MAT Lab) and
SPC packages for statistical reports and calculations, but these are limited to the Windows XP
platform and do not operate on Windows 7. There is also a facility to bypass Nexygen software
altogether and write directly from LloydsLR30K LR/LRX Console via Visual Basic.
The software itself is comprehensive and not complicated to use. It comes with:
 Complete standards library.
 Complete suite of test set-ups.
 Video and still picture capture system (though as stated, this utility is only usable with the
vendor’s vision system extensometer package)
 Security and audit trail utility.
 SPC trend and histogram charts (these supply our stress and strain graphs)
 User interface customisation facility
 Data export facility for connection to LIMS and SPC packages.
It is worth noting that LabVIEW also provide a driver to interface directly with NEXYGEN software.
As quoted ‘LabVIEW-NEXYGEN Interface Driver permits LabVIEW 6i users to control….LLOYD
INSTRUMENTS materials-testing equipment such as…LRXPlus. It incorporates NEXYGEN
consoles to control test machines, and stores library of Virtual Instruments. Choice of selectable
Virtual Instruments includes ways to connect and control testing machine, test set-up, sample break
checking, and results format selecting.’ (ThomasNET , 2002). This might not be compatible with this
old a version of Nexygen.
2.11 Chapter summary
This chapter has examined materials testing machines in general and in particular, the Lloyds LR30K
used in the materials lab at DIT’s Bolton Street location. The question has been posed to the primary
users of the machine and the problem explained, defining a 0.805% error in output. The procedure
required to carry out tests have been explained and alternative extensometer methods where
examined.
Chapter 3
Specifications and Design Concepts
3.1 Chapter introduction
This chapter investigates the different elements required for a vision system, and explains hew the
experiment carried out helped to develop the final design. It details the camera to be used, the
software to translate the image into an output and the physical necessities of the project.
3.1.1 Feasibility
The research into available solutions and the results from the customer survey have shown that the
best way to attain more accurate readings for D.I.T’s Lloyds LR30K tensile testing machine without
purchasing the vendor specific plug and play unit is to design and build a PC optical vision system
extensometer to determine displacement.
3.1.2 Problems and Considerations
To complete the project the following will take careful consideration:
 The set-up of camera and target with the use of lenses to gain the ideal amount of resolution
at an optimal focal depth
 The transition of information from change in image to change in distance
 The application of vision systems in general are known to be problematic
 Calibrating dimensions that are so small (for steel samples usually) means you cannot use a
physical measuring devices like hand held callipers to gain any sort of accurate reading.
 There is no allocated budget for this project, which makes cost is a determining factor.
3.2 Considerations for using a Vision System
A common definition for a vision system is:
‘….the ability of a computer to "see." A machine-vision system employs one or more video cameras,
analogue-to-digital conversion (ADC), and digital signal processing (DSP). The resulting data goes to
a computer or robot controller.’ (WhatIs.com, 2014)
The interaction between the listed elements of a vision system needed investigation:
1. Target image
2. Camera
3. Lens
4. Light
5. Software
6. Image resolution
7. Image types
8. Frame rates
9. Colours
In order to fully understand these relationships further study was required into available vision system
software and hardware.
3.2.1 Image Capturing Elements
The two most common camera technology types used in industry are CCD (Charge Coupled Device),
and CMOS (Complementary Metal-Oxide-Semiconductors). They are both robust, mounted IC’s that
react to light on the exposed and doped surface. They differ in that a CMOS acts as a transistor in its
reaction while a CCD acts as more of a diode.
A basic camera set up consists of the object, lens, camera and lighting.
The light illuminates the object (target) and the reflected light is seen by the camera. In a digital
camera, the CCD or CMOS chip will read and report the array of light sensitive pixels on the chip’s
surface
A lens (object) defines the focus of a target. This can also measure to define distance or template
recognition (where the higher the focus the greater the resolution of comparison).
In the case of this project, the dimensions of the marks on the test sample.
3.2.1.1 Camera Types
 Smart Cameras: Combine the processor, I/O and sensor of a vision system in a compact
housing that is usually no bigger than a standard industrial camera. All image processing is
carried out on-board (internally in the camera module). These systems are ideal when only
one inspection/view is required and no local display or user control is required. Smart
cameras offer modular extension products like counter interfaces, mobile image display and
expanded I/O ports.
 Benefits:
 Compact all inclusive units that are robust in construction.
 By making it a single package, set up and dimensions are minimised.
 Drawbacks:
 Expensive and usually only with vendor defined software.
 PC-Based Vision Systems: Require an interface between the camera and the computer.
Modern systems are based on a number of machine vision cameras with interface algorithms.
Some interfacing algorithms use consumer ports that are readily accessible like USB,
FireWire, HMDI or VGA. Others need camera interface cards (often called ‘Frame
Grabbers’).
They support most complex image processing capabilities with versatility ranging from single
PC to single camera to PC server network to multi camera configurations. The range of
cameras and interface software complicate installation, but also add to versatility.
 Benefits:
 Highly flexible, as most installations on an industrial scale are built
to purpose.
 It can be a cost effective solution if the application and ability of the
designer permits.
 Integrating data inside the same PC environment is more reliable and
less complex than from a PLC, smart camera or compact vision
system.
 Drawbacks:
 Limited by the PC’s internal specifications.
 Can become expensive depending on the software licences required,
the resolution needed for the application.
 Complex installations.
 Compact Vision Systems: These systems have the processor housed in a small compact
industrial I/O rather than in the camera itself. This enables multiple connections of cameras
to the PLC controller (PLC’s are usually used in this configuration). Long lengths of cable
sharing the processors I/O make them good value for multiple camera systems.
 Benefits:
 Very simple to install.
 Robust and standardised.
 Potential for multiple camera networks.
 Drawbacks:
 Expensive.
 Difficult to integrate into other systems.
The dedicated PC and readily available imaging software make a PC vision system the preferred
choice. The only missing elements if we use a PC system are a lens, lighting, hardware to hold all the
elements in place and the communications cables.
3.2.1.2 Lenses
Sourcing the right lens might be the most costly part of the project.
The test samples most commonly in D.I.T are the steel dog bones that are 37.25mm long with
less than 20mm of that exposed for the test. The ROI will be less than 15mm.
The polymer samples are usually 150mm long with 80mm exposed.
Their ROI will be approximately 70mm.
That’s a difference of 55mm focal length.
For the different samples to be seen with the desired resolution; either the lens needs to be
changed or the distance between the sample and the camera must be increased or decreased.
These actions effect measurement accuracy, and require calibration each time the lens is
changed.
According to a Zwick/Reoll datasheet for fixed objective lenses from their videoXtens non-
contact extensometer system:
 The steel samples would require a ‘Field Of View’ (FOV) of 31mm which would give
a resolution of 0.25µm.
 The plastic samples need an 84mm FOV. This would give a 0.4µm resolution.
In order to read displacement in the full range of sample sizes, lens positioning is a deciding
factor. It breaks down to three options.
1. Use two separate lenses.
2. Devise a system to precisely move the camera in scale with the desired FOV.
3. Use a lens that can deal with both samples and still give the desired resolution of
1µm.
3.2.1.3 Software Analysis of the Image
Although the choice of software will ultimately determine the type of image analysis it is
worth considering the methods available:
Edge Finding:
An edge (also called transition) is defined by a change in intensity. The edge is found, the
coordinates transmitted and the model built. Any deviance from this is flagged for
inspection. This method is usually deployed with simple systems where the target has
defined lines.
Blob Analysis:
A ‘Blob’ is any area of connected pixels either pre-defined or read as an error. This process
finds and counts objects to make a basic measurement of their characteristics and maps them.
Pattern Matching:
This is the most prevalent form of machine vision quality assessment used in the electronics
industry today; it is the recognition of previously taught patterns and images. This system is
only relevant when there is a ‘Golden Model’ reference object and the target needs to be
identical.
Pattern matching locates objects and verifies their shape in reference to the Golden Model.
Pattern matching programmes give the following results:
 Number of objects found.
 Orientation (rotation)
 X and Y reference point (Z when in a 3D system)
 Match Score (% of likeness to Golden Model)
There are more complex algorithms that employ fuzzy logic and neural fuzzy networks, and
3D imaging systems that will build a model of the test piece, but for the purposes of the
project these won’t be considered.
The most suited approach for our application would be a program using edge finding.
The software chosen also needs to read and interpret the values from the NEXYGENPlus
software and respond to an unnatural jump in displacement if the test sample should slip in
the jaws, and create an alarm state.
The two best vendor options available at D.I.T are Mat LAB and LabVIEW.
LabVIEW Vision Assistant is the system of choice due to my own personal experience with
the National Instruments software, the expertise available at D.I.T and the interoperability of
the platform.
3.2.1.4 Background Environment, Lighting and Visual Distinction
The background environment in a system that uses markers (discounting backlighting
systems) should enhance the marking. The interpretation of the image by the software
depends on the state of the ‘Region of Interest’ (ROI). The entire principle behind an optical
system is to measure light. Therefore, light pollution of the ROI will lead to an error in the
signal.
There are three main considerations that must be taken into account:
 The marker colour should be completely distinctive from the sample colour.
 The background colour should be as universal as possible to eliminate any distortion
to the cameras calibration.
 Lighting should eliminate any shadows in the ROI.
3.2.1.5 Fittings
The framework to hold the elements in place (camera, lens and background) will be a determining
factor in the projects development.
The elements to be held in place are:
 The Camera: It potentially needs to be mounted directly onto the framework of the LR30K
and the fitting needs to be adjustable, easy to manipulate and rigid when set. The mechanical
vibration of the machine and the jolt caused by the fracture of the test sample are the main
concern.
 The Lighting (if required): The preferred option would be to mount the light with the camera,
but it might need a different relationship with the target. This means its own fittings.
 The Background (if required): This could be just a piece of card held in place with clips or a
sheet of fabric.
3.3 Image Capturing Research
A series of experiments was carried out to assess the interaction between these elements. It involved
setting up a camera, lens and target object and determining the optimal distance between the obje3cts
to gain the best target image resolution. As this was only an investigation into the nature of image
manipulation, the most easily available equipment was used.
3.3.1 Lenses used in Experimentation
3.3.1.1 Photographic Lenses:
Two photographic lenses available from the lab were used: a Cosmicar 8.5mm 1:1.5 and a Cosmicar
16mm 1:1.4. These gave both focal functions and aperture control but were fitted to be mounted on
specific camera models. Using clamps it was
possible to mount and use them in conjunction with
the LifeCam HD3000. These proved ineffectual.
The light control offered by the aperture setting
brought no quality to the image and the focal depth
of 16mm or 8.5mm gave no improvement in image
resolution. The only way to use a photographic lens
properly would be to have the camera that goes with
and that would financially negate the purpose of the
project.
3.3.1.2 Microscopic Lenses:
Using the LifeCam HD3000, placement scale and clamps, this
generic microscopic lens managed to get a better resolution
than the available camera lenses.
3.3.1.3 Basic Magnifying Glass:
This also gave a clear indication of how lenses could be used to
gain the required resolution.
3.3.6.4 Eye loupe Set Lenses:
These proved the most adaptable to experimentation and gave a
clear indication as to how to maximise focal depth gain image
resolution. They only cost €0.75 euro for the set yet proved the
most effective. The placement of them offered referable
information that could be used to gauge the type and quality of lens
to try next.
3.3.2 Cameras used in Experimentation
3.3.4.1 Web Camera:
Figure 11: Microsoft LifeCam
3000HD Invalid source specified.
Figure 9: 16mm and 8.5mm photographic lenses
Figure 10: Eye Loupe Set x5, x7
and x10 Invalid source specified.
Figure 8: Microscopic lens and basic
magnifying glass
Generic Web Cam: Microsoft LifeCam 3000HD
This camera was readily available and had all the benefits of most of the webcams currently available
on the market.
It cost €30 and didn’t need proprietary software.
 Video Capture Res: 720p (1280x720)
 Photo Res: 4Megapixels (with interpolation)
 Connection: USB 2.0
 Audio: Mono Microphone
 Software: Proprietary Microsoft LifeCam only
 Power supply: 5V DC USB
3.3.4.2 Hand Held USB Microscopic Cameras:
The initial tests were carried out using the webcam and lenses, but the use of generic USB
microscopic cameras proved fit for purpose. They were primarily only considered for the smaller
brittle samples and not the larger polymer ones. Both brands when compared are exactly the same
except for the difference in still image resolution and advertised maximum zoom. Below is listed
some of their relevant specifications:
 Brands: AGPtek and PTL Axis
 Model:
 AGPtek: iT7B
 PTL Axis: TE70
 2 Mega Pixels
 Still image format: JPEG
 Maximum Zoom:
 iT7B: x200
 TE70: x500
 Maximum Still Image Capture Resolution:
 iT7B: 1600x1200
 TE70: 800x600
 Light source: 8 LED
 Chip: CMOS
 PC interface: Mini USB1.1&2.0 8.
 Power source: 5V DC from USB port
 Grey scale: Level 8 10.
 Sleep current :< 1 mA 11.
 Work current :< 180 mA
 Save temperature: -20°C to +60°C 13.
 Work temperature: 10°C to +40°C
 Operation system: Windows XP/Vista/ Win7
 Colour: White.
Figure 12: On the left the iT7B and the Right the
TE70 microscopic cameras
Figure 13: Simple Magnification explained Invalid source specified.
After further investigation, these cameras proved to be simple webcams with inbuilt lenses.
They use the lens placement of microscope and basic webcam software drivers. The USB
connection makes them highly adaptable.
The camera in figure.14 is built exactly the same as both
the TE70 and the iT7B, but the QX3 is a much older
version. The CMOS chip is housed in the top. The
magnification ring section has two functions:
 To move the objective barrel back and forth in
the shaft, bringing it into or out of focus.
 To swap the barrels around. The TE70 has an
X50 objective barrel and an x500. When you
turn the magnification/focus ring you can feel the
barrels swap at about the halfway point. This
would be a mechanical wear and tear
consideration if it was required to swap the
magnification between the two settings
frequently.
3.3.3 Set Up of the Experiment
Figure.14 details how the elements where arranged. The software used to view the image is
‘Microsoft LifeCam’, and the displacement is estimated from looking down on set up and estimating
the distance from the printed scale.
Figure 14: A version of the USB hand held
microscope (FSU Education, 2003)
3.3.4 Experiment Results
A matrix was drawn to display the arrangement for findings. The field of view was ascertained by
reading the scales on the target image 6” steel ruler. The ambient light of the materials lab was used
and no added light source was introduced. This would determine the lighting requirements necessary.
The quality is indexed from: Very Poor, Poor, Medium, and Good to Very Good.
Table 3: Results Matrix from Image Capture Experimentation
Camera
Type
Distance
To Lens
(mm)
Lens
Type
Distance
to Target
(mm)
Field of
View
(mm)
Light
Quality
Image Quality
Webcam 0 Photographic 64 40 Good Very Poor
Webcam 0 Microscopic 3 Medium Very Poor
Webcam 20 Basic
Magnifying
Lens
95 Very Good Medium
Webcam 45 Eye Loupe 65 Very Good Good
Microscopic
USB Camera
0 Inbuilt Lens 0 Inbuilt Light
source:
Very Good
Very Good
PC program to view the
target image is a generic
webcam package
Placement Scale, marked in cm/mm. Looking
from the top of the element it is possible to
estimate the distances between them
Target: in this instance a 6”
steel ruler with 0.5mm
incremental markings
Clamps to secure the
elements – camera, lens
and target in place
Camera: in this instance
the HD3000 LifeCam
Lens: in this instance the x7 Eye Loupe
Figure 15: Test Setup
3.3.5 Conclusions Drawn
The information gathered from these experiments determined that the Microscopic USB Camera was
the best option as it included the lens, camera and focal control, required only one positional fitting
and had its own light source. The only drawback is its limited field of view. This would also
eliminate any concerns over background interference.
3.3.5.1 Using the Web Camera
As the results indicate, getting a high quality image from a web camera in conjunction with mounted
lenses would be very difficult. The quality of light available with all the web camera trials show that
lighting was not a consideration, but gaining focus was nearly impossible. Most digital camera
systems that could gain the sort of resolution a 20µm field of view required would be modular and
proprietary. Even though the electronic capturing device of expensive vision cameras might be of the
same quality as the LifeCam’s CMOS chip, the housing for special lenses and the special lenses
themselves would make this option very expensive, very quickly. It would need two fittings, one for
the camera and one for the lens which would require continual resetting in order to view the full range
of test samples. This is not an attractive solution.
3.3.5.2 Using the USB Microscopic Camera
This camera held perpendicularly to the surface of the target
gave a clear and very readable image. The inbuilt light
source is more than sufficient and adjustable, and the price
makes it a viable option.
The only limitations would be the size of the ‘Region of
Interest’ of approximately 1mm when set to its highest
magnification. But even so, this offers a very attractive
solution. The camera could be applied to the target in one
position at a perpendicular angle and as the lens, focus
control and camera is all one unit, no resetting would be
required.
3.4 Specifications
As the camera system had been decided; the type of vision software used and the placement of the
camera needed to be determined.
3.4.1 Selecting the Appropriate Software Package
The most freely available vision system software platforms available at DIT that offer the variety of
functions required by this project is Matlab and National Instruments. The project requires a precise
way to track movement:
 Matlab Computer Vision System Toolbox offers object detection, feature tracking, matching
calibration and motion detection. There is a verity of suitable algorithms that would be fit for
purpose but these are too ‘Plug and Play’, and limit the applications of the system.
 National Instruments IMAQ Vision delivers a very comprehensive suite of tools and image
manipulation. The current licenses at DIT make available all of the required functions
Figure 16: Solid model of the PTL Axis:
TE70 microscopic USB camera
packages like IMAQdx, NI Vision Assistant and NI Machine Vision. These packages
incredibly flexible and can be applied to any type of vision system available on the market.
NI IMAQ gives greater adaptability in a more logical form, so this platform is best suited to the
project. Its flexibility also opened up scope to develop an interface for a ‘Mobile Microscope
Function’. As camera is so affordable, the software could be installed on any of the materials
lab’s PC’s and another USB microscopic camera could be plugged in and used.
3.4.2 Choosing the Position of the Camera
This decision was vital to the entire direction of the
project, and the only viable solution due to the
selection of camera.
Initially the project was directed at observing the
change in position of a mark on the test subject held in
the jaws of the Lloyds LR30K. If the camera to be
used is a USB Microscopic camera then in order to
keep the image onscreen, the camera would have to
move with it. This is not an option, so directing the
camera at a static background and measuring the
movement of the camera on the Y axis became the only
viable solution. By mounting the camera on the
crossbar of the LR30K and reading an upward or
downward displacement, the user could determine
with fewer degrees of separation between the test piece
and the software output (see Firgure.18) a displacement
in micrometres. If the degrees of separation between
the test piece and software are diminished, and the
extra element of no mechanical contact is introduced to the system, then it should be possible to
reduce an error in reading.
3.4.3 Choosing the Software Feature to Measure Displacement
As mentioned, there is a vast range of employable features in the NI IMAQ suite. Selecting the
appropriate function to track real world images can be completed within any of the suites. The
Figure 17: Solid model of the camera clamp in position
on the gantry on the far side, away from the user
Test Piece
Holding
apparatus
Crossbar Camera Clamp MTVS Software
Figure 18: Transit of displacement value from test piece to MTVS software
deciding factor proved to be the difficulty of reading target media (the image that the camera would
be pointed at) with a high of image, a sharp definition of lines and no possibility of aliasing.
After much discussion and reading NI resources, the IMAQ Optical Flow LKP VI was selected as the
core process to build the program around. By attaching a single pixel to the image, the motion of that
image could be translated into a value of pixels on the Y axis, and then converted into a real world
value. This is explained at greater length in the programming section of the report.
3.4.4 Design inspiration
There are three individuals who had a strong influence in the direction of the project:
 Neil Brannigan: Lab Technician DIT Bolton Street: Primary user of the LR30K and principle
advisor on all mechanical matters. Was instrumental in defining the position of the camera.
 Alan Cheaneux: IT Networking Manager for DIT Bolton Street: Advised on the available
image system at DIT and instigated the investigation into the use of the hand held
microscopic cameras.
 Ronan Hogan: Lab Technician DIT Bolton Street: A LabVIEW expert who gave instigated
the investigation into the use of the Optical Flow VI features.
3.5 Design concepts
This system will require a great deal of programming structure and definition. The concepts to
achieve the final product are:
 A camera will capture at a user defined frame rate and resolution, clear images of markings
on the test sample in its designated ROI.
 To have a function that enables the user to calibrate the system
 To have a function to allow the user to select another camera (TE70) with the software to use
as a mobile, hand held microscope.
 The image will be manipulated into usable data and presented in a clear and transferable
format to the PC.
 A change in displacement with a user defined setting will be read and translated into real
world readings (mm).
 The real world readings will be written the UI numerically and in graph format to imitate the
graph in the Nexygen software.
 The accrued data will be written to a data logging file.
3.5.1 Design Aims
 To design and build an optical vision extensometer system that will greatly improve the
accuracy of the current test results.
 To do so at a greatly reduced cost in comparison with the current market suppliers for
extensometers.
 To enhance the user’s ability to control the test environment.
 To avoid interference with the current test procedure.
 To make the set up process as straight forward as possible.
 To improve the quality of material’s research at D.I.T.
3.6 Final design choice
The imaging device used will be a TE70 Microscopic USB camera, which will be clamped to the
cross bar of the Lloyds LR30k Materials Testing Machine gantry and translate a change in
displacement of the target image. This will be converted into a numerical value and written to file and
drawn to graph as a stress and strain graph. There will also be a mobile microscope interface function
that can be used as a microscopic measuring device. The software used will be NI IMAQ Vision and
the principle of the program will be the use of the IMAQ Optical Flow LKP VI, which will track the
movement of a single pixel on the Y axis.
3.7 Chapter summary
This chapter determined the nature of vision systems in general and, and explained the results of the
experiment carried out to find the optimal vision system for this project. It the detailed the designs
targets and stated the final design choice.
Chapter 4
The Physical Design and Build
4.1 Chapter Introduction
This chapter details the design and build of the bracket to hold the camera in place. It lists the types
of material used, the problems encountered and the problems overcome.
4.2 The Physical Build
Once the type of camera to be used and the location of the camera were decided, a way to effectively
hold the camera in place was needed.
The physical placement of the camera required a clamp to hold it in place. This clamp had to absorb
the maximum amount of vibration the LR30K would commonly produce. As the field of vision
would only cover 1mm², and the distance from the subject matter would be 3mm maximum, a slight
jolt could knock the image off target and out of focus very easily. The moment of fracture of a typical
dog bone steel sample is the most commonly occurring event where vibration would be a real
concern.
4.2.1 Testing for Vibration
A simple test was carried out where the TE70 camera was attached to the top of the crossbar with blue
tack, and a small steel ruler fixed to a perpendicular angle also with blue tack acted as the target
image. The cross bar was then raised and lowered and the image retained its position and in focus.
Then a normal steel sample was fitted for testing, and a full tensile pull to break test was completed,
and again the image retained its focus and the image its position. It was assumed that the sturdy
nature of the LR30K meant it absorbed the majority of shock vibration in the heavy base.
It was determined that a clamp could be designed using available materials in a way that suited the
user and took advantage of the steady motion of the cross bar.
The user must be able to:
 Easily reach the focus ring
 Able to extract the camera
 Not be impeded by its position
The design in Figure.17 fulfilled most of the requirements.
The focus ring is in easy reach and the 3” pipe clamp is simple to tighten and loosen by hand. The
camera is mounted at the back of the rig with the USB cable out of the way.
4.2.2 Front Panel Access
However, mounting the clamp on the cross
bar would mean covering the access panel to
the load cell port. This front panel is not as
stable as the crossbar itself and would need to
be removed on occasion.
This problem was overcome by cutting two
shaped slots in the front panel to allow the
clamp uprights to protrude to the extent that
they could be adjusted. This can be observed
in Figure.18
4.2.3 Further Alterations
Some other alterations needed to be made:
 The butyl rubber (taken from simple rubber matting) that was used for extra vibration
dampening in the initial clamp upright strips had ribbed surface contact. This allowed for
flexibility when the clamp was mounted.
It was also due to and the ribbed butyl
grips in the pipe clamp.
This was resolved by using butyl with
more surface area adhered to the clamp
uprights (standard din rail sections) with
Pritt glue dots. The ribs on the pipe
clamp grips where simple enough to
carve flat with a blade.
Figure 19: Assembly of the camera clamp
Figure 18: Mounting the camera clamp onto the LR30K gantry.
 The nearside exposed top of the clamp was a
hindrance to the primary user as every time he tightened the
holding shaft at the top of the crossbar, there was a concern
that if he slip and cut his hand on the exposed din rail corner.
By cutting the rail to the bare minimum and folding an extra
strip of butyl rubber over the end to be held in place on both
sides by the bolts, the is now no chance of him hurting his
hand in this way.
Finding the target media for the camera proved to be an interesting task, and indeed one of the
determining factors in using an optical flow function in the programming. There is a range of
problems:
 Aliasing occurs relatively easily when tracking movement at a microscopic level, so the
image must be alternating enough to counter this
 Within a 1mm² field of view, a straight line becomes less so unless specifically printed with
heightened resolution
 If the focus is slightly off, the contrast between two colours or edges is lessened
After researching microscopy methods and
target media used to check for camera
resolution, it was found that in 1951 the
United States Air Force developed a
targeting test for bomber camera systems.
The target pattern of straight lines over
concentric circles is was similar to the ones
used for target media strips in Figure.21. In
order to gain better resolution 250 GSM card
(A3 size) was printed on at a standard
800x800 PPI. It was printed in black and
white for contrast and programming
simplicity. Then the strips where cut to length and glued on 5mm foam board. This extra rigidity was
to account of for the image needing to be perpendicular and even to get a clean readable frame. They
were then mounted on the LR30K in the position shown in Figure.17 with the same Pritt Sticky glue
dots used for the butyl vibration dampening strips.
4.3 Chapter summary
This chapter explained the requirements for the build and the points that needed to be considered. It
detailed the test carried out to determine the systems susceptibility to vibration, the further problems
encountered and solved and the target image used and why.
Figure 21: Target image strips
Figure 20: Solution to exposed din rail
Chapter 5
Developing the Software
5.1 Chapter Introduction
This chapter details the majority of the software developed to
Materials Testing Vision System - MTVS
The product developed in this project is called the MTVS (Materials Testing Vision System). It will
also be used in other areas of the lab as a hand held digital microscope using a calibrated measuring
system.
The following briefly explains some of the terms used:
 VI: Virtual Instrument. A term to describe the entire program, or a specifically made
application within the LabVIEW environment
 SUB VI: Sub Virtual Instrument. A user designed sub program to facilitate an objective of
the main program
 Particle: Refers to the ‘Selected Pixel’
 UI: Refers to ‘User Interface’ or the HMI
 ROI: Means ‘Region of Interest’. The pre-designated region of an image that the program
reads to determine its function
 FPR: Frames per second. The frequency of mages being processed by the program per second
 IMAQ: Image Acquisition: The range tools and development suite for National Instruments
LabVIEW Vision
 Array: Table. A 1D array is a table with 1 column and as many rows required. A 2D array
has as many rows and columns as required
 Cluster: A grouping of items that can hold anything from Boolean switches to String inputs to
2D arrays
 While Loop: Within this region all of the activities will occur until the ‘Stop’ control is
activated
 Event Loop: Within this region all activities will occur whilst the Boolean instruction also
within the loop is operating
 Case Structure: All the activities that are on the designated frame will be operational once the
frame control activates. There can be several frames, thus several alternate activities
 Shift Registers: Connecting points that loop an output value to the end of a while loop
structure which could be an image, array, Boolean, numerical value etc…to make it an input
into the same while loop.
The Path of the Image
In order to clearly display the route of the image, specific points have been numbered in Figures ####
to ####. This takes up the majority of the program. It
PART 1:
This is the region that initiates the session by reading and processing the image from the camera.
1. The ‘Select Camera’ session in control connects the camera to the PC. It names the camera
you wish to open, where the default is ‘Cam0’. Plugging in another camera and selecting
Cam1 will give you the mobile version of the system, the ‘Mobile Microscope’ function.
The purple cluster wire is routed through the majority of the program and carries the image
(or collected captured pixel data) in real time (called the ‘Session In’/’Session Out’) when the
program is running. The camera selected will normally provide 20 to 30 frames per second.
For the purposes of this explanation it can be assumed at 20 fps.
2. This is an ‘IMAQdx Open Camera VI’. It checks the cameras capabilities, and loads a
configuration file. This creates a unique reference for the image.
3. ‘IMAQdx Configure Grab VI’ starts the frame grabbing part of the sequence. It continually
loops the image by buffering between several regions of memory. This is the initial buffering
process that enables a constant stream of frames to arrive from a source without them building
up and overloading memory with an entire 20 frames of image data per second.
4. The ‘IMAQ Create VI’ builds a temporary location for the image in a memory location.
These are the VI’s that act as buffers between the shift registers that loop the image through
the entire program. There is one for the ‘Current Image’, the clean one that has to be sent
through the rest of the program where it is written on a recorded from, and one for the
‘Previous Image’ that is the previous frame of the image and referenced to for the LKP VI
and cycled for the illusion of motion. These images are cycled so at 20 frames per second
there are three images that are replaced every 0.05 seconds. The first one is the source image
from the ‘Select Camera’, then there is the ‘Current Image’ that has been grabbed by the
IMAQdx Grab2 VI’ and then there is the ‘Previous Image’ that is being used as reference for
the ‘LKP VI’.
5. This cluster holds a 1D array of the previous X, Y image coordinates of the target particle.
6. All of the image information enters the ‘While Loop’
7. It then enters a case structure which is controlled on the UI when the operator presses the
‘Select Pixel’ Boolean control. The ‘True’ state initiates another sequence of VI’s which
determine the location of the particle. The ‘False’ state is the one represented in Figure.26.
The architecture of the program made it necessary to require the user to select a particle on
the screen before the particle could be addressed, as no screen contact would stop the link
Figure 22: The path of the image Part 1
1 2
3
4
5
6
7 8 9 10 11
between the ‘Feature Target Conditioning SUB VI’ and the ‘Current Image’. This is worth
further consideration.
8. The ‘Select Camera Image’ and the ‘Current Image’ enter the ‘IMAQdx Grab2 VI’, where
both images are assessed to be a suitable image type. If the format of the image doesn’t
match the camera then this VI alters it to an IMAQ suitable format.
9. The ‘IMAQ ExtractSingleColorPlane VI’ takes the ‘Current Image’ and filters out different
colours in the RGB (red, green and blue) spectrum. This will turn a 64- bit RGB image into
an 8-bit Greyscale image and should lighten the amount of information running though out
the program. This is however a part of the program that could be altered in the future to:
a. Give a higher definition to the image and therefore more precision to the output
b. Give a selection of colours to read from potentially with full UI control
It would be a simple matter of inserting one of the many IMAQ image manipulation tools and
tuning it to suit the purpose.
10. At this point the ‘Current Image’ enters the ‘LKP Optical Flow VI’. This is a fully defined
feature which is explained in chapter………….. The ‘Previous Image’ is also fed into the VI
where it is used to approximate the current images particle position.
11. The ‘Current Image’ then enters the ‘Feature Target Conditioning SUB VI’ that allows the
user to place the particle on the image and writes the particle to the anchor point so when the
test is initiated it begins at zero. This is explained in greater detail in chapter…………..
PART 2:
This region completes the function required by the image.
1. The ‘Current Image’ arrives at the case structure operated by the camera mode control on the
UI (either: Mobile Microscope, Tensile Test or Compression Test). In Figure.24 ‘Tensile
Test’ is selected.
2. The ‘Current Image’ enters the ‘IMAQ Overlay Text VI’ which writes a continual graphical
string overlay on the image to the designated origin coordinates.
3. The ‘Tensile Calibrated Conversion SUB VI’ has nothing to do with the image directly but
does take the difference in pixels of the change in image and turn it into a real world value of
mm. When the ‘Compression Test’ camera mode is selected by the user the text is altered
slightly and so is the position of the next item.
4. In its appropriate setting the image then has a rectangle overlaid onto it. This is done with the
‘IMAQ Overly Rectangle VI’. The tensile test setting and the compression test setting have
two different sets of 4 coordinates. Nearer the top for the downwards motion of the camera
for the compression tests and nearer the bottom for the tension testing.
5. This is the actual output of the image as seen on the UI in real time. It is also called an ‘End
Session’
6. The ‘IMAQ Image to Image VI’ writes the small portion of the ROI that is written by the
‘Feature Target Conditioning SUB VI’ to the ‘Current Image’ to the entire image from the
‘Previous Image’ thread. This is the new displacement read by the LKP VI, and ultimately,
the change in displacement on the Y axis, which is the primary reason for this program.
PART 3:
This region deals with image housekeeping.
1. All three image threads leave the camera mode case structure and the while loop.
2. The ‘IMAQdx Close Camera VI’ stops the infeed from the camera for that iteration of the
program. And closes the camera until the next frame, which at 20fps will be within 0.05
seconds.
3. The two ‘IMAQ Dispose VI’s’ serve to destroy the acquired images as soon as they have
been processed. As with the Close Camera VI, this is the end point for the images before
the cycle starts again.
Table 4: Start and end points of all image streams
4. The ‘Simple Error Handler VI’ at the end of the program runs through most of the VI’s
within the architecture and reports where an error has occurred (usually with a reference
number that can be found on the NI website). This is an especially vital function for a
vision system as the signals to be manipulated are notoriously difficult to error trap.
There is also potential to add a control element to the image if required. For instance, if a
threshold value of ‘White’ in an image is met, an error can be generated and used to write
a times stamp to a file. This is also worth further consideration/
Select Camera Image IMAQdx Close Camera VI
Current Image Right hand side IMAQ Dispose VI
Previous Image Left hand side IMAQ Dispose VI
Figure 23: Path of the image Part 2
1
2 4 5
6
3
Figure 24: Path of the image Part 3
2 3 4
1
Choosing the appropriate IMAQ function to follow the image:
The Lucas Kanade Pyramid
The heart of this vision system is an IMAQ Optical Flow function.
There are three main types of optical flow algorithms:
 Phase correlation and discrete optimization
 Block-based sampling
 Differential calculation
The key problems with optical flow mapping are overcoming aliasing or matching patterns, or when
the image moves to quickly to calculate.
The differential method is best suited to following motion between a fixed geographical point on
screen determined by the user and a point on the image (a pixel on the mounted scale on the Lloyds
30K upright). For the MTVS, only the Y axis is required.
In LabVIEW there are three available types:
 IMAQ Optical Flow (HS) – Calculates the optical movement (velocity flow) in the image
using the Horn and Schunk algorithm. This method constrains the image data to give a
smoothness of movement. It can yield a high volume of error information and handle complex
images and motion but it is more sensitive to noise than the alternative methods. It is also
not ideally suited to following bold contrasting objects that move at a steady rate which is
exactly what is presented to the camera in the MTVS’s region of interest.
 IMAQ Optical Flow (LK) – Calculates the optical movement (velocity flow) in the image
using the Lucas and Kanede algorithm. This method is a widely used differential calculation
to estimate that the movement is equal in the pixels close to the pixel selected to track, and it
assumes that the movement between frames is consistent and steady. “It works by attempting
to guess in which direction an object has moved so that local changes in intensity can be
explained.” (Rojas, 2011)
It does this using ‘The least squares criterion’, a standard approximation of systems that have
more equations than unknowns, and calculates these equations. The initial calculation
determines the vector at the specific time in the neighbouring pixels:
𝐼 𝑥(𝑞1)𝑉𝑥 + 𝐼 𝑦(𝑞1)𝑉𝑦 = −𝐼𝑡(𝑞1)
𝐼 𝑥(𝑞2)𝑉𝑥 + 𝐼 𝑦(𝑞2)𝑉𝑦 = −𝐼𝑡(𝑞2)
𝐼 𝑥(𝑞3)𝑉𝑥 + 𝐼 𝑦(𝑞3)𝑉𝑦 = −𝐼𝑡(𝑞3) … … …
Where 𝑞 is the neighbouring pixel (numbered) inside the region of interest and 𝐼 𝑥, 𝐼 𝑦 and 𝐼𝑡
represent the partial derivatives of the image 𝐼 with respect to vectors x and y. Time is
represented by t.
This means that each pixel in the region requires an equation, creating more equations than
unknowns.
It is first converted into matrix form Av = b where:
𝐴 = [
𝐼 𝑥(𝑞1) 𝐼 𝑦(𝑞1)
𝐼 𝑥(𝑞2) 𝐼 𝑦(𝑞2)
𝐼 𝑥(𝑞3) 𝐼 𝑦(𝑞3)
] , 𝑣 = [
𝑉𝑥
𝑉𝑦
] , 𝑎𝑛𝑑 𝑏 = [
−𝐼𝑡(𝑞1)
−𝐼𝑡(𝑞2)
−𝐼𝑡(𝑞3)
]
Where 𝐴 𝑇
is the transpose of matrix 𝐴, the values for the change in pixel intensity and
direction are calculated by 𝑣 = (𝐴 𝑇
𝐴)−1
𝐴 𝑇
𝑏
This gives the same importance to all the pixels in the region, so a further equation weights
the ones closer to the selected pixel with more importance.
The MTVS has an extreme difference between pixel intensity in the image which suits the LK
system, but the LK method is limited to a vector velocity of only one pixel per fame.
The maximum frame rate of the camera is 30 frames per second with a resolution of 380
pixels per millimetre. The system would begin to alias if it moved over 12.66mm per second:
(
1 𝑥 𝑓𝑟𝑎𝑚𝑒
30 𝑥 𝑠𝑒𝑐𝑜𝑛𝑑𝑠
) × 380𝑝𝑖𝑥𝑒𝑙𝑠 = 12.6666 𝑚𝑖𝑙𝑙𝑖𝑚𝑒𝑡𝑟𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
 IMAQ Optical Flow (LKP) – An extension of the Optical Flow (LK) which uses ‘Image
Pyramids’ to combat the limited vector velocity. First, each original frame is sub-sampled to
different degrees to create several pyramid levels. ‘The Lucas-Kanade method is used at the
top level (lowest resolution) yielding a coarse estimate, but supporting greater motion. Lucas-
Kanade is then used again at lower levels (higher resolution) to refine the optical flow
estimate.’ (Bier, 2011)
The LPK version has a control for how many levels of you wish to implement. This control
enables the developer to fine tune the image response. The more pyramid levels the higher
the accuracy, but the greater the demand on the program. As the Y axis is the only required
output to the rest of the program, this VI is best suited.
Feature Target Conditioning SUB VI
This extensively developed SUB VI determines the operation of the pixel in regards to its location.
Figure 25: Lucas Kanade Pyramid Function
The ‘Target Particle Options’ type definition control determines a set of features for the target
particle. This set of features is unbundled and fed into the True/False case structure to determine its
state, the state of the inner case structure. The majority of the functions inside the SUB VI are not
relevant to the project and where only used to develop an understanding of the manipulation of the
particle with the LPK VI. It is possible using this structure to develop a more complex Feature Target
then the present single particle, but it isn’t required for this project.
This SUB VI operates by simply writing a pixel using the ‘IMAQ Overlay Single Point VI’ onto the
image from the ‘Current Image’ thread and giving it a default colour of red. The placement of the
particle is decided at another stage of the image.
Tensile/Compression Calibrated Conversion SUB VI
This SUB VI carries the x, y coordinates as double 64 bit real values and acts as a simple
mathematical operation to do two things:
1. Address the Y coordinate of the particle in its present position to Zero at the start of the
test.
2. Convert the subsequent movement of the particle from a distance of pixels into a distance
of millimetres.
Figure.25 depicts the ‘Tensile Calibrated Conversion SUB VI’, the version for compression testing is
exactly the same structure but is +450 with no -1*.
The feature point’s bundle from the LKP is indexed out to the coordinate value which in this tensile
testing mode will be x = 300 and Y = 450. The Y element, which is the only real point of interest for
Figure 27: Tensile Calibrated Conversion Sub VI
Figure 26: Feature Target Conditioning Sub VI
This is the function that locates
the particle on the image
this test is extracted from the bundle and made zero. This value is converted to a positive as it is
travelling up the screen and the Y coordinate is written as a minus. The difference in displacement of
the particle in pixels is multiplied by the factor of calibration which has been worked out in another
part of the program CHAPTER……. as a value of millimetres per pixel. This now real time value is
sent on as a 1D array to the timing structure to synchronously write to a file that will be compared to
the Nexygen output text file.
Reading MTVS and Nexygen values and writing to a new array, graph and
text file
There are three 2D arrays that need to be built for the system to work.
 Output from MTVS:
o The ‘Elapsed Time VI’ is initiated in synchronicity with the Nexygen ‘Start Test’
button. This is written to the first column of the array as seconds.
o The calculated displacement taken from the core vision program in either the
‘Tensile’ or the ‘Compression’ setting as positive scaled millimetres is written to the
third.
 Input from Nexygen:
o The ‘Test Time’ initiated when the ‘Start Test’ button is pressed is written to the first
column.
o The ‘Load’ taken from the load cell output in Newton’s is written to column two.
o The ‘Extension’ taken from the internal extensometer in millimetres is written to the
third.
o The optional ‘Deflection’ values if selected by the user written to the fourth.
 Combined MTVS and Nexygen to Use for the graph:
o The synchronised and combined ‘Elapsed Time/Test Time’ values are written to the
first column. Not used in the graph.
o The ‘Load’ taken from the Nexygen read .txt file is written to MTVS’s second
column in Newton’s. Used on the ‘Y-axis’ of the graph.
o The calculated displacement of the MTVS system in millimetres. Used on the ‘X-
axis’ of the graph.
o The internal extensometers extension taken from the Nexygen in millimetres. Also
used on the ‘X-axis’ of the graph.
o The optional ‘Deflection’ reading taken from the Nexygen selection in millimetres.
If it hasn’t been selected in Nexygen then it will appear greyed out and blank. This
array will not appear in the graph as requested by the user as it is rarely used.
As the camera is set to its maximum framerate of 30 fps, sample rate would be limited to 30 readings
per second. As the default setting for Nexygen sampling is approximately 12 RPS this is a static rate
that wouldn’t need to be regularly changed.
Write to Value and Array Sub (VI):
This relatively basic Sub VI takes the double 64-bit
real input from a 1D array and writes it in ascending
sequence in a timed structure. Every time a number
Figure 28: Write to Value and Array Sub (VI)
is written to the input array, it sends the value to an index array function and an insert into an array
function. The first extracts index ‘0’ (basically the first number) and writes the element to a simple
numerical indicator which will change every time the input changes. The second function reads the
input array, inserts the updated element to build a new 1D output array.
This function needs to have a controlled new element input which is done in the MTVS with an event
structure triggered by a Boolean ‘Start’ button as depicted in Figure 3.
When the structure is executed, the input 1D array will be written each time the ‘Timeout’ case is
executed which in the MTVS is also the control for the ‘Readings per Second’ (RPS control), defined
by the used on the HMI. The ‘Timeout’ event is executed each time the millisecond input to the time
in terminal is reached.
The 1 second value and the RPS value are entered as double 64-bit real but are converted to long 32-
bit integers, as this is the preferred data type for timing sequences in LabVIEW.
This calculation means:
1 𝑠𝑒𝑐𝑜𝑛𝑑
𝑠𝑒𝑙𝑒𝑐𝑡𝑒𝑑 𝑟𝑒𝑎𝑑𝑖𝑛𝑔𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
= 1 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑤𝑟𝑖𝑡𝑡𝑒𝑛 𝑡𝑜 𝑛𝑒𝑥𝑡 1𝐷 𝑎𝑟𝑟𝑎𝑦 𝑟𝑜𝑤
This method is used for the Y axis displacement, synchronising the Nexygen timing sequence and
synchronising the applied load readings.
The Timing Structure:
During a tensile or compression test
the load applied (in Newton’s)
needs to be recorded in direct
reference to the displacement
caused by this load. This is the core
use for the Lloyds LR30K in place
at DIT, and the Nexygen software
writes these values to a stress strain
graph to give the traditional curve of
a material breaking under a load. In
order for the MTVS to deliver a
more accurate or at least
comparable rate of displacement versus load, it needs to read and write the displacement and load
synchronously. The load can be written after the test is completed, to the graph from the
automatically produced Nexygen text file selected by the user, but the best way to match load and
displacement proved to be time. Therefore the MTVS needed a timing sequence. This timing
sequence is also used to set the frequency of readings, or ‘Readings per Second’, as outlined in ‘Write
to Value and Array Sub (VI) chapter.
The ‘Elapsed Time’ clock is initiated by a Boolean input that is triggered by the ‘Start Test’ event
executed in the Nexygen software.
The reading per second value is input during the initial installation to match the sampling frequency
of the Nexygen output. This is a static rate of about 12 per second that is not open to change by the
operator unless they go into the advanced settings in the Nexygen software. The MTVS output time
can be fine-tuned during calibration to match the Nexygen sampling frequency but should only be a
one off input during the initial set up of the MTVS system. It will not be a control feature on the UI,
but will be practical to alter by the designer.
Figure 29: 'Readings per Second' using a 'Write to Value and Array' Sub (VI)
Document Management and Graph Building:
The default output for all Nexygen batch files is in a tab delineated text file.
The adaptability of a simple text file has made it the preferred report format for students, technicians
and educators using the Lloyds LR30K at DIT.
This determined that the default output for the combined MTVS and Nexygen report should remain as
a text file. The graph output is instantly transferrable to an Excel spreadsheet or a simple jpeg image
of the final graph shape with labelled and scaled X and Y axis.
The flow of information from Nexygen requires a certain amount of control as it is initially
determined by the user. Before the test can actually begin the operator has to select which values are
to be recorded. The ‘Extension’ (mm) which can be either tension or compression, and the ‘Load’ (N)
values are automatically written to file, as without either of these the test is meaningless. There are
further options to insert deflection and time columns. The primary operator in the lab stated that the
‘Deflection’ option is barely used or written to graph, so it was determined to only have a text file
column for these values if selected by the user and not automatically write them into the graph. The
time function is required by the MTVS system to indicate the initiation of the test sequence and to
anchor a Nexygen static load curve to the recorded MTVS displacement so the comparable MTVS
Load/Displacement file can be written and graph can be displayed. The time arrays do not need to be
represented in the final MTVS text file report as usable data that will combine the MTVS rate of
displacement and the Nexygen user selected output but in order to read the output correctly the MTVS
time frame will automatically be presented in the first column.
In order to sort and write
the correct column from
the input text file from
Nexygen and the input time
and displacement readings
from MTVS into a usable
format for the graph and
the final MTVS text file, a
series of sub VI’s needed to
be constructed.
This structure is outside of
the main while loop.
Sort to File and Array Sub (VI):
The sorting function required logical control and elimination of paths. The ‘Read from Document’
file path is connected directly to the browser selection tool with the same name on the ‘Document and
Graph’ tab on the UI. As is the ‘Write to document’ file path. These inputs control the ‘Read Write
to Array SUB VI’ which is detailed in the following chapter.
The bottom half of the SUB VI routs the 1D double 64-bit real arrays as column 1 to 4. The top half
of the VI decides via 1D string arrays, which column goes where and how it is titled.
Figure 30: Document control and graph writing architecture
The ‘Read from Spreadsheet file VI’ unpacks the user selected Nexygen text file as a string value, and
reports the first row (the headings of the columns) to the next stage and writes it directly to the UI in
string. 0, 1, 2 and 3 are the four Nexygen output columns and the index array functions in turn read
these columns and send them to the next stage of selection. The indexed array reading index 3
(actually column 4 in the table) is a dead end as this is where Nexygen will output of deflection which
will be automatically titled if it is chosen beforehand by the user, and always in column 4 of the table.
The output from the indexed array 1D string enters an ‘Equal?’ function that will compare it with
string constant inputs and determine if it can create a Boolean 1 or 0. The Boolean value will be
converted into a 16 bit integer 1 or 0 and applied to a simple equation to determine if it will operate
another Boolean value to trigger a case structure. The premise of this system is that time can only
appear in column 1 or not at all, load can only appear in column 1 or 2, extension can only appear in
column 2 or 3 and deflection can only
appear in column 3 or 4.
Read and Write File and Array
SUB VI:
This VI interprets the selected
Nexygen text documents and separates
them into a source to read as double
64 bit real 2D array. One of the
sources outputs is sent to be indexed
as 1D array’s from 0 to 4. These 1D
arrays are then fed out of the sub into
the state machines that have been pre-
selected to display or not and in which
order to do so by the string column
Figure 31: Sort to File and Array
Figure 32: Read Write File and Array
SUB VI
titles.
Graph Selector SUB VI:
This sub selects the pre-chosen displacement and load 1D array’s from MTVS and Nexygen and
writes them to the stress strain graph mounted in the tab ‘Document and Graph’ on the UI. The user
can select which readings to present;
1. Nexygen load and displacement
2. Nexygen load and MTVS displacement
3. Nexygen load, Nexygen displacement and MTVS displacement
In fig.7 the file path ‘Readings from MTVS’ will actually be a 2D array of double 64 bit real
values for Nexygen load and MTVS displacement. Nexygen load will be matched with MTVS
displacement in the ‘MTVS grab Load SUB VI’ which will be discussed in later. The double 64
bit 1D real input’s for ‘Place Nexygen Displacement Here’ and ‘Place Load Here’ is where the
pre-routed values are introduced from Nexygen. The 16 bit integer enum named ‘Graph View
Selection’ offers three choices on the UI to the user:
1. MTVS Displacement
2. Nexygen Displacement
3. Both
Depending on the enum influenced state, the wiring connections give the appropriate 1D array
outputs that are bundled into a cluster of 2 1D arrays, and built into an array of 2 1D array
clusters. This is the best way to read a value in an XY graph.
Calibrating the image, converting the input values into real-world
measurements and adapting the mobile microscope function
There are 5-6 inputs required by the system but only the MTVS displacement needs calibration.
This displacement starts as the sum of differences in pixels on the Y axis as read by the LKP Optical
Flow VI and is conveyed as a double 64 bit real value. This value needed to be transformed into
millimetres before being written in real time to the graph and text file outputs as a usable 64 bit real
1D array.
This displacement starts as the sum of differences in pixels on the Y axis as read by the LKP Optical
flow VI and is conveyed as a double 64 bit real value. The value needed to be transformed into
millimetres before being written in real time to the graph and text file outputs as a usable 64 bit real
1D array.
Figure 33: Graph Selector SUB VI
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine
DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine

More Related Content

Viewers also liked

Nour-agour-latest-CV
Nour-agour-latest-CVNour-agour-latest-CV
Nour-agour-latest-CV
Nour El houda Agour
 
Gaudelio unidad didactics
Gaudelio unidad didacticsGaudelio unidad didactics
Gaudelio unidad didactics
krloscilia
 
Herramientas para crear un buen portfolio
Herramientas para crear un buen portfolioHerramientas para crear un buen portfolio
Herramientas para crear un buen portfolio
Isemco Formación
 
PASS-CATCH Presentation
PASS-CATCH PresentationPASS-CATCH Presentation
PASS-CATCH Presentation
Shannon Rasp
 
Bakeri Group projects brochure
Bakeri Group projects brochureBakeri Group projects brochure
Bakeri Group projects brochure
Bakeri Group
 
Poesías sonetos
Poesías sonetosPoesías sonetos
Poesías sonetos
Anneliecer Ovies
 
Lavasa Corporate Presentation February 2012
Lavasa Corporate Presentation February 2012Lavasa Corporate Presentation February 2012
Lavasa Corporate Presentation February 2012
Lavasa Corporation Ltd
 
Argumentación de las evidencias
Argumentación de las evidenciasArgumentación de las evidencias
Argumentación de las evidencias
Jhinojosa Ivonne
 
Real Life Interoperability in SuperOP
Real Life Interoperability in SuperOPReal Life Interoperability in SuperOP
Real Life Interoperability in SuperOP
IMTC
 
Geología y vinos de España
Geología y vinos de EspañaGeología y vinos de España
Geología y vinos de España
Colegio Oficial de Geólogos
 
Get your head out of your inbox
Get your head out of your inboxGet your head out of your inbox
Get your head out of your inbox
Louis Richardson
 
Using E-Commerce to Automate Your Collaborative Business Transactions
Using E-Commerce to Automate Your Collaborative Business TransactionsUsing E-Commerce to Automate Your Collaborative Business Transactions
Using E-Commerce to Automate Your Collaborative Business Transactions
SAP Ariba
 
Osservatorio Multicanalità 2008 - Giorgio Ferrari - Nielsen
Osservatorio Multicanalità 2008 - Giorgio Ferrari - NielsenOsservatorio Multicanalità 2008 - Giorgio Ferrari - Nielsen
Osservatorio Multicanalità 2008 - Giorgio Ferrari - NielsenConnexia
 
Conversacion en linea por bryan adryan y erck ramos
Conversacion en linea por bryan adryan y erck ramosConversacion en linea por bryan adryan y erck ramos
Conversacion en linea por bryan adryan y erck ramos
erickramos22
 
Gypsum (2)
Gypsum (2)Gypsum (2)
Webinar Presentation: "Diagnostic Flash Application with OTX"
Webinar Presentation: "Diagnostic Flash Application with OTX"Webinar Presentation: "Diagnostic Flash Application with OTX"
Webinar Presentation: "Diagnostic Flash Application with OTX"
KPIT
 
Physical and mechanical properties of dental material
Physical and mechanical properties of dental materialPhysical and mechanical properties of dental material
Physical and mechanical properties of dental material
Indian dental academy
 
La Literatura Neoclásica. 2º BACH.
La Literatura Neoclásica. 2º BACH.La Literatura Neoclásica. 2º BACH.
La Literatura Neoclásica. 2º BACH.
javilasan
 
De logos y de marcas (daniel naranjo)
De logos y de marcas (daniel naranjo)De logos y de marcas (daniel naranjo)
De logos y de marcas (daniel naranjo)
daniel naranjo
 

Viewers also liked (20)

Nour-agour-latest-CV
Nour-agour-latest-CVNour-agour-latest-CV
Nour-agour-latest-CV
 
Gaudelio unidad didactics
Gaudelio unidad didacticsGaudelio unidad didactics
Gaudelio unidad didactics
 
Herramientas para crear un buen portfolio
Herramientas para crear un buen portfolioHerramientas para crear un buen portfolio
Herramientas para crear un buen portfolio
 
PASS-CATCH Presentation
PASS-CATCH PresentationPASS-CATCH Presentation
PASS-CATCH Presentation
 
55 l'altra via ..
55 l'altra via ..55 l'altra via ..
55 l'altra via ..
 
Bakeri Group projects brochure
Bakeri Group projects brochureBakeri Group projects brochure
Bakeri Group projects brochure
 
Poesías sonetos
Poesías sonetosPoesías sonetos
Poesías sonetos
 
Lavasa Corporate Presentation February 2012
Lavasa Corporate Presentation February 2012Lavasa Corporate Presentation February 2012
Lavasa Corporate Presentation February 2012
 
Argumentación de las evidencias
Argumentación de las evidenciasArgumentación de las evidencias
Argumentación de las evidencias
 
Real Life Interoperability in SuperOP
Real Life Interoperability in SuperOPReal Life Interoperability in SuperOP
Real Life Interoperability in SuperOP
 
Geología y vinos de España
Geología y vinos de EspañaGeología y vinos de España
Geología y vinos de España
 
Get your head out of your inbox
Get your head out of your inboxGet your head out of your inbox
Get your head out of your inbox
 
Using E-Commerce to Automate Your Collaborative Business Transactions
Using E-Commerce to Automate Your Collaborative Business TransactionsUsing E-Commerce to Automate Your Collaborative Business Transactions
Using E-Commerce to Automate Your Collaborative Business Transactions
 
Osservatorio Multicanalità 2008 - Giorgio Ferrari - Nielsen
Osservatorio Multicanalità 2008 - Giorgio Ferrari - NielsenOsservatorio Multicanalità 2008 - Giorgio Ferrari - Nielsen
Osservatorio Multicanalità 2008 - Giorgio Ferrari - Nielsen
 
Conversacion en linea por bryan adryan y erck ramos
Conversacion en linea por bryan adryan y erck ramosConversacion en linea por bryan adryan y erck ramos
Conversacion en linea por bryan adryan y erck ramos
 
Gypsum (2)
Gypsum (2)Gypsum (2)
Gypsum (2)
 
Webinar Presentation: "Diagnostic Flash Application with OTX"
Webinar Presentation: "Diagnostic Flash Application with OTX"Webinar Presentation: "Diagnostic Flash Application with OTX"
Webinar Presentation: "Diagnostic Flash Application with OTX"
 
Physical and mechanical properties of dental material
Physical and mechanical properties of dental materialPhysical and mechanical properties of dental material
Physical and mechanical properties of dental material
 
La Literatura Neoclásica. 2º BACH.
La Literatura Neoclásica. 2º BACH.La Literatura Neoclásica. 2º BACH.
La Literatura Neoclásica. 2º BACH.
 
De logos y de marcas (daniel naranjo)
De logos y de marcas (daniel naranjo)De logos y de marcas (daniel naranjo)
De logos y de marcas (daniel naranjo)
 

Similar to DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine

Tdoct0713a eng
Tdoct0713a engTdoct0713a eng
Tdoct0713a eng
Vo Quoc Hieu
 
FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12
Claudio Lucente
 
Icp
IcpIcp
Electrical fire monitoring system installation manual
Electrical fire monitoring system installation manualElectrical fire monitoring system installation manual
Electrical fire monitoring system installation manual
Vedard Security Alarm System Store
 
Guidance on bolted_joints
Guidance on bolted_jointsGuidance on bolted_joints
Guidance on bolted_joints
Prince Nwabuko
 
Using Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentUsing Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross Development
Giacomo Antonino Fazio
 
Inflight data acquisition system
Inflight data acquisition systemInflight data acquisition system
Inflight data acquisition system
Syamim Idris
 
Cosec reports
Cosec reportsCosec reports
NUREG_CR_5850
NUREG_CR_5850NUREG_CR_5850
NUREG_CR_5850
srgreene
 
Design of a bionic hand using non invasive interface
Design of a bionic hand using non invasive interfaceDesign of a bionic hand using non invasive interface
Design of a bionic hand using non invasive interface
mangal das
 
dcm4chee-ref.pdf
dcm4chee-ref.pdfdcm4chee-ref.pdf
dcm4chee-ref.pdf
ssuser7556c8
 
General Maintenance Standards V0.6
General Maintenance Standards V0.6General Maintenance Standards V0.6
General Maintenance Standards V0.6
Bart Den Tijn
 
Aviation Control Unit
Aviation Control UnitAviation Control Unit
Aviation Control Unit
Samarth Annappa Swamy
 
Lab view basics_i[1]
Lab view basics_i[1]Lab view basics_i[1]
Lab view basics_i[1]
quanghaixp
 
Debargha
DebarghaDebargha
Environmental impact of economic cable sizing
Environmental impact of economic cable sizingEnvironmental impact of economic cable sizing
Environmental impact of economic cable sizing
Leonardo ENERGY
 
11iadutil
11iadutil11iadutil
11iadutil
Deepti Singh
 
AppLoader User Guide
AppLoader User GuideAppLoader User Guide
AppLoader User Guide
NRG Global
 
WebHost Manager User Manual
WebHost Manager User ManualWebHost Manager User Manual
WebHost Manager User Manual
webhostingguy
 
WebHost Manager User Manual
WebHost Manager User ManualWebHost Manager User Manual
WebHost Manager User Manual
webhostingguy
 

Similar to DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine (20)

Tdoct0713a eng
Tdoct0713a engTdoct0713a eng
Tdoct0713a eng
 
FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12
 
Icp
IcpIcp
Icp
 
Electrical fire monitoring system installation manual
Electrical fire monitoring system installation manualElectrical fire monitoring system installation manual
Electrical fire monitoring system installation manual
 
Guidance on bolted_joints
Guidance on bolted_jointsGuidance on bolted_joints
Guidance on bolted_joints
 
Using Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentUsing Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross Development
 
Inflight data acquisition system
Inflight data acquisition systemInflight data acquisition system
Inflight data acquisition system
 
Cosec reports
Cosec reportsCosec reports
Cosec reports
 
NUREG_CR_5850
NUREG_CR_5850NUREG_CR_5850
NUREG_CR_5850
 
Design of a bionic hand using non invasive interface
Design of a bionic hand using non invasive interfaceDesign of a bionic hand using non invasive interface
Design of a bionic hand using non invasive interface
 
dcm4chee-ref.pdf
dcm4chee-ref.pdfdcm4chee-ref.pdf
dcm4chee-ref.pdf
 
General Maintenance Standards V0.6
General Maintenance Standards V0.6General Maintenance Standards V0.6
General Maintenance Standards V0.6
 
Aviation Control Unit
Aviation Control UnitAviation Control Unit
Aviation Control Unit
 
Lab view basics_i[1]
Lab view basics_i[1]Lab view basics_i[1]
Lab view basics_i[1]
 
Debargha
DebarghaDebargha
Debargha
 
Environmental impact of economic cable sizing
Environmental impact of economic cable sizingEnvironmental impact of economic cable sizing
Environmental impact of economic cable sizing
 
11iadutil
11iadutil11iadutil
11iadutil
 
AppLoader User Guide
AppLoader User GuideAppLoader User Guide
AppLoader User Guide
 
WebHost Manager User Manual
WebHost Manager User ManualWebHost Manager User Manual
WebHost Manager User Manual
 
WebHost Manager User Manual
WebHost Manager User ManualWebHost Manager User Manual
WebHost Manager User Manual
 

DT003a Final Report - The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine

  • 1. The Design and Build of a Non-contact Extensometer for D.I.T’s tensile test machine By Morven Gannon No: c12760661 Faculty of Engineering Thesis presented for the Degree of Bachelor of Engineering Technology in Automation Engineering DT003A Supervisor: Ken Keating Date: April 2015
  • 2. Declaration I hereby certify that this project report which I now submit for the award of Bachelor of Automation Engineering is entirely my own work and has not been taken from the work of others unless otherwise cited and acknowledged within the text of my work or in the Bibliography at the end. This project report was prepared according to the regulations of the Dublin Institute of Technology and has not been submitted in whole or in part for an award in any other Institute or University. The Institute has permission to keep, to lend or to copy this report in whole or in part, on condition that any such use of the material of the report is duly acknowledged. The original design content of this report cannot be reproduced without the direct consent of the author. Signed……………………………………….. Date…………………………………………..
  • 3. Abstract The Lloyds LR30K Materials Testing Machine located in DIT Bolton Street materials laboratory has been proved to give inaccurate extensometer readings. This generates inaccurate data that could have an adverse effect on DIT’s intellectual property. The proprietary alternatives are beyond the materials labs present budget so price was a consideration. The principle objective of this project and the report is to resolve this problem by investigating, designing, programming and installing a purpose built non-contact extensometer. This would take the form of a vision system The resulting vision system
  • 4. Table of Contents Chapter 1................................................................................................................................................vi General introductions.........................................................................................................................vi 1.1 Introduction..............................................................................................................................vi 1.2 Project Aim..............................................................................................................................vi 1.3 Project Objectives .............................................................................................................vii 1.4 Chapter Summary ...................................................................................................................vii Chapter 2...............................................................................................................................................vii Literature Review..............................................................................................................................vii 2.1 Chapter Introduction ...............................................................................................................vii 2.2 General background history of tensile testing.........................................................................vii 2.3 Review of Materials Testing Machines .................................................................................viii 2.4 The Customer...........................................................................................................................ix 2.5 Detailed Problem Definition.....................................................................................................x 2.6 Tensile Test Procedure............................................................................................................xii 2.7 The Test Results.....................................................................................................................xiv 2.8 Tensile Test Samples ..............................................................................................................xv 2.9 Extensometer Types...............................................................................................................xvi 2.10 PC and Software .................................................................................................................xvii 2.11 Chapter summary.................................................................................................................xix Chapter 3..............................................................................................................................................xix Specifications and design Concepts.................................................................................................xix 3.1 Chapter introduction ..............................................................................................................xix 2.8 Considerations for using an Optical Vision System ..............................................................xix 3.2 Specifications.....................................................................................................................xxviii 3.3 Design inspiration .................................................................................................................xxx 3.4 Design concepts ....................................................................................................................xxx 3.5 Design concept matrix ..........................................................................................................xxx 3.6 Final design choice...............................................................................................................xxxi 3.7 Feasibility................................................................................ Error! Bookmark not defined. 3.8 Chapter summary.................................................................................................................xxxi Chapter 4............................................................................................................................................xxxi Final Physical Design ....................................................................................................................xxxi 4.1 Chapter Introduction ............................................................... Error! Bookmark not defined. 4.2 Design Description.................................................................. Error! Bookmark not defined. 4.3 Parts and Components Selection............................................. Error! Bookmark not defined.
  • 5. 4.5 Chapter summary...............................................................................................................xxxiii Chapter 5..........................................................................................................................................xxxiv Programming................................................................................................................................xxxiv Materials Testing Vision System - MTVS...................................................................................xxxiv The Path of the Image..............................................................................................................xxxiv Choosing the appropriate IMAQ function to follow the image: ................................................xxxviii Reading MTVS and Nexygen values and writing to a new array, graph and text file......................xli ......................................................................................................................................................xli Write to Value and Array Sub (VI):..............................................................................................xli The Timing Structure:..................................................................................................................xlii Document Management and Graph Building: ............................................................................xliii Sort to File and Array Sub (VI): .................................................................................................xliii Read and Write File and Array SUB VI: ....................................................................................xliv Graph Selector SUB VI: ..............................................................................................................xlv Calibrating the image, converting the input values into real-world measurements and adapting the mobile microscope function.............................................................................................................xlv Calibration Gauge SUB VI ........................................................................................................xlvii Range Gauge Application SUB VI ............................................................................................xlvii Calibrated Real Measurement Conversion SUB VI...................................................................xlvii Reset Sub (VI): .........................................................................................................................xlviii 5.6 Instruction Manual....................................................................................................................xlix Chapter 6.............................................................................................................................................xlix Validation of Project Objectives and Design Specification............................................................xlix 6.1 Chapter Introduction .............................................................................................................xlix 6.2 Project Objectives .................................................................................................................xlix 6.3 Design Specifications............................................................................................................xlix 6.4 Design Validation and Verification Matrix...........................................................................xlix 6.5 Chapter Summary ......................................................................................................................l Chapter 7..................................................................................................................................................l Conclusions and Recommendations ....................................................................................................l 7.1 Chapter Introduction ..................................................................................................................l 7.2 Conclusions................................................................................................................................l 7.3 Recommendations......................................................................................................................l 7.4 Reflections and Closing Statement ............................................................................................l 7.4 Chapter summary.......................................................................................................................l Bibliography ...........................................................................................................................................li
  • 6. Chapter 1 General introductions 1.1 Introduction In a materials lab, the quality of research is sometimes determined by the quality of the equipment. In order to produce accurate data you need to have complete confidence in the available equipment. In a materials lab the tensile test is the most common way of determining the properties of a material and its suitability for purpose. If the data gathered on a material is erroneous it could have disastrous consequences at a later stage; for example, a tension test to determine the shear point of a bolt used to hold stadium bleachers in place. The machinery to perform this test can range from relatively inexpensive hand powered screw, lever or balance machines, electric gantry or single post desktop systems to extremely powerful gantry hydraulic floor based machines. They are generally used to fulfil the function of reading a change in displacement against a change in an applied force, to give a stress and strain graph and ultimately a ‘Young’s Modulus’. In the DIT materials lab the tensile testing machine is a Lloyds LR30K. It is a well-engineered machine and has a highly accurate range of load cells that give quality data about the applied load. The LR30K’s internal optical decoder sensor which gives the displacement measurements for stress measurements has however, been proven inaccurate on frequent occasions. In order to get equally accurate displacement readings, external extensometers are required. These range from electronic strain clip on systems, to extensive vision systems using either laser tracking or optical mapping. These are expensive additions to the machine and have been beyond the materials lab budget since the machine was purchased. This project report contains a detailed literature review including extensive investigation and research, with concept development, system designs and calculations to produce an affordable alternative to the available proprietary options that can deliver a more accurate stress and strain graph than the present internal The reports shows the methodology used, steps taken, objectives targeted, progression of objectives, conclusions and recommendations for further developments. 1.2 Project Aim This project aims to design, and build an alternative extensometer system for the Lloyds LR30K that can give comparable and if possible, more accurate readings than the present internal system. It should be non-contact (more specifically a vision system), inexpensive, easy to use, fit for purpose and adaptable. Figure 1: The Lloyds LR30K Materials Testing Machine (Capital Asset Exchange & Trading LLC. , 2011)
  • 7. 1.3 Project Objectives  Objective 1: Define the systems present deficiencies, the operation and procedure of a tensile test using D.I.T’s Lloyd LR30K, and the test samples used.  Objective 2: Compare the contact and non-contact extensometer systems on the market, and assess an ideal solution.  Objective 3: Upon determining an alternative, investigate its properties and applications.  Objective 4: To design and build a fully functional non-contact extensometer for D.I.T’s tensile test machine at a reasonable price, using available software.  Objective 4: Develop an interface that is comprehensive to use, with a calibration capability and user defined functionality.  Objective 5: Evaluate the performance of the system and refine the output to gain comparable and if possible improved readings than the present system. 1.4 Chapter Summary This introductory chapter has outlined the function of a tensile testing machine, and the problems facing the currently used Lloyds LR30K tensile testing machine in D.I.T Bolton Street. The main aim of the project was explained in a statement and then detailed in a list of primary objectives. Chapter 2 Literature Review 2.1 Chapter Introduction This chapter assesses the history, variety and function of the materials testing machine. The Lloyds LR30K’s inbuilt extensometer function has been analysed and a full problem definition is given by error testing the machine and examining the primary user’s complaints. The test procedure has been examined and a common usage for the machine has been defined. Different core components of the system; the test samples and the accompanying software are investigated. Alternative extensometer methods have also been researched. 2.2 General background history of tensile testing Recorded tests to determine a material’s ability to safely sustain a load before breaking have been documented as early as 4th Century BC. The ‘Stele of Eleusis’ is ‘a stone tablet inscribed with the specification of the composition of bronze spigots used for keying together the stone blocks used for constructing columns in Greek buildings’ (Varoufakis, 1987) In the 16th Century Leonardo da Vinci recorded quantitative methods to measure the differences in material properties. ‘In one of Leonardo Da Vinci's notebooks, an experiment is described where strengths in tension are measured for various lengths of wire. The notebook indicates that the results of these experiments were that longer wires were weaker than shorter wires. This result defines classical mechanics of materials.’ (Lund & Byrne, 2000) The modern definition of a tensile test can best be summed up by (Higgins, 2010) as ‘The tensile test of a material involves a test piece of known cross sectional area being gripped in the jaws of a testing- machine and then subject to a tensile force which is increased in increments. For each increment of
  • 8. force, the amount by which the length of a known ‘gauge length’ on the test-piece increases is measured. This process continues until the test-piece fractures.’ 2.3 Review of Materials Testing Machines Industry standards are highly specified for materials testing in general. The most common standard for the tensile testing of metals is ISO 6892 or ISO 9513 and ISO 527 for plastic samples. ISO 6892 defines the test as “Straining a test piece by tensile force for the determination of one or more of the mechanical properties” (ISO, 2014) Materials tests are performed using a number of different variations:  The Tensile test  The Compression test  The Peeling test  The Tearing test  The Creep test  The Relaxation test  The Flexural test All of these functions are looking for the stress (change in displacement measured in meters) versus the strain (change in load in measured in Newton’s) For the purposes of this project the tensile test will refer to the test procedure in general, as all that is required is a correct reading in displacement. There are no vendors who specialise exclusively in tensile testing machines. Of the twenty largest suppliers who inhabit 90% of the market, six are from Europe, seven are from U.S.A and the other eight are Asian. These companies deliver a range of highly calibrated and standardised machines for testing materials in lab and workshop environments. The specialised demand of the market commands a high premium for any machine that is not hand operated and any accessories or extensions to the system. The most common set up is a universal gantry rig, which can perform bending, and compression tests as well as extension tests. Three types of machine are predominant:  Hand powered or mechanical. Using screw, lever or hydraulic hand pumped action to apply the force.  Benefits: Very affordable and relatively easy to operate.  Drawbacks: Limited to less than 1kN of force and usually inaccurate readings.  Electromechanical. Using an electrical motor, gear reduction system and screw displacement to move the crossbar up or down these machines are usually bench or table mounted.  Benefits: An electric motor is clean, accurate and relatively inexpensive to maintain.  Drawbacks: Normally unable to perform tests over 150kN  Hydraulic. Hydraulic pistons move the gantry on the y axis, these machines are heavier and floor mounted.  Benefits: Normally able to perform tests up to 1MN.  Drawback: A hydraulic environment is needed, messy to operate and expensive to maintain. The focus of this project is the Lloyd LR30K Universal Materials Testing Machine located in room 261 at Bolton Street DIT.
  • 9. This is a universal gantry rig using an electromechanically driven screw displacement capable of applying anything between 0.1mN and 30kN of force with an accuracy of <0.5% of movement. However, the statement of a <0.5% accuracy is questionable due to the limitations of the Nexygen and It has an extension resolution of <0.5 microns at a speed ranging from 0.001 to 508 mm per minute with a steady state accuracy of <0/2%. The power source is a domestic 230Cac at 50-60Hz and it has digital and analogue RS232 serial inputs. Even though the output data is set at a default of 12.123 readings per second it samples data (load and displacement) at a rate of 8 kHz and uses the provided NEXYGENv4.0 data analysis software. The machine met the EN ISO 7500:2004 Class 0.5 ASTM E4 standards for a tensile testing machine at the time of sale, At present the standards ISO 527 for plastic samples testing and ISO 6892 or ISO 9513 for metallic sample testing is not being met. It is used an average of four times per week and often overnight. The results are used for educational labs, project support and IP development. 2.4 The Customer The project benefits from having regular access to the D.I.T Materials Lab. This enables a continuous assessment of the needs and wants of the customer. The following is a sample of answers to a preliminary ‘Voice of Customer’ questionnaire: Table 1: VOC Questionnaire Voice Of Customer Questionnaire 1 Is there a problem with tensile testing materials on the Lloyd LR30k? There is a discrepancy between true elongation usually measured with a digital and that registered by the machine. 2 What is currently being used to measure the displacement? Measurements taken from the servo motor which moves the load cell. 3 What sort of resolution would you need to gain the desired results? 20µm 5 What sort of sensitivity would you need to gain the desired results? ± 0.5% of true measurement. 6 What is the primary reason a non-contact solution would be better? A large variety of parts are tested, shapes require specific gripping mechanisms for contact measurement. 7 What interface is best suited to purpose for set up, presenting results and recording data? And what format would you like the acquired data to be presented in? The NEXYGEN software delivers a suitable interface and data presentation. The system set up and data recording from an external extensometer should be easy to use, fit to integrate and easy to manipulate. The best format to grab values with for us is a .txt format 9 Why has a solution not already been implemented? Cost.
  • 10. Answer number 1 is the primary objective of this project and the subsequent answers are to refine the solution. With this data and the continuous input from the customer it is possible to develop an ideal solution. In general, the primary user has lost confidence in the accuracy of the system and also stated that “Since Windows 7 was installed in all DIT PC’s three years ago, including the designated materials testing machine PC, the Nexygen software has become unreliable.” He went on to explain that he contacted Lloyds Instrumentation Technical Support and was informed that the only way to ensure consistency in the software and the output was to upgrade to a specific NexygenPLUS software package and purchase a new machine. This was an expensive option at $1025USD for the new software licence, and over €30,000 for a new machine and installation. 2.5 Detailed Problem Definition In this chapter the first and most prominent point of the VOC questionnaire is addressed:  “There is a discrepancy between true elongation usually measured with a digital and that registered by the machine.” The internal mechanism to measure displacement is examined and the actual error in output from Nexygen is assessed. 2.5.1 The LR30K’s Optical Decoder In order to look closely at the change in length between a physically measured test sample and the one supplied in the test report, it is worth considering the measuring system in the LR30K. 11 Would you like the implemented system to run in tandem with, or instead of the current system? In tandem with the current system and able to cross reference. 12 Are there any other aspects of the tensile test that you think a vision system could enhance? Very useful in fail analysis. May be able to I.D. fault lines. 14 What are the tensile test results used for per semester and how many per subject? Education and project support purposes. Extensively used in all materials labs. Used in IP development. Figure 3: Mounted Optical Encoder Figure 2: Open motor compartment Optical encoder mounted here Belt to drive the encoder mounted
  • 11. The internal optical decoder works on the standard principle of a digital rotary encoder. It is mounted in its own unit and rotated by a belt drive attached to the main shaft of the large servo motor that drives the twin screws that lower or heighten the cross bar. The optical encoder as seen in figure.4 is a replacement disk. The fact that it is accessible to outside intervention should also be considered as a contributing factor towards erroneous readings. If we look at the actual digital output into Nexygen software, the real displacement value has to travel through six different stages from the test piece. This could be affected at any of these stages by anything from electrical noise, to a loose washer. 2.5.2 The Error in Output from Nexygen In order to gain an understanding of the nature of the error in readings, it was necessary to take a sample of broken pieces and measure them with digital callipers after the test. By comparing the Nexygen output and the physical readings of the overall pieces it is possible to see a difference in reading. Using MITUTOYO AOS 0-150mm digital callipers with a resolution of 0.01mm, the final actual length of the test piece was approximated. Table 2: Random sample of tests - all values are in mm Sample Type Pre Test Length (mm) Slippage Elastic Region Plastic Deformation Point of Fracture Total Post Test Length (Nexygen) Total Post Test Length (Actual) Difference in Reading Carbon Fibre Weave 73.42 0 to 0.32 0.32 to 1.79 1.79 to 5.63 5.63 79.05 78.15 0.9 ABS Polymer 180.01 0 to 2.28 2.28 to 8.28 8.28 to 21.41 21.41 201.42 203.11 1.69 POM Polymer 180 0 to 3.51 3.51 to 12.00 12.00 to 34.01 34.01 214.01 212.4 1.61 Annealed Aluminium 37.41 0 to 0.04 0.04 to 0.22 0.22 to 6.34 6.34 43.75 43.92 0.17 Normal Aluminium 37.44 0 to 0.12 0.12 to 0.19 0.19 to 8.453 8.435 45.875 45.211 0.664 Steel @ 4% Carbon 37.39 0 to 0.09 0.09 to 0.35 0.35 to 6.75 6.75 44.14 44.15 0.01 Carbon Fibre Weave 73.42 0 to 0.32 0.32 to 1.79 1.79 to 5.63 5.63 79.05 78.15 0.9 ABS Polymer 180.01 0 to 2.28 2.28 to 8.28 8.28 to 21.41 21.41 201.42 203.11 1.69 In Table.2, the 8 samples taken show the full range of materials. I have calculated the actual error in reading from these samples using basic statistical analysis. Figure 4: LR30K's Optical Encoder Disc Test Piece Holding apparatus Crossbar Twin Drive Screws Servo Motor Drive belt Encoder Disc Nexygen Software Figure 5: Transit of the displacement value from test piece to software
  • 12. N = number of tests X = difference in reading Y = Length of test piece post test ∑ 𝑥 𝑛 = 5.044 8 = x̅ = 0.6305 ∑ 𝑦 𝑛 = 626.491 8 = y̅ = 78.3114 y̅ x̅ = 0.00805 = 0.805 % 𝑒𝑟𝑟𝑜𝑟 This amount of error has been deemed by the primary user as a definite reason to find an alternative extensometer system. To purchase a plug and play, fully compatible contact extensometer from Lloyd’s for D.I.T’s LR30K machine would cost £4000 (GBP) for each type of sample tested. D.I.T needs to test a variety of three different sample types which would mean spending £12,000 (GBP). Even then there is no guarantee of greater accuracy. The only non-contact option available from Lloyds the last time a solution was researched was a laser system costing £20,000 (GBP). 2.6 Tensile Test Procedure The sequence the user operates the LR30K in will be an important factor in this project. The alternative offered should not cause the user any extra complications input errors. The fewer steps needed the better. The LR30K is most commonly used for tensile testing purposes in the sequence detailed in Figure.5 on the following page. The left hand sequence is largely the mechanical end of the setup and the right hand deals with the PC and data logging part. There are 24 separate steps to complete a single test. This is simplified when the user wishes to repeat a test, but only by a few steps. There is consistence evidence that the Nexygen software, and indeed the Lloyds provided LR/LRX console control software is out dated with a Windows 7 interface. The yellow reset button should only need to be pressed when the machine has been switched off with the e-stop, and the HMI will frequently inform the user that there is no PC connected to the machine. This is resolved by initiating the LR/LRX console and the Nexygen software in alternating order before pressing the B input on the HMI.
  • 13. Turn on Power to LR30K Press the large yellow ‘Reset Button’ Open the LR/LRX Console Operator on the designated PC Select ‘B’ from HMI – to operate remotely via the LR/LRX Console Place the appropriate load cell using the threaded shafts and plug it into the RS242 connection Place the test piece in the jaws of the machine and tighten Load the appropriate holding jaws onto threaded shafts Measure the test piece with micro callipers for both length and thickness Control the transit of the cross bar via the LR/LRX console to get as close to a zero load as possible Zero the load and displacement readings on the LR/LRX console After the test, retrieve the text piece and measure length and thickness and compare Press OK Press play icon on home screen Input titles for ‘Batch Name’ and ‘Test Name’ from the pop up window Press OK – Test Runs Open Nexygen Software on Designated PC Select ‘Strain Until Break’ from listed test types in folder Select ‘New Test’ icon from the stating screen Select ‘General Purpose’ folder from test type pop up window When test is completed select graph line icon to view graph Right Click on the graph screen and select ‘Export Data to File’ Name file and file location in pop-up input Select ‘Save’ Input test parameters in the ‘Test Settings’ window – speed of displacement and maximum load usually Figure 6: The tensile test setup procedure for the LR30K
  • 14. 2.7 The Test Results Figure.7 is a Nexygen produced graph with detail overlaid. These are the desired features of a stress and strain graph. The present Nexygen system has a wide variety of functionality, giving Young’s Modulus, ductility The testing of materials in this way is to determine:  Engineering Stress of a material: Calculated by the load applied divided by the cross sectional area where F = force, Ao = Original cross sectional area and the units are in Newton’s per meter squared: o 𝐸𝑛𝑔𝑖𝑛𝑒𝑒𝑟𝑖𝑛𝑔 𝑆𝑡𝑟𝑒𝑠𝑠 𝜎𝑒 = 𝐹 𝐴 𝑜  Engineering Strain of a material : Calculated by the change in length of the sample divided by the original length where L = length, and Lo = Original Length. There are no units as it is a ratio and not a quantity. In this region the sample settles in the clamps jaws This is the ‘Elastic Region’. Where the material is still able to return to its original form This is the ‘Plastic Region’. Where the material can no longer return to its original form Figure 7: Nexygen output stress and strain graph of an ABC Polymer tensile test
  • 15. o 𝐸𝑛𝑔𝑖𝑛𝑒𝑒𝑟𝑖𝑛𝑔 𝑆𝑡𝑟𝑎𝑖𝑛 𝜀 = 𝐿−𝐿 𝑜 𝐿 𝑜 The mechanical strain of the system is the focus of this project. The stress reading report from the Nexygen software has proven to be highly accurate, and the quality of the load cells is not in question. The extensometer to be developed for this project needs to read a change in displacement at an extremely high resolution (20µm as stated in the VOC) to provide an improved accuracy. 2.8 Tensile Test Samples Test samples in the DIT materials lab have varied from human hair to Nitinol SMA, but the two types regularly used are pre manufactured dog bone steel specimens and D.I.T made polymer samples shaped to ISO 3167 standards. There are four dog bone sample which are purchased from TecQuipment Ltd, an engineering supplier from Nottingham in the UK. They all have a 5.05mm diameter and an overall length of 37.25mm ±2% These cost €4 each and are purchased in batches of 20. The ones used most often are:  0.1% Carbon Steel. As drawn. To British Standard Specification 220M07 or 230M07. No identification rings.  0.1% Carbon Steel. Normalised at 900°C. To British Standard Specification 220M07 or 230M07. One identification ring.  0.4% Carbon Steel. As drawn. To British Standard Specification 080M040. Two identification rings.  0.4% Carbon Steel. Normalised at 860°C. To British Standard Specification 080M040. Three identification rings. These are used primarily for educational labs and it is planned to make them in D.I.T’s metal fabrication workshops to specification at a later date instead of buying them from a supplier. The polymer specimens are crafted in the plastics lab at D.I.T. The tests are commonly carried out for project support and IP development and the specimens are machined to standardised dimensions. The material properties vary greatly in these tests. The following is a sample of the standard ISO 3167:2014(E) requirements: ‘4.4.2 Test specimens having a width of 10 mm shall be cut symmetrically from the central parallel- sided portion of the multipurpose test specimen. The surface of the central parallel-sided portion of the test specimen shall remain as moulded: The width of the machined portions of the specimen shall be not less than that of the central parallel- sided portion, but may exceed the width of the latter by not more than 0,2 mm. During the machining operation, care shall be taken to avoid any damage to the moulded surfaces of the central portion. For test specimens longer than 80 mm, the broad ends of the type ‘A’ multipurpose test specimen (or type B for test specimens longer than 60 mm) portion.’ (ISO, 2014)
  • 16. 2.9 Extensometer Types The extensometer of a tensile testing machine is a device that measures the elongation of the material. They are commonly supplied as extra applications by the machine’s vendor. There are generally two main types of extensometer: 2.9.1 Contact Extensometers These are clip on or feeler arm devices attach either to the jaw holding the sample, or the sample itself. The displacement is measured by a strain gauge or a similar sensor to a high resolution and communicated with the machines software.  Benefits:  If mounted and used properly it can give highly accurate readings.  Is relatively acceptable in price.  A simple system to use.  Drawbacks:  Can only measure a maximum of 100mm as a mechanical limitation.  The contact can affect the performance of the test specimen.  It needs more manual intervention, thus is more prone to human error.  Application is limited by the sample shape and size.  Some sample shapes require specific gripping mechanisms leading to more expense. 2.9.2 Non-contact Extensometers These systems do not interfere with the test sample or the rig in any way. There are two main types of non-contact extensometer: 1. Laser: The device reflects two beams off the test piece and reads the reflected light on an internal sensor. The action of the laser beam on the material marks a virtual reference point on the test sample by mapping speckles caused by unevenness on the material’s surface. These two speckle patterns are followed during the test sequence and translated into a displacement of the material.  Benefits:  Ability to measure any type of material of any size used in the machine.  Highly adjustable operating range that can transfer data quickly and within clearly defined parameters  No long term mechanical wear.  No contact vibration to cause errors.
  • 17.  The test sample cannot be disorientated or have its result tainted by physical contact.  The system is calibrated each time the procedure is set up.  Drawbacks:  Set up involves ensuring the beams are symmetrically lined up leaving room for human error.  These systems are very expensive. Lloyds Ltd quoted £20,000 (GPB) for D.I.T’s LR30K machine. 2. Optical: A traditional optical system will operate along the same lines as a laser system except the ‘speckles’ need to be applied as distinguishable marks on the test sample or gripping jaws as the reference points. When the test sample is being elongated, the camera captures a continuous image of the area between the markers edges. This distance is converted to a pixel address and mapped against a pre-calibrated value. The field of interest needs to be shielded from background interference by using backlighting or other stage setting.  Benefits:  A potentially affordable solution provided the vendor specific products are not used.  No limit to the sample size.  Minimal sample interference.  No long term mechanical wear.  Highly adjustable operating range.  Friendly to data transfer.  Simple set up procedure provided the software is comprehensive.   Drawbacks:  Slight possibility that the marking of the sample might affect the performance of the material during the test.  Vision systems can prove difficult to initially install correctly.  Set up involves human application of reference markers, so the system is open to human error. 2.10 PC and Software 2.10.1 The Designated Materials Testing Machine PC
  • 18. There is a dedicated PC that has a moderate to small workload. It is attached via standard RS232 cable adaptor to the Lloyds LR20K. It is a generic desktop Dell OptiPlex 7020 that runs on Windows 7 Professional and all D.I.T owned software licences are accessible. It is on the network as a commonly available D.I.T. terminal and has administrator privileges for the lab technician. For the purposes of the project the PC fulfils the required criteria:  Processor: Intel 4th Gen i3 Dual Core PDC  Graphics Card: Integrated Intel HD Graphics 4400 (i3). Built in to the main processor the portion of the chip acting as the graphics card is capable of 2.07 megapixels per frame. None of the optical vision systems on the market demand more than 1.4 megapixels per frame. However, some tensile test machine optical extensometer vendors for plug and play systems require a stand-alone graphics card for their systems. This is moving towards ‘Frame Grabbing’ systems.  I/O ports: 4 x USB 3.0; 6 x USB 2.0; 1 x RJ.45; 1 Serial; 1 x VGA; 2 x Display Ports; 2 x PS/2; 2 x Line In stereo microphone; 2 x Line Out stereo speakers/headphones. The most relevant in this list would be the USB 2 or 3 ports. However, some vendors of plug and play systems only use Firewire400 (IEEE 1394) for communication that can carry 400MB/s. If this is the case a USB 3 port can still out perform it 480MB/s. 2.10.2 Software Provided By Lloyds Instrumentation for use with the LR30K The Lloyds LR30K uses NEXYGEN 4.5.1 Version 3 materials testing software. This comes with its own video and still picture capturing system software, but this will only interact with the Lloyds optical vision systems. There is a data export utility that writes in real time for connection to LIMS (Laboratory Information Management System, like LabVIEW or MAT Lab) and SPC packages for statistical reports and calculations, but these are limited to the Windows XP platform and do not operate on Windows 7. There is also a facility to bypass Nexygen software altogether and write directly from LloydsLR30K LR/LRX Console via Visual Basic. The software itself is comprehensive and not complicated to use. It comes with:  Complete standards library.  Complete suite of test set-ups.  Video and still picture capture system (though as stated, this utility is only usable with the vendor’s vision system extensometer package)  Security and audit trail utility.  SPC trend and histogram charts (these supply our stress and strain graphs)  User interface customisation facility  Data export facility for connection to LIMS and SPC packages. It is worth noting that LabVIEW also provide a driver to interface directly with NEXYGEN software. As quoted ‘LabVIEW-NEXYGEN Interface Driver permits LabVIEW 6i users to control….LLOYD INSTRUMENTS materials-testing equipment such as…LRXPlus. It incorporates NEXYGEN consoles to control test machines, and stores library of Virtual Instruments. Choice of selectable
  • 19. Virtual Instruments includes ways to connect and control testing machine, test set-up, sample break checking, and results format selecting.’ (ThomasNET , 2002). This might not be compatible with this old a version of Nexygen. 2.11 Chapter summary This chapter has examined materials testing machines in general and in particular, the Lloyds LR30K used in the materials lab at DIT’s Bolton Street location. The question has been posed to the primary users of the machine and the problem explained, defining a 0.805% error in output. The procedure required to carry out tests have been explained and alternative extensometer methods where examined. Chapter 3 Specifications and Design Concepts 3.1 Chapter introduction This chapter investigates the different elements required for a vision system, and explains hew the experiment carried out helped to develop the final design. It details the camera to be used, the software to translate the image into an output and the physical necessities of the project. 3.1.1 Feasibility The research into available solutions and the results from the customer survey have shown that the best way to attain more accurate readings for D.I.T’s Lloyds LR30K tensile testing machine without purchasing the vendor specific plug and play unit is to design and build a PC optical vision system extensometer to determine displacement. 3.1.2 Problems and Considerations To complete the project the following will take careful consideration:  The set-up of camera and target with the use of lenses to gain the ideal amount of resolution at an optimal focal depth  The transition of information from change in image to change in distance  The application of vision systems in general are known to be problematic  Calibrating dimensions that are so small (for steel samples usually) means you cannot use a physical measuring devices like hand held callipers to gain any sort of accurate reading.  There is no allocated budget for this project, which makes cost is a determining factor. 3.2 Considerations for using a Vision System A common definition for a vision system is:
  • 20. ‘….the ability of a computer to "see." A machine-vision system employs one or more video cameras, analogue-to-digital conversion (ADC), and digital signal processing (DSP). The resulting data goes to a computer or robot controller.’ (WhatIs.com, 2014) The interaction between the listed elements of a vision system needed investigation: 1. Target image 2. Camera 3. Lens 4. Light 5. Software 6. Image resolution 7. Image types 8. Frame rates 9. Colours In order to fully understand these relationships further study was required into available vision system software and hardware. 3.2.1 Image Capturing Elements The two most common camera technology types used in industry are CCD (Charge Coupled Device), and CMOS (Complementary Metal-Oxide-Semiconductors). They are both robust, mounted IC’s that react to light on the exposed and doped surface. They differ in that a CMOS acts as a transistor in its reaction while a CCD acts as more of a diode. A basic camera set up consists of the object, lens, camera and lighting. The light illuminates the object (target) and the reflected light is seen by the camera. In a digital camera, the CCD or CMOS chip will read and report the array of light sensitive pixels on the chip’s surface A lens (object) defines the focus of a target. This can also measure to define distance or template recognition (where the higher the focus the greater the resolution of comparison). In the case of this project, the dimensions of the marks on the test sample. 3.2.1.1 Camera Types  Smart Cameras: Combine the processor, I/O and sensor of a vision system in a compact housing that is usually no bigger than a standard industrial camera. All image processing is carried out on-board (internally in the camera module). These systems are ideal when only one inspection/view is required and no local display or user control is required. Smart cameras offer modular extension products like counter interfaces, mobile image display and expanded I/O ports.  Benefits:  Compact all inclusive units that are robust in construction.  By making it a single package, set up and dimensions are minimised.  Drawbacks:  Expensive and usually only with vendor defined software.  PC-Based Vision Systems: Require an interface between the camera and the computer. Modern systems are based on a number of machine vision cameras with interface algorithms. Some interfacing algorithms use consumer ports that are readily accessible like USB,
  • 21. FireWire, HMDI or VGA. Others need camera interface cards (often called ‘Frame Grabbers’). They support most complex image processing capabilities with versatility ranging from single PC to single camera to PC server network to multi camera configurations. The range of cameras and interface software complicate installation, but also add to versatility.  Benefits:  Highly flexible, as most installations on an industrial scale are built to purpose.  It can be a cost effective solution if the application and ability of the designer permits.  Integrating data inside the same PC environment is more reliable and less complex than from a PLC, smart camera or compact vision system.  Drawbacks:  Limited by the PC’s internal specifications.  Can become expensive depending on the software licences required, the resolution needed for the application.  Complex installations.  Compact Vision Systems: These systems have the processor housed in a small compact industrial I/O rather than in the camera itself. This enables multiple connections of cameras to the PLC controller (PLC’s are usually used in this configuration). Long lengths of cable sharing the processors I/O make them good value for multiple camera systems.  Benefits:  Very simple to install.  Robust and standardised.  Potential for multiple camera networks.  Drawbacks:  Expensive.  Difficult to integrate into other systems. The dedicated PC and readily available imaging software make a PC vision system the preferred choice. The only missing elements if we use a PC system are a lens, lighting, hardware to hold all the elements in place and the communications cables. 3.2.1.2 Lenses Sourcing the right lens might be the most costly part of the project. The test samples most commonly in D.I.T are the steel dog bones that are 37.25mm long with less than 20mm of that exposed for the test. The ROI will be less than 15mm. The polymer samples are usually 150mm long with 80mm exposed. Their ROI will be approximately 70mm. That’s a difference of 55mm focal length. For the different samples to be seen with the desired resolution; either the lens needs to be changed or the distance between the sample and the camera must be increased or decreased.
  • 22. These actions effect measurement accuracy, and require calibration each time the lens is changed. According to a Zwick/Reoll datasheet for fixed objective lenses from their videoXtens non- contact extensometer system:  The steel samples would require a ‘Field Of View’ (FOV) of 31mm which would give a resolution of 0.25µm.  The plastic samples need an 84mm FOV. This would give a 0.4µm resolution. In order to read displacement in the full range of sample sizes, lens positioning is a deciding factor. It breaks down to three options. 1. Use two separate lenses. 2. Devise a system to precisely move the camera in scale with the desired FOV. 3. Use a lens that can deal with both samples and still give the desired resolution of 1µm. 3.2.1.3 Software Analysis of the Image Although the choice of software will ultimately determine the type of image analysis it is worth considering the methods available: Edge Finding: An edge (also called transition) is defined by a change in intensity. The edge is found, the coordinates transmitted and the model built. Any deviance from this is flagged for inspection. This method is usually deployed with simple systems where the target has defined lines. Blob Analysis: A ‘Blob’ is any area of connected pixels either pre-defined or read as an error. This process finds and counts objects to make a basic measurement of their characteristics and maps them. Pattern Matching: This is the most prevalent form of machine vision quality assessment used in the electronics industry today; it is the recognition of previously taught patterns and images. This system is only relevant when there is a ‘Golden Model’ reference object and the target needs to be identical. Pattern matching locates objects and verifies their shape in reference to the Golden Model. Pattern matching programmes give the following results:  Number of objects found.  Orientation (rotation)  X and Y reference point (Z when in a 3D system)  Match Score (% of likeness to Golden Model)
  • 23. There are more complex algorithms that employ fuzzy logic and neural fuzzy networks, and 3D imaging systems that will build a model of the test piece, but for the purposes of the project these won’t be considered. The most suited approach for our application would be a program using edge finding. The software chosen also needs to read and interpret the values from the NEXYGENPlus software and respond to an unnatural jump in displacement if the test sample should slip in the jaws, and create an alarm state. The two best vendor options available at D.I.T are Mat LAB and LabVIEW. LabVIEW Vision Assistant is the system of choice due to my own personal experience with the National Instruments software, the expertise available at D.I.T and the interoperability of the platform. 3.2.1.4 Background Environment, Lighting and Visual Distinction The background environment in a system that uses markers (discounting backlighting systems) should enhance the marking. The interpretation of the image by the software depends on the state of the ‘Region of Interest’ (ROI). The entire principle behind an optical system is to measure light. Therefore, light pollution of the ROI will lead to an error in the signal. There are three main considerations that must be taken into account:  The marker colour should be completely distinctive from the sample colour.  The background colour should be as universal as possible to eliminate any distortion to the cameras calibration.  Lighting should eliminate any shadows in the ROI. 3.2.1.5 Fittings The framework to hold the elements in place (camera, lens and background) will be a determining factor in the projects development. The elements to be held in place are:  The Camera: It potentially needs to be mounted directly onto the framework of the LR30K and the fitting needs to be adjustable, easy to manipulate and rigid when set. The mechanical vibration of the machine and the jolt caused by the fracture of the test sample are the main concern.  The Lighting (if required): The preferred option would be to mount the light with the camera, but it might need a different relationship with the target. This means its own fittings.  The Background (if required): This could be just a piece of card held in place with clips or a sheet of fabric.
  • 24. 3.3 Image Capturing Research A series of experiments was carried out to assess the interaction between these elements. It involved setting up a camera, lens and target object and determining the optimal distance between the obje3cts to gain the best target image resolution. As this was only an investigation into the nature of image manipulation, the most easily available equipment was used. 3.3.1 Lenses used in Experimentation 3.3.1.1 Photographic Lenses: Two photographic lenses available from the lab were used: a Cosmicar 8.5mm 1:1.5 and a Cosmicar 16mm 1:1.4. These gave both focal functions and aperture control but were fitted to be mounted on specific camera models. Using clamps it was possible to mount and use them in conjunction with the LifeCam HD3000. These proved ineffectual. The light control offered by the aperture setting brought no quality to the image and the focal depth of 16mm or 8.5mm gave no improvement in image resolution. The only way to use a photographic lens properly would be to have the camera that goes with and that would financially negate the purpose of the project. 3.3.1.2 Microscopic Lenses: Using the LifeCam HD3000, placement scale and clamps, this generic microscopic lens managed to get a better resolution than the available camera lenses. 3.3.1.3 Basic Magnifying Glass: This also gave a clear indication of how lenses could be used to gain the required resolution. 3.3.6.4 Eye loupe Set Lenses: These proved the most adaptable to experimentation and gave a clear indication as to how to maximise focal depth gain image resolution. They only cost €0.75 euro for the set yet proved the most effective. The placement of them offered referable information that could be used to gauge the type and quality of lens to try next. 3.3.2 Cameras used in Experimentation 3.3.4.1 Web Camera: Figure 11: Microsoft LifeCam 3000HD Invalid source specified. Figure 9: 16mm and 8.5mm photographic lenses Figure 10: Eye Loupe Set x5, x7 and x10 Invalid source specified. Figure 8: Microscopic lens and basic magnifying glass
  • 25. Generic Web Cam: Microsoft LifeCam 3000HD This camera was readily available and had all the benefits of most of the webcams currently available on the market. It cost €30 and didn’t need proprietary software.  Video Capture Res: 720p (1280x720)  Photo Res: 4Megapixels (with interpolation)  Connection: USB 2.0  Audio: Mono Microphone  Software: Proprietary Microsoft LifeCam only  Power supply: 5V DC USB 3.3.4.2 Hand Held USB Microscopic Cameras: The initial tests were carried out using the webcam and lenses, but the use of generic USB microscopic cameras proved fit for purpose. They were primarily only considered for the smaller brittle samples and not the larger polymer ones. Both brands when compared are exactly the same except for the difference in still image resolution and advertised maximum zoom. Below is listed some of their relevant specifications:  Brands: AGPtek and PTL Axis  Model:  AGPtek: iT7B  PTL Axis: TE70  2 Mega Pixels  Still image format: JPEG  Maximum Zoom:  iT7B: x200  TE70: x500  Maximum Still Image Capture Resolution:  iT7B: 1600x1200  TE70: 800x600  Light source: 8 LED  Chip: CMOS  PC interface: Mini USB1.1&2.0 8.  Power source: 5V DC from USB port  Grey scale: Level 8 10.  Sleep current :< 1 mA 11.  Work current :< 180 mA  Save temperature: -20°C to +60°C 13.  Work temperature: 10°C to +40°C  Operation system: Windows XP/Vista/ Win7  Colour: White. Figure 12: On the left the iT7B and the Right the TE70 microscopic cameras Figure 13: Simple Magnification explained Invalid source specified.
  • 26. After further investigation, these cameras proved to be simple webcams with inbuilt lenses. They use the lens placement of microscope and basic webcam software drivers. The USB connection makes them highly adaptable. The camera in figure.14 is built exactly the same as both the TE70 and the iT7B, but the QX3 is a much older version. The CMOS chip is housed in the top. The magnification ring section has two functions:  To move the objective barrel back and forth in the shaft, bringing it into or out of focus.  To swap the barrels around. The TE70 has an X50 objective barrel and an x500. When you turn the magnification/focus ring you can feel the barrels swap at about the halfway point. This would be a mechanical wear and tear consideration if it was required to swap the magnification between the two settings frequently. 3.3.3 Set Up of the Experiment Figure.14 details how the elements where arranged. The software used to view the image is ‘Microsoft LifeCam’, and the displacement is estimated from looking down on set up and estimating the distance from the printed scale. Figure 14: A version of the USB hand held microscope (FSU Education, 2003)
  • 27. 3.3.4 Experiment Results A matrix was drawn to display the arrangement for findings. The field of view was ascertained by reading the scales on the target image 6” steel ruler. The ambient light of the materials lab was used and no added light source was introduced. This would determine the lighting requirements necessary. The quality is indexed from: Very Poor, Poor, Medium, and Good to Very Good. Table 3: Results Matrix from Image Capture Experimentation Camera Type Distance To Lens (mm) Lens Type Distance to Target (mm) Field of View (mm) Light Quality Image Quality Webcam 0 Photographic 64 40 Good Very Poor Webcam 0 Microscopic 3 Medium Very Poor Webcam 20 Basic Magnifying Lens 95 Very Good Medium Webcam 45 Eye Loupe 65 Very Good Good Microscopic USB Camera 0 Inbuilt Lens 0 Inbuilt Light source: Very Good Very Good PC program to view the target image is a generic webcam package Placement Scale, marked in cm/mm. Looking from the top of the element it is possible to estimate the distances between them Target: in this instance a 6” steel ruler with 0.5mm incremental markings Clamps to secure the elements – camera, lens and target in place Camera: in this instance the HD3000 LifeCam Lens: in this instance the x7 Eye Loupe Figure 15: Test Setup
  • 28. 3.3.5 Conclusions Drawn The information gathered from these experiments determined that the Microscopic USB Camera was the best option as it included the lens, camera and focal control, required only one positional fitting and had its own light source. The only drawback is its limited field of view. This would also eliminate any concerns over background interference. 3.3.5.1 Using the Web Camera As the results indicate, getting a high quality image from a web camera in conjunction with mounted lenses would be very difficult. The quality of light available with all the web camera trials show that lighting was not a consideration, but gaining focus was nearly impossible. Most digital camera systems that could gain the sort of resolution a 20µm field of view required would be modular and proprietary. Even though the electronic capturing device of expensive vision cameras might be of the same quality as the LifeCam’s CMOS chip, the housing for special lenses and the special lenses themselves would make this option very expensive, very quickly. It would need two fittings, one for the camera and one for the lens which would require continual resetting in order to view the full range of test samples. This is not an attractive solution. 3.3.5.2 Using the USB Microscopic Camera This camera held perpendicularly to the surface of the target gave a clear and very readable image. The inbuilt light source is more than sufficient and adjustable, and the price makes it a viable option. The only limitations would be the size of the ‘Region of Interest’ of approximately 1mm when set to its highest magnification. But even so, this offers a very attractive solution. The camera could be applied to the target in one position at a perpendicular angle and as the lens, focus control and camera is all one unit, no resetting would be required. 3.4 Specifications As the camera system had been decided; the type of vision software used and the placement of the camera needed to be determined. 3.4.1 Selecting the Appropriate Software Package The most freely available vision system software platforms available at DIT that offer the variety of functions required by this project is Matlab and National Instruments. The project requires a precise way to track movement:  Matlab Computer Vision System Toolbox offers object detection, feature tracking, matching calibration and motion detection. There is a verity of suitable algorithms that would be fit for purpose but these are too ‘Plug and Play’, and limit the applications of the system.  National Instruments IMAQ Vision delivers a very comprehensive suite of tools and image manipulation. The current licenses at DIT make available all of the required functions Figure 16: Solid model of the PTL Axis: TE70 microscopic USB camera
  • 29. packages like IMAQdx, NI Vision Assistant and NI Machine Vision. These packages incredibly flexible and can be applied to any type of vision system available on the market. NI IMAQ gives greater adaptability in a more logical form, so this platform is best suited to the project. Its flexibility also opened up scope to develop an interface for a ‘Mobile Microscope Function’. As camera is so affordable, the software could be installed on any of the materials lab’s PC’s and another USB microscopic camera could be plugged in and used. 3.4.2 Choosing the Position of the Camera This decision was vital to the entire direction of the project, and the only viable solution due to the selection of camera. Initially the project was directed at observing the change in position of a mark on the test subject held in the jaws of the Lloyds LR30K. If the camera to be used is a USB Microscopic camera then in order to keep the image onscreen, the camera would have to move with it. This is not an option, so directing the camera at a static background and measuring the movement of the camera on the Y axis became the only viable solution. By mounting the camera on the crossbar of the LR30K and reading an upward or downward displacement, the user could determine with fewer degrees of separation between the test piece and the software output (see Firgure.18) a displacement in micrometres. If the degrees of separation between the test piece and software are diminished, and the extra element of no mechanical contact is introduced to the system, then it should be possible to reduce an error in reading. 3.4.3 Choosing the Software Feature to Measure Displacement As mentioned, there is a vast range of employable features in the NI IMAQ suite. Selecting the appropriate function to track real world images can be completed within any of the suites. The Figure 17: Solid model of the camera clamp in position on the gantry on the far side, away from the user Test Piece Holding apparatus Crossbar Camera Clamp MTVS Software Figure 18: Transit of displacement value from test piece to MTVS software
  • 30. deciding factor proved to be the difficulty of reading target media (the image that the camera would be pointed at) with a high of image, a sharp definition of lines and no possibility of aliasing. After much discussion and reading NI resources, the IMAQ Optical Flow LKP VI was selected as the core process to build the program around. By attaching a single pixel to the image, the motion of that image could be translated into a value of pixels on the Y axis, and then converted into a real world value. This is explained at greater length in the programming section of the report. 3.4.4 Design inspiration There are three individuals who had a strong influence in the direction of the project:  Neil Brannigan: Lab Technician DIT Bolton Street: Primary user of the LR30K and principle advisor on all mechanical matters. Was instrumental in defining the position of the camera.  Alan Cheaneux: IT Networking Manager for DIT Bolton Street: Advised on the available image system at DIT and instigated the investigation into the use of the hand held microscopic cameras.  Ronan Hogan: Lab Technician DIT Bolton Street: A LabVIEW expert who gave instigated the investigation into the use of the Optical Flow VI features. 3.5 Design concepts This system will require a great deal of programming structure and definition. The concepts to achieve the final product are:  A camera will capture at a user defined frame rate and resolution, clear images of markings on the test sample in its designated ROI.  To have a function that enables the user to calibrate the system  To have a function to allow the user to select another camera (TE70) with the software to use as a mobile, hand held microscope.  The image will be manipulated into usable data and presented in a clear and transferable format to the PC.  A change in displacement with a user defined setting will be read and translated into real world readings (mm).  The real world readings will be written the UI numerically and in graph format to imitate the graph in the Nexygen software.  The accrued data will be written to a data logging file. 3.5.1 Design Aims  To design and build an optical vision extensometer system that will greatly improve the accuracy of the current test results.  To do so at a greatly reduced cost in comparison with the current market suppliers for extensometers.  To enhance the user’s ability to control the test environment.  To avoid interference with the current test procedure.
  • 31.  To make the set up process as straight forward as possible.  To improve the quality of material’s research at D.I.T. 3.6 Final design choice The imaging device used will be a TE70 Microscopic USB camera, which will be clamped to the cross bar of the Lloyds LR30k Materials Testing Machine gantry and translate a change in displacement of the target image. This will be converted into a numerical value and written to file and drawn to graph as a stress and strain graph. There will also be a mobile microscope interface function that can be used as a microscopic measuring device. The software used will be NI IMAQ Vision and the principle of the program will be the use of the IMAQ Optical Flow LKP VI, which will track the movement of a single pixel on the Y axis. 3.7 Chapter summary This chapter determined the nature of vision systems in general and, and explained the results of the experiment carried out to find the optimal vision system for this project. It the detailed the designs targets and stated the final design choice. Chapter 4 The Physical Design and Build 4.1 Chapter Introduction This chapter details the design and build of the bracket to hold the camera in place. It lists the types of material used, the problems encountered and the problems overcome. 4.2 The Physical Build Once the type of camera to be used and the location of the camera were decided, a way to effectively hold the camera in place was needed. The physical placement of the camera required a clamp to hold it in place. This clamp had to absorb the maximum amount of vibration the LR30K would commonly produce. As the field of vision would only cover 1mm², and the distance from the subject matter would be 3mm maximum, a slight jolt could knock the image off target and out of focus very easily. The moment of fracture of a typical dog bone steel sample is the most commonly occurring event where vibration would be a real concern. 4.2.1 Testing for Vibration A simple test was carried out where the TE70 camera was attached to the top of the crossbar with blue tack, and a small steel ruler fixed to a perpendicular angle also with blue tack acted as the target image. The cross bar was then raised and lowered and the image retained its position and in focus. Then a normal steel sample was fitted for testing, and a full tensile pull to break test was completed, and again the image retained its focus and the image its position. It was assumed that the sturdy nature of the LR30K meant it absorbed the majority of shock vibration in the heavy base.
  • 32. It was determined that a clamp could be designed using available materials in a way that suited the user and took advantage of the steady motion of the cross bar. The user must be able to:  Easily reach the focus ring  Able to extract the camera  Not be impeded by its position The design in Figure.17 fulfilled most of the requirements. The focus ring is in easy reach and the 3” pipe clamp is simple to tighten and loosen by hand. The camera is mounted at the back of the rig with the USB cable out of the way. 4.2.2 Front Panel Access However, mounting the clamp on the cross bar would mean covering the access panel to the load cell port. This front panel is not as stable as the crossbar itself and would need to be removed on occasion. This problem was overcome by cutting two shaped slots in the front panel to allow the clamp uprights to protrude to the extent that they could be adjusted. This can be observed in Figure.18 4.2.3 Further Alterations Some other alterations needed to be made:  The butyl rubber (taken from simple rubber matting) that was used for extra vibration dampening in the initial clamp upright strips had ribbed surface contact. This allowed for flexibility when the clamp was mounted. It was also due to and the ribbed butyl grips in the pipe clamp. This was resolved by using butyl with more surface area adhered to the clamp uprights (standard din rail sections) with Pritt glue dots. The ribs on the pipe clamp grips where simple enough to carve flat with a blade. Figure 19: Assembly of the camera clamp Figure 18: Mounting the camera clamp onto the LR30K gantry.
  • 33.  The nearside exposed top of the clamp was a hindrance to the primary user as every time he tightened the holding shaft at the top of the crossbar, there was a concern that if he slip and cut his hand on the exposed din rail corner. By cutting the rail to the bare minimum and folding an extra strip of butyl rubber over the end to be held in place on both sides by the bolts, the is now no chance of him hurting his hand in this way. Finding the target media for the camera proved to be an interesting task, and indeed one of the determining factors in using an optical flow function in the programming. There is a range of problems:  Aliasing occurs relatively easily when tracking movement at a microscopic level, so the image must be alternating enough to counter this  Within a 1mm² field of view, a straight line becomes less so unless specifically printed with heightened resolution  If the focus is slightly off, the contrast between two colours or edges is lessened After researching microscopy methods and target media used to check for camera resolution, it was found that in 1951 the United States Air Force developed a targeting test for bomber camera systems. The target pattern of straight lines over concentric circles is was similar to the ones used for target media strips in Figure.21. In order to gain better resolution 250 GSM card (A3 size) was printed on at a standard 800x800 PPI. It was printed in black and white for contrast and programming simplicity. Then the strips where cut to length and glued on 5mm foam board. This extra rigidity was to account of for the image needing to be perpendicular and even to get a clean readable frame. They were then mounted on the LR30K in the position shown in Figure.17 with the same Pritt Sticky glue dots used for the butyl vibration dampening strips. 4.3 Chapter summary This chapter explained the requirements for the build and the points that needed to be considered. It detailed the test carried out to determine the systems susceptibility to vibration, the further problems encountered and solved and the target image used and why. Figure 21: Target image strips Figure 20: Solution to exposed din rail
  • 34. Chapter 5 Developing the Software 5.1 Chapter Introduction This chapter details the majority of the software developed to Materials Testing Vision System - MTVS The product developed in this project is called the MTVS (Materials Testing Vision System). It will also be used in other areas of the lab as a hand held digital microscope using a calibrated measuring system. The following briefly explains some of the terms used:  VI: Virtual Instrument. A term to describe the entire program, or a specifically made application within the LabVIEW environment  SUB VI: Sub Virtual Instrument. A user designed sub program to facilitate an objective of the main program  Particle: Refers to the ‘Selected Pixel’  UI: Refers to ‘User Interface’ or the HMI  ROI: Means ‘Region of Interest’. The pre-designated region of an image that the program reads to determine its function  FPR: Frames per second. The frequency of mages being processed by the program per second  IMAQ: Image Acquisition: The range tools and development suite for National Instruments LabVIEW Vision  Array: Table. A 1D array is a table with 1 column and as many rows required. A 2D array has as many rows and columns as required  Cluster: A grouping of items that can hold anything from Boolean switches to String inputs to 2D arrays  While Loop: Within this region all of the activities will occur until the ‘Stop’ control is activated  Event Loop: Within this region all activities will occur whilst the Boolean instruction also within the loop is operating  Case Structure: All the activities that are on the designated frame will be operational once the frame control activates. There can be several frames, thus several alternate activities  Shift Registers: Connecting points that loop an output value to the end of a while loop structure which could be an image, array, Boolean, numerical value etc…to make it an input into the same while loop. The Path of the Image In order to clearly display the route of the image, specific points have been numbered in Figures #### to ####. This takes up the majority of the program. It PART 1:
  • 35. This is the region that initiates the session by reading and processing the image from the camera. 1. The ‘Select Camera’ session in control connects the camera to the PC. It names the camera you wish to open, where the default is ‘Cam0’. Plugging in another camera and selecting Cam1 will give you the mobile version of the system, the ‘Mobile Microscope’ function. The purple cluster wire is routed through the majority of the program and carries the image (or collected captured pixel data) in real time (called the ‘Session In’/’Session Out’) when the program is running. The camera selected will normally provide 20 to 30 frames per second. For the purposes of this explanation it can be assumed at 20 fps. 2. This is an ‘IMAQdx Open Camera VI’. It checks the cameras capabilities, and loads a configuration file. This creates a unique reference for the image. 3. ‘IMAQdx Configure Grab VI’ starts the frame grabbing part of the sequence. It continually loops the image by buffering between several regions of memory. This is the initial buffering process that enables a constant stream of frames to arrive from a source without them building up and overloading memory with an entire 20 frames of image data per second. 4. The ‘IMAQ Create VI’ builds a temporary location for the image in a memory location. These are the VI’s that act as buffers between the shift registers that loop the image through the entire program. There is one for the ‘Current Image’, the clean one that has to be sent through the rest of the program where it is written on a recorded from, and one for the ‘Previous Image’ that is the previous frame of the image and referenced to for the LKP VI and cycled for the illusion of motion. These images are cycled so at 20 frames per second there are three images that are replaced every 0.05 seconds. The first one is the source image from the ‘Select Camera’, then there is the ‘Current Image’ that has been grabbed by the IMAQdx Grab2 VI’ and then there is the ‘Previous Image’ that is being used as reference for the ‘LKP VI’. 5. This cluster holds a 1D array of the previous X, Y image coordinates of the target particle. 6. All of the image information enters the ‘While Loop’ 7. It then enters a case structure which is controlled on the UI when the operator presses the ‘Select Pixel’ Boolean control. The ‘True’ state initiates another sequence of VI’s which determine the location of the particle. The ‘False’ state is the one represented in Figure.26. The architecture of the program made it necessary to require the user to select a particle on the screen before the particle could be addressed, as no screen contact would stop the link Figure 22: The path of the image Part 1 1 2 3 4 5 6 7 8 9 10 11
  • 36. between the ‘Feature Target Conditioning SUB VI’ and the ‘Current Image’. This is worth further consideration. 8. The ‘Select Camera Image’ and the ‘Current Image’ enter the ‘IMAQdx Grab2 VI’, where both images are assessed to be a suitable image type. If the format of the image doesn’t match the camera then this VI alters it to an IMAQ suitable format. 9. The ‘IMAQ ExtractSingleColorPlane VI’ takes the ‘Current Image’ and filters out different colours in the RGB (red, green and blue) spectrum. This will turn a 64- bit RGB image into an 8-bit Greyscale image and should lighten the amount of information running though out the program. This is however a part of the program that could be altered in the future to: a. Give a higher definition to the image and therefore more precision to the output b. Give a selection of colours to read from potentially with full UI control It would be a simple matter of inserting one of the many IMAQ image manipulation tools and tuning it to suit the purpose. 10. At this point the ‘Current Image’ enters the ‘LKP Optical Flow VI’. This is a fully defined feature which is explained in chapter………….. The ‘Previous Image’ is also fed into the VI where it is used to approximate the current images particle position. 11. The ‘Current Image’ then enters the ‘Feature Target Conditioning SUB VI’ that allows the user to place the particle on the image and writes the particle to the anchor point so when the test is initiated it begins at zero. This is explained in greater detail in chapter………….. PART 2: This region completes the function required by the image. 1. The ‘Current Image’ arrives at the case structure operated by the camera mode control on the UI (either: Mobile Microscope, Tensile Test or Compression Test). In Figure.24 ‘Tensile Test’ is selected. 2. The ‘Current Image’ enters the ‘IMAQ Overlay Text VI’ which writes a continual graphical string overlay on the image to the designated origin coordinates. 3. The ‘Tensile Calibrated Conversion SUB VI’ has nothing to do with the image directly but does take the difference in pixels of the change in image and turn it into a real world value of mm. When the ‘Compression Test’ camera mode is selected by the user the text is altered slightly and so is the position of the next item. 4. In its appropriate setting the image then has a rectangle overlaid onto it. This is done with the ‘IMAQ Overly Rectangle VI’. The tensile test setting and the compression test setting have two different sets of 4 coordinates. Nearer the top for the downwards motion of the camera for the compression tests and nearer the bottom for the tension testing. 5. This is the actual output of the image as seen on the UI in real time. It is also called an ‘End Session’ 6. The ‘IMAQ Image to Image VI’ writes the small portion of the ROI that is written by the ‘Feature Target Conditioning SUB VI’ to the ‘Current Image’ to the entire image from the ‘Previous Image’ thread. This is the new displacement read by the LKP VI, and ultimately, the change in displacement on the Y axis, which is the primary reason for this program.
  • 37. PART 3: This region deals with image housekeeping. 1. All three image threads leave the camera mode case structure and the while loop. 2. The ‘IMAQdx Close Camera VI’ stops the infeed from the camera for that iteration of the program. And closes the camera until the next frame, which at 20fps will be within 0.05 seconds. 3. The two ‘IMAQ Dispose VI’s’ serve to destroy the acquired images as soon as they have been processed. As with the Close Camera VI, this is the end point for the images before the cycle starts again. Table 4: Start and end points of all image streams 4. The ‘Simple Error Handler VI’ at the end of the program runs through most of the VI’s within the architecture and reports where an error has occurred (usually with a reference number that can be found on the NI website). This is an especially vital function for a vision system as the signals to be manipulated are notoriously difficult to error trap. There is also potential to add a control element to the image if required. For instance, if a threshold value of ‘White’ in an image is met, an error can be generated and used to write a times stamp to a file. This is also worth further consideration/ Select Camera Image IMAQdx Close Camera VI Current Image Right hand side IMAQ Dispose VI Previous Image Left hand side IMAQ Dispose VI Figure 23: Path of the image Part 2 1 2 4 5 6 3 Figure 24: Path of the image Part 3 2 3 4 1
  • 38. Choosing the appropriate IMAQ function to follow the image: The Lucas Kanade Pyramid The heart of this vision system is an IMAQ Optical Flow function. There are three main types of optical flow algorithms:  Phase correlation and discrete optimization  Block-based sampling  Differential calculation The key problems with optical flow mapping are overcoming aliasing or matching patterns, or when the image moves to quickly to calculate. The differential method is best suited to following motion between a fixed geographical point on screen determined by the user and a point on the image (a pixel on the mounted scale on the Lloyds 30K upright). For the MTVS, only the Y axis is required. In LabVIEW there are three available types:  IMAQ Optical Flow (HS) – Calculates the optical movement (velocity flow) in the image using the Horn and Schunk algorithm. This method constrains the image data to give a smoothness of movement. It can yield a high volume of error information and handle complex images and motion but it is more sensitive to noise than the alternative methods. It is also not ideally suited to following bold contrasting objects that move at a steady rate which is exactly what is presented to the camera in the MTVS’s region of interest.  IMAQ Optical Flow (LK) – Calculates the optical movement (velocity flow) in the image using the Lucas and Kanede algorithm. This method is a widely used differential calculation to estimate that the movement is equal in the pixels close to the pixel selected to track, and it assumes that the movement between frames is consistent and steady. “It works by attempting to guess in which direction an object has moved so that local changes in intensity can be explained.” (Rojas, 2011) It does this using ‘The least squares criterion’, a standard approximation of systems that have more equations than unknowns, and calculates these equations. The initial calculation determines the vector at the specific time in the neighbouring pixels: 𝐼 𝑥(𝑞1)𝑉𝑥 + 𝐼 𝑦(𝑞1)𝑉𝑦 = −𝐼𝑡(𝑞1) 𝐼 𝑥(𝑞2)𝑉𝑥 + 𝐼 𝑦(𝑞2)𝑉𝑦 = −𝐼𝑡(𝑞2) 𝐼 𝑥(𝑞3)𝑉𝑥 + 𝐼 𝑦(𝑞3)𝑉𝑦 = −𝐼𝑡(𝑞3) … … … Where 𝑞 is the neighbouring pixel (numbered) inside the region of interest and 𝐼 𝑥, 𝐼 𝑦 and 𝐼𝑡 represent the partial derivatives of the image 𝐼 with respect to vectors x and y. Time is represented by t. This means that each pixel in the region requires an equation, creating more equations than unknowns. It is first converted into matrix form Av = b where: 𝐴 = [ 𝐼 𝑥(𝑞1) 𝐼 𝑦(𝑞1) 𝐼 𝑥(𝑞2) 𝐼 𝑦(𝑞2) 𝐼 𝑥(𝑞3) 𝐼 𝑦(𝑞3) ] , 𝑣 = [ 𝑉𝑥 𝑉𝑦 ] , 𝑎𝑛𝑑 𝑏 = [ −𝐼𝑡(𝑞1) −𝐼𝑡(𝑞2) −𝐼𝑡(𝑞3) ] Where 𝐴 𝑇 is the transpose of matrix 𝐴, the values for the change in pixel intensity and direction are calculated by 𝑣 = (𝐴 𝑇 𝐴)−1 𝐴 𝑇 𝑏
  • 39. This gives the same importance to all the pixels in the region, so a further equation weights the ones closer to the selected pixel with more importance. The MTVS has an extreme difference between pixel intensity in the image which suits the LK system, but the LK method is limited to a vector velocity of only one pixel per fame. The maximum frame rate of the camera is 30 frames per second with a resolution of 380 pixels per millimetre. The system would begin to alias if it moved over 12.66mm per second: ( 1 𝑥 𝑓𝑟𝑎𝑚𝑒 30 𝑥 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 ) × 380𝑝𝑖𝑥𝑒𝑙𝑠 = 12.6666 𝑚𝑖𝑙𝑙𝑖𝑚𝑒𝑡𝑟𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑  IMAQ Optical Flow (LKP) – An extension of the Optical Flow (LK) which uses ‘Image Pyramids’ to combat the limited vector velocity. First, each original frame is sub-sampled to different degrees to create several pyramid levels. ‘The Lucas-Kanade method is used at the top level (lowest resolution) yielding a coarse estimate, but supporting greater motion. Lucas- Kanade is then used again at lower levels (higher resolution) to refine the optical flow estimate.’ (Bier, 2011) The LPK version has a control for how many levels of you wish to implement. This control enables the developer to fine tune the image response. The more pyramid levels the higher the accuracy, but the greater the demand on the program. As the Y axis is the only required output to the rest of the program, this VI is best suited. Feature Target Conditioning SUB VI This extensively developed SUB VI determines the operation of the pixel in regards to its location. Figure 25: Lucas Kanade Pyramid Function
  • 40. The ‘Target Particle Options’ type definition control determines a set of features for the target particle. This set of features is unbundled and fed into the True/False case structure to determine its state, the state of the inner case structure. The majority of the functions inside the SUB VI are not relevant to the project and where only used to develop an understanding of the manipulation of the particle with the LPK VI. It is possible using this structure to develop a more complex Feature Target then the present single particle, but it isn’t required for this project. This SUB VI operates by simply writing a pixel using the ‘IMAQ Overlay Single Point VI’ onto the image from the ‘Current Image’ thread and giving it a default colour of red. The placement of the particle is decided at another stage of the image. Tensile/Compression Calibrated Conversion SUB VI This SUB VI carries the x, y coordinates as double 64 bit real values and acts as a simple mathematical operation to do two things: 1. Address the Y coordinate of the particle in its present position to Zero at the start of the test. 2. Convert the subsequent movement of the particle from a distance of pixels into a distance of millimetres. Figure.25 depicts the ‘Tensile Calibrated Conversion SUB VI’, the version for compression testing is exactly the same structure but is +450 with no -1*. The feature point’s bundle from the LKP is indexed out to the coordinate value which in this tensile testing mode will be x = 300 and Y = 450. The Y element, which is the only real point of interest for Figure 27: Tensile Calibrated Conversion Sub VI Figure 26: Feature Target Conditioning Sub VI This is the function that locates the particle on the image
  • 41. this test is extracted from the bundle and made zero. This value is converted to a positive as it is travelling up the screen and the Y coordinate is written as a minus. The difference in displacement of the particle in pixels is multiplied by the factor of calibration which has been worked out in another part of the program CHAPTER……. as a value of millimetres per pixel. This now real time value is sent on as a 1D array to the timing structure to synchronously write to a file that will be compared to the Nexygen output text file. Reading MTVS and Nexygen values and writing to a new array, graph and text file There are three 2D arrays that need to be built for the system to work.  Output from MTVS: o The ‘Elapsed Time VI’ is initiated in synchronicity with the Nexygen ‘Start Test’ button. This is written to the first column of the array as seconds. o The calculated displacement taken from the core vision program in either the ‘Tensile’ or the ‘Compression’ setting as positive scaled millimetres is written to the third.  Input from Nexygen: o The ‘Test Time’ initiated when the ‘Start Test’ button is pressed is written to the first column. o The ‘Load’ taken from the load cell output in Newton’s is written to column two. o The ‘Extension’ taken from the internal extensometer in millimetres is written to the third. o The optional ‘Deflection’ values if selected by the user written to the fourth.  Combined MTVS and Nexygen to Use for the graph: o The synchronised and combined ‘Elapsed Time/Test Time’ values are written to the first column. Not used in the graph. o The ‘Load’ taken from the Nexygen read .txt file is written to MTVS’s second column in Newton’s. Used on the ‘Y-axis’ of the graph. o The calculated displacement of the MTVS system in millimetres. Used on the ‘X- axis’ of the graph. o The internal extensometers extension taken from the Nexygen in millimetres. Also used on the ‘X-axis’ of the graph. o The optional ‘Deflection’ reading taken from the Nexygen selection in millimetres. If it hasn’t been selected in Nexygen then it will appear greyed out and blank. This array will not appear in the graph as requested by the user as it is rarely used. As the camera is set to its maximum framerate of 30 fps, sample rate would be limited to 30 readings per second. As the default setting for Nexygen sampling is approximately 12 RPS this is a static rate that wouldn’t need to be regularly changed. Write to Value and Array Sub (VI): This relatively basic Sub VI takes the double 64-bit real input from a 1D array and writes it in ascending sequence in a timed structure. Every time a number Figure 28: Write to Value and Array Sub (VI)
  • 42. is written to the input array, it sends the value to an index array function and an insert into an array function. The first extracts index ‘0’ (basically the first number) and writes the element to a simple numerical indicator which will change every time the input changes. The second function reads the input array, inserts the updated element to build a new 1D output array. This function needs to have a controlled new element input which is done in the MTVS with an event structure triggered by a Boolean ‘Start’ button as depicted in Figure 3. When the structure is executed, the input 1D array will be written each time the ‘Timeout’ case is executed which in the MTVS is also the control for the ‘Readings per Second’ (RPS control), defined by the used on the HMI. The ‘Timeout’ event is executed each time the millisecond input to the time in terminal is reached. The 1 second value and the RPS value are entered as double 64-bit real but are converted to long 32- bit integers, as this is the preferred data type for timing sequences in LabVIEW. This calculation means: 1 𝑠𝑒𝑐𝑜𝑛𝑑 𝑠𝑒𝑙𝑒𝑐𝑡𝑒𝑑 𝑟𝑒𝑎𝑑𝑖𝑛𝑔𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑 = 1 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑤𝑟𝑖𝑡𝑡𝑒𝑛 𝑡𝑜 𝑛𝑒𝑥𝑡 1𝐷 𝑎𝑟𝑟𝑎𝑦 𝑟𝑜𝑤 This method is used for the Y axis displacement, synchronising the Nexygen timing sequence and synchronising the applied load readings. The Timing Structure: During a tensile or compression test the load applied (in Newton’s) needs to be recorded in direct reference to the displacement caused by this load. This is the core use for the Lloyds LR30K in place at DIT, and the Nexygen software writes these values to a stress strain graph to give the traditional curve of a material breaking under a load. In order for the MTVS to deliver a more accurate or at least comparable rate of displacement versus load, it needs to read and write the displacement and load synchronously. The load can be written after the test is completed, to the graph from the automatically produced Nexygen text file selected by the user, but the best way to match load and displacement proved to be time. Therefore the MTVS needed a timing sequence. This timing sequence is also used to set the frequency of readings, or ‘Readings per Second’, as outlined in ‘Write to Value and Array Sub (VI) chapter. The ‘Elapsed Time’ clock is initiated by a Boolean input that is triggered by the ‘Start Test’ event executed in the Nexygen software. The reading per second value is input during the initial installation to match the sampling frequency of the Nexygen output. This is a static rate of about 12 per second that is not open to change by the operator unless they go into the advanced settings in the Nexygen software. The MTVS output time can be fine-tuned during calibration to match the Nexygen sampling frequency but should only be a one off input during the initial set up of the MTVS system. It will not be a control feature on the UI, but will be practical to alter by the designer. Figure 29: 'Readings per Second' using a 'Write to Value and Array' Sub (VI)
  • 43. Document Management and Graph Building: The default output for all Nexygen batch files is in a tab delineated text file. The adaptability of a simple text file has made it the preferred report format for students, technicians and educators using the Lloyds LR30K at DIT. This determined that the default output for the combined MTVS and Nexygen report should remain as a text file. The graph output is instantly transferrable to an Excel spreadsheet or a simple jpeg image of the final graph shape with labelled and scaled X and Y axis. The flow of information from Nexygen requires a certain amount of control as it is initially determined by the user. Before the test can actually begin the operator has to select which values are to be recorded. The ‘Extension’ (mm) which can be either tension or compression, and the ‘Load’ (N) values are automatically written to file, as without either of these the test is meaningless. There are further options to insert deflection and time columns. The primary operator in the lab stated that the ‘Deflection’ option is barely used or written to graph, so it was determined to only have a text file column for these values if selected by the user and not automatically write them into the graph. The time function is required by the MTVS system to indicate the initiation of the test sequence and to anchor a Nexygen static load curve to the recorded MTVS displacement so the comparable MTVS Load/Displacement file can be written and graph can be displayed. The time arrays do not need to be represented in the final MTVS text file report as usable data that will combine the MTVS rate of displacement and the Nexygen user selected output but in order to read the output correctly the MTVS time frame will automatically be presented in the first column. In order to sort and write the correct column from the input text file from Nexygen and the input time and displacement readings from MTVS into a usable format for the graph and the final MTVS text file, a series of sub VI’s needed to be constructed. This structure is outside of the main while loop. Sort to File and Array Sub (VI): The sorting function required logical control and elimination of paths. The ‘Read from Document’ file path is connected directly to the browser selection tool with the same name on the ‘Document and Graph’ tab on the UI. As is the ‘Write to document’ file path. These inputs control the ‘Read Write to Array SUB VI’ which is detailed in the following chapter. The bottom half of the SUB VI routs the 1D double 64-bit real arrays as column 1 to 4. The top half of the VI decides via 1D string arrays, which column goes where and how it is titled. Figure 30: Document control and graph writing architecture
  • 44. The ‘Read from Spreadsheet file VI’ unpacks the user selected Nexygen text file as a string value, and reports the first row (the headings of the columns) to the next stage and writes it directly to the UI in string. 0, 1, 2 and 3 are the four Nexygen output columns and the index array functions in turn read these columns and send them to the next stage of selection. The indexed array reading index 3 (actually column 4 in the table) is a dead end as this is where Nexygen will output of deflection which will be automatically titled if it is chosen beforehand by the user, and always in column 4 of the table. The output from the indexed array 1D string enters an ‘Equal?’ function that will compare it with string constant inputs and determine if it can create a Boolean 1 or 0. The Boolean value will be converted into a 16 bit integer 1 or 0 and applied to a simple equation to determine if it will operate another Boolean value to trigger a case structure. The premise of this system is that time can only appear in column 1 or not at all, load can only appear in column 1 or 2, extension can only appear in column 2 or 3 and deflection can only appear in column 3 or 4. Read and Write File and Array SUB VI: This VI interprets the selected Nexygen text documents and separates them into a source to read as double 64 bit real 2D array. One of the sources outputs is sent to be indexed as 1D array’s from 0 to 4. These 1D arrays are then fed out of the sub into the state machines that have been pre- selected to display or not and in which order to do so by the string column Figure 31: Sort to File and Array Figure 32: Read Write File and Array SUB VI
  • 45. titles. Graph Selector SUB VI: This sub selects the pre-chosen displacement and load 1D array’s from MTVS and Nexygen and writes them to the stress strain graph mounted in the tab ‘Document and Graph’ on the UI. The user can select which readings to present; 1. Nexygen load and displacement 2. Nexygen load and MTVS displacement 3. Nexygen load, Nexygen displacement and MTVS displacement In fig.7 the file path ‘Readings from MTVS’ will actually be a 2D array of double 64 bit real values for Nexygen load and MTVS displacement. Nexygen load will be matched with MTVS displacement in the ‘MTVS grab Load SUB VI’ which will be discussed in later. The double 64 bit 1D real input’s for ‘Place Nexygen Displacement Here’ and ‘Place Load Here’ is where the pre-routed values are introduced from Nexygen. The 16 bit integer enum named ‘Graph View Selection’ offers three choices on the UI to the user: 1. MTVS Displacement 2. Nexygen Displacement 3. Both Depending on the enum influenced state, the wiring connections give the appropriate 1D array outputs that are bundled into a cluster of 2 1D arrays, and built into an array of 2 1D array clusters. This is the best way to read a value in an XY graph. Calibrating the image, converting the input values into real-world measurements and adapting the mobile microscope function There are 5-6 inputs required by the system but only the MTVS displacement needs calibration. This displacement starts as the sum of differences in pixels on the Y axis as read by the LKP Optical Flow VI and is conveyed as a double 64 bit real value. This value needed to be transformed into millimetres before being written in real time to the graph and text file outputs as a usable 64 bit real 1D array. This displacement starts as the sum of differences in pixels on the Y axis as read by the LKP Optical flow VI and is conveyed as a double 64 bit real value. The value needed to be transformed into millimetres before being written in real time to the graph and text file outputs as a usable 64 bit real 1D array. Figure 33: Graph Selector SUB VI