pulsed fibre optic light source for optical tomography

60
Pulsed Fibre Optic Light Source for Optical Tomography By Qasim Humayoun 000894986 Submitted in Partial Fulfilment of the Requirements for the Degree of BEng (Hons) Electrical and Electronics Engineering Technology Supervisor: Robert Jenner Electronic, Electrical and Computer Engineering Faculty of Engineering and Science 30 September 2016

Upload: qasim-humayoun

Post on 16-Apr-2017

46 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Pulsed Fibre Optic Light Source for Optical Tomography

Pulsed Fibre Optic Light Source for Optical Tomography

By

Qasim Humayoun

000894986

Submitted in Partial Fulfilment of the

Requirements for the Degree of

BEng (Hons) Electrical and Electronics Engineering

Technology

Supervisor: Robert Jenner

Electronic, Electrical and Computer Engineering

Faculty of Engineering and Science

30 September 2016

Page 2: Pulsed Fibre Optic Light Source for Optical Tomography

ii

Abstract

This project focuses around the implementation and design of a pulsed visible LED light

source that is can be used for one of the widely demanded tomographic technique, optical

tomography. The product consists of array of 16 visible LEDs so that it is can be used for

imaging related applications. Due to the physical dimensions of the visible LEDs, it is not an

effective method to be used for imaging purposes, this is mainly due to the reason the beam

will not be able to obtain the levels of resolution that is suitable for such applications. A very

effective way to overcome this issue was to develop a remote light source and guide the ray

into an array of fibre optic; the small size of the optic cable higher levels of resolution, levels

of resolution that is adequate for imaging purposes can be achieved. The fibre will then feed

the beam of light through a transparent section of a pipeline for imaging applications. The

intensity of the visible LEDS can vary if required. The product will provide a constant light

or pulsed light at user defined speeds.

Page 3: Pulsed Fibre Optic Light Source for Optical Tomography

iii

Acknowledgements

This research was supported by University of Greenwich. I thank my colleagues B. Gaire, L.

Sherif and J. Kabano who provided insight and expertise that greatly assisted the research,

although they may not agree with all of the interpretations/conclusions of this paper. On top

of that I would like to thank my supervisor R. Jenner who provided great support, made sure I

was moving in the right direction and for comments that greatly improved the manuscript. I

thank the technicians for assistance with ordering the components. And my colleagues A.

Ayeni and Ubon who provided their technical knowledge.

All the people mentioned above were a great support and helped in shaping the outcome of

the entire project.

Page 4: Pulsed Fibre Optic Light Source for Optical Tomography

iv

Table of Contents

CHAPTER 1 INTRODUCTION. .......................................................................................... 1

1.1 OVERVIEW .............................................................................................................. 1

1.2 AIMS AND OBJECTIVES ............................................................................................ 2

1.3 LITERATURE REVIEW ................................................................................................ 4

1.3.1 Background ....................................................................................................... 4 1.3.2 Benefits of using pulses of light .......................................................................... 5 1.3.3 Does Optic fibre help with resolution? ................................................................ 6

CHAPTER 2 DESIGN ......................................................................................................... 7

2.1 PRODUCT REQUIREMENT ......................................................................................... 7

2.2 SELECTION OF COMPONENTS AND MATERIALS ........................................................... 7

2.2.1 Micro-controller based timing circuit ................................................................... 8 2.2.2 Emitters ........................................................................................................... 12 2.2.3 Preparation of Optical Fibre ............................................................................. 13

2.3 ANALYSIS.............................................................................................................. 16

2.4 DESIGN SOLUTION ................................................................................................. 17

CHAPTER 3 IMPLEMENTATION ..................................................................................... 20

3.1 BUILDING THE LIGHT PROJECTION CIRCUIT .............................................................. 20

3.2 BUILDING THE MICRO-CONTROLLER TIMING BASED CIRCUIT ...................................... 22

3.3 BUILDING THE PROTOTYPE ..................................................................................... 23

3.4 CHANGING THE PLATFORM ..................................................................................... 24

3.5 CONFIGURING DE0 BOARD ..................................................................................... 25

3.6 BUILDING THE FINAL PROTOTYPE ............................................................................ 29

3.7 COUPLING THE OPTIC FIBRE ................................................................................... 31

3.8 FINALIZING ............................................................................................................ 33

CHAPTER 4 TESTING, RESULTS AND DISCUSSION ................................................... 34

4.1 TESTING WITH ARDUINO ........................................................................................ 34

4.2 RESULTS WITH ARDUINO ........................................................................................ 35

4.3 TESTING THE VHDL CODE ..................................................................................... 37

4.4 TESTING/RESULTS OF THE LIGHT PROJECTION CIRCUIT ............................................ 38

4.5 TESTING/RESULTS OF DIFFERENT CONFIGURATIONS ................................................ 39

4.6 TESTING/RESULTS OF INDIVIDUAL LEDS (FINAL PROTOTYPE) ................................... 40

4.7 FINAL TESTING ...................................................................................................... 41

CHAPTER 5 CONCLUSIONS .......................................................................................... 43

5.1 CONCLUSION ........................................................................................................ 43

5.2 REFLECTIONS AND FUTURE WORK ......................................................................... 44

Page 5: Pulsed Fibre Optic Light Source for Optical Tomography

v

REFERENCES ................................................................................................................... 45

APPENDIX A GANTT CHART ........................................................................................... 47

APPENDIX B (DATASHEETS) ........................................................................................... 48

APPENDIX C (VHDL CODE) .............................................................................................. 50

APPENDIX D (PARTS LIST/BILL OF MATERIALS) .......................................................... 55

Page 6: Pulsed Fibre Optic Light Source for Optical Tomography

1

Chapter 1 Introduction.

1.1 Overview

Started from the Greek words "tomos" which indicates slice and "graph" which means

picture, tomography can be characterized as a photo of a ‘slice’ of a process. Process

tomography is a “Tomographic” technology that involves the accomplishment of measuring

different signals sent from emitters and captured from the other end, the periphery of an

object with the help of sensors. This “object” placed in parallel to the sensors and emitters

can be in the form of a process vessel, human bones, process vessels and pipelines. The use

of tomography provides the user with a precise cross-section image of the subject placed in

between the sensors and emitters.

There are several diverse tomographic technologies, each offering an extensive variety of

applications. A few well known tomographic technologies are X-rays and CAT scans.

Using light techniques for gathering information in a similar way is among these diversities.

Optical Tomography has existed for many years. In early times it was used to provide visual

inspection for fermentation processes. Giving results in terms of clarity, colour and gas hold-

ups. This has been one of the main techniques for exploring the quality and state of the

fermentation process. However, in recent times many of the ways in which matter interacts

with light has been used to examine and learn the process parameters. Using the principles of

absorption, diffraction and reflection to provide the cross-section of the subject/container.

Figure 1.1. An array of eight transducer pairs. (Left) Top view. (Right) Front view

The figure above illustrates how the emitters, object and the detectors are positioned. The

emitters are placed around the cross-section of the object/container/pipe and detectors can be

found aligned on the same axis on the other side of the container/pipe. The beams of light

produced from the visible LED emitters are optically designed to frame a collimated beam

incident on the vessel containing the procedure of interest as seen on figure 1 (right)

Emitter Detector

Flow

Regime

Page 7: Pulsed Fibre Optic Light Source for Optical Tomography

2

Industrial areas have pipelines and containers that are fed with gases/liquids. These industries

provide its consumers with high quality products and in order to do that, they would very

much like to know what goes on inside these pipelines/containers and how gases/liquids

behave as they pass through them. It gives estimation where ordinary observing instruments

can't be worked, because of either the way of the regulation or the procedure in progress.

Optical tomography can be used to overcome this problem.

The motivation for this solution is that the use of optical tomography means that the

outcomes can create on-line query-able three dimensional information and visual

representations, considering a far more noteworthy level of comprehension of the procedure.

They are also quite non-intrusive and immune to electrical (background) noises. In monetary

terms, they are less expensive to use, as it comprises of just three imperative parts, the

controller, emitters and optic fibre link.

Because of the physical measurements of the visible LEDs, it is not a viable strategy to be

utilized for imaging purposes. This is predominantly because of the reason that the beam

won't have the capacity to acquire the levels of resolution that is suitable for such

applications. An exceptionally compelling approach to defeat this issue is to add a remote

light source and guide the beam into a variety of fibre optic; the little size of the optic link

more elevated levels of resolution that is sufficient for imaging purposes to be accomplished.

The fibre will then bolster the light emission through a straightforward area of a pipeline for

imaging applications.

These pulses of optical light from the emitters are then sent through a pipeline and are

recognised and received on the sensor side. On the off chance that the entire bundle (the

emitters with the sensors for the application) then it will be directed for finding the image for

that pipeline only. So instead, the source (emitter) is only to be planned and created and for

application purposes the industry can have diverse sensors for various pipelines/holders set-

up. The sensors will be characterized likewise, contingent on the material and its holder they

are utilizing it for and one and only emitter would be required. Along these lines they can

utilize the same heartbeat emitter for various parts in their ranges.

1.2 Aims and Objectives

Ultimately the main goal of this project was to build a pulsed fibre optic light source that will

be used for optical tomography. For the goal to be achieved the project will focus on a few

major aims.

1. Build an array of isolated light sources and guide the beams from the source through a

variety of optic fibre

2. Build a circuit/system that would provide variations of scan rates.

3. Build a circuit/system that would allow the user to control the intensity of the light

source

In order for the following aims to be achieved there are several objectives that had to be

completed. The entirety of the project was broken down into smaller fragments of objectives

and targets that were to be accomplished in a certain timeline. A Gantt chart was used to help

Page 8: Pulsed Fibre Optic Light Source for Optical Tomography

3

to keep track of the objectives to be completed within the timeline. For the venture to be

recorded "finished", the greater part of the goals are to be done. Below are some of the

objectives that helped in shaping the project. More detailed versions of the objectives were

arranged with further advancement in the outline territory of the venture.

Figure 1.2. Target list listing the fragments of objectives

All through undertaking these targets will function as a rule to advance in the project. The

destinations specified above are only a standard way to complete an undertaking in each of

the goals, it will be separated into further detail and set other point by point targets at each

strides.

Project Requirement

• Detailed examination of issue: Inspecting the problem at hand and finding a potential

solution for it. This objective looks at the project from a broader view and details the

essential issues at hand.

• Detailed specifications: listing all the specifications and using them to help in the

architecture and design of the project. The listing acts as a general checklist that the

design would have to fulfil to be considered as a plausible solution.

Architecture and Design

Design tool selection: Different design tool selections such as matrix and Pugh table

will be used, in correlation with the specifications to help choose the most appropriate

design for the project.

Design analysis: After the different designs are compared using the Design tool

selection, they would be analysed and the most appropriate design for the project will

be selected.

Project Requirement

Architecture and Design

Development

Testing

•Detailed examination of issue

•Detailed specifcations

•Design tool selection

•Design analysis

•Implementation of selected design

•Circuit design

•Fault Findings

•Compare expected results with actual results

•final Evaluation

Page 9: Pulsed Fibre Optic Light Source for Optical Tomography

4

Development

Implementation of selected design: After the analysing the design selection methods

and choosing the appropriate design. The process of putting the design into effect will

be carried out. This will help identify the components and the materials of the

product.

Circuit design: After the selection of the materials and components, the circuit design

will be built and a physical model of the product will be created.

Testing

Fault finding: After the circuit building, the design will be tested to find any possible

faults that might emerge in any of the components or materials. The faults might

originate from the wirings or might be in the form of semantic errors.

Compare expected results with actual results: As the goal suggests, the final product

will be tested in several parameters and would be compared with the results that is to

be expected from each of the parameters. This involves the light intensity emitting

from the source, the variation of scan rates and its frequency.

Final evaluation: After all the testing is done a final conclusion will be carried out to

see if the product as a whole is functional and is effective in delivering its purpose.

Following the straight path and completing the objectives along the journey will anchor the

odds of achieving the Aims of the project.

1.3 Literature review

1.3.1 Background

Optical tomography is a new technique that is used in medical imaging and industrial process

tomography. In 1943, Horecker [19] introduced the potential of using near infrared light as a

probing radiator. He realised that haemoglobin in blood is a good absorber of near infrared

light and the absorption of oxygenated and deoxygenated blood were found to be different.

Later in 1996, a project took place that dealt with developing a working system that used

optical light for medical imaging. It was later used in industrial process tomography system

to help in monitoring the periphery of industrial processes such as mixing tanks, oil pipelines

and fermentation processes. Optical tomography has become a very popular form of

tomography in industrial world, mainly due to its cheap and off-the-self components and its

ability to develop good quality images and provides the important flow information such as

velocity, concentration measurements and flow rates without invading the process/object.

Thus, as a result, cross-section images of these processes can generate better monitoring and

more effective utilization of applicable process capacity. Optical tomography can be a very

potential candidate in verifying and developing process theories and models, as well as

improving the current process instruments used.

Page 10: Pulsed Fibre Optic Light Source for Optical Tomography

5

1.3.2 Benefits of using pulses of light

S. Ibrahim [18] mentioned in one of his paper that in optical tomography, the alignment of

the emitters play an important role in determining if the design is fruitful or not. The light

from the source emitting from the source must be detected by the receivers on the opposite

end of the pipe. Many of the vessels and pipes in industries and manufacturers have very poor

transparency and are very opaque. Consequently, a great outline of optical windows is

required to guarantee the light generally gotten by the beneficiaries, ensuring that light is

received by the receivers. It is also a good idea of sending pulses of light from the source to

the receivers. Sending pulses rather than one continuous stream of light provides a higher

resolution of the cross-section of the object of interest. The receivers will be expecting the

pattern of pulses and will be prepared for the sequence, any disturbance within the pipeline

means that the receiver did not experience that pulse in the pattern and would use the

information to help better develop the final cross-section image of the vessel containing the

process of interest. It also eliminates the highly unusual behaviour of light and uses statistical

analysis from the pulses and uses the data to better predict the cross-section image and

provide the users with an accurate outcome.

Faramarzi [17]. Johansen, G [12] and Sakami. M [9] published their work which supported S.

Ibrahim’s [18] work. Both the papers were on similar terms but had different case studies.

Faramarzi and Sakami analysed the short-pulse laser propagation and in their conclusion they

mentioned that the pulses of light from the source helped in developing an image of better

quality, but unlike Ibrahim’s work, the images gathered from the individual pulses would be

stacked on top of each other (by a computer software), giving a very detailed outcome.

In 2006, Kunal Mitra [9] and few of his other colleagues performed an experiment that

supported Ibrahim’s [18], Faramarzi [17] and Sakami’s [9] work. His aim was to perform a

numerical analysis of short-pulse laser interacting with medium representing human tissue.

The experiment was performed with a time-resolved optical detection scheme; the scheme

would provide a computer (that would combine all the detections from the receivers and

“bind” them together, developing an image) with support to help predict the cross-section of

the image. Next, the same experiment was carried but without the use of the short-pulses and

the detection scheme. He came to conclusion that the short-pulses developed much better

images than the latter approach.

Figure 1.3. Kunal Mitra’s illustration fixating his results

Page 11: Pulsed Fibre Optic Light Source for Optical Tomography

6

The figure above shows the results of Kunal Mitra’s [10] experiment. The image on the right

involved the use of short-pulses. In terms of resolution the difference between them is by a

land slide.

1.3.3 Does Optic fibre help with resolution?

Earlier researches done by Khoo [4], Ruzairi [2], Hisyamuddin [5] and Sallehuddin [3] have

shown that the optic fibre cables used as a means of medium from the source to the object

aids in image construction.

The acquired concentration profile from the image reproduction is required together with the

velocity profile to finish the mass flow rate estimation in a ventilated conveying system.

Fundamentally, the principle of measurement in tomography is to acquire every single

possible combination of measurement from the sensor framework. The higher the

measurement acquired from the sensors, the resolution of the system would be better. By

utilizing the parallel projection, past explores have each confronted the issue of acquiring a

high resolution of their system. This is because the parallel projection technique confines the

number of measurements to the quantity of sensors being utilized. In a research done by Chan

[6], he implemented a fan beam projection technique (instead of a parallel projection) to

obtain flow representation using visible LED as the emitters, but the resolution and the

number of receiving sensors he used in his system were limited by the physical size of the

visible LEDs being used. Thus, his research focused in implementing the fan-beam projection

method by using optic fibre cables to act as a means to transport light from the visible LED to

the sensing side. Because of the sheer small size of the optical cables Chan [6] was able to

increase the number of sensors and the number of measurements taken, ultimately obtaining a

system with high resolution then before.

Figure 1.4. Fibre optic configuration

The figure above shows the configuration that Chan [6] used in his system to increase the

number of measurements taken, leading to high resolution.

Page 12: Pulsed Fibre Optic Light Source for Optical Tomography

7

Chapter 2 Design

2.1 Product requirement

The problem at hand was to build a pulsed light source that can be used for optical

tomography. The product had array of visible LED emitters. Depending upon the size of the

pipe, a number of visible LEDs will be placed around the body of the pipe to develop a 3D

model of the inside process of the pipe. For this project 16 visible LED emitters are used.

These array of visible LEDs are controlled via a micro-controller (with timing based

capabilities) to allow for different scan rates to be selected, a system to control the intensity

of the visible LED emitters and a system to allow users to control with visible LED emitter to

use.

1. Micro-Controller: The controller should be able to drive the array of visible LEDs

effectively. Allow user control to vary the intensity of the LEDs, be able to provide

different pulse rate options for the emitting visible LEDs and provides user control to

switch any desired emitters or array of emitters.

2. Visible LEDs: There should be arrays of LEDs available to provide for an increased

number of measurements that can be taken to produce an image effectively. The

visible LEDs should have high intensity to be able to transfer light up to the vessel of

process. And should have fast timing rates to provide effectively for the different scan

rates. If the LEDs are not fast enough then the LEDs will not be able to keep up with

the pulses and would not light-up with high intensity, losing performance of the

overall product.

3. Optic Fibre: The optic fibre should be able to be fitted with the LEDs effectively and

is capable of accepting the incoming light from emitters. The cable should also be

able to transport the light effectively to the vessel of the process

2.2 Selection of components and materials

This section of the chapter mainly focuses on the different aspects of the project from which

the most appropriate components and materials will be selected, shaping the final design.

Page 13: Pulsed Fibre Optic Light Source for Optical Tomography

8

2.2.1 Micro-controller based timing circuit

Figure 2.1. Micro-controller – brainstorming Ideas

The figure above was the Brainstorming that was done for the selection of a Micro-controller.

The primary function that the micro-controller should be able to deliver is that it should be

able to drive an array of 16 LEDs. The controller acts as the backbone of the project and the

selection of the most appropriate controller will further shape the design of the product.

PIC series

Abdul Rahim [1] in his system used two different PIC (Programmable Interface Controller)

micro-controllers when designing an optical tomography system. His research compared two

microcontrollers PIC and ds-PIC (Digital Signalling-PIC) and concluded the benefits of using

each of the two micro-controllers.

PIC18F4520 is written in C language. It has a RAM of 21 bits and consists of 20 GPIO

(General Purpose Input/Output) that are able to operate in clock mode, this functionality will

the circuit to operate at different scan rates. PIC18 is one of the most popular in its family;

this is mainly due its fast performance and ease to interact with other PIC controllers.

Mircro-controller?

Rasberry Pi

Arduino

De0 development

Board

PIC Series

Page 14: Pulsed Fibre Optic Light Source for Optical Tomography

9

Figure 2.2. PIC18 micro-controller

The figure above shows the Pin layout of PIC18. One of the disadvantages of PIC18 is that

the Program memory is not accessible and is only one time programmable.

The dsPIC30F6014A from the same family as the previous mentioned microcontroller. It also

uses C programming language and contains 66 I/O ports which is more than enough than

required and allows for further extension in the emitter.

Figure 2.3. DcPIC30 microcontroller

After using the two for the same task Abdul Rahim [1] came to a conclusion that in terms of

performance ds-PIC outperformed PIC18 and the usage for the optical tomography system

was better with ds-PIC, as it has 66 I/O pins. And the programming part for dsPIC is much

simpler and less troublesome than PIC18.

Page 15: Pulsed Fibre Optic Light Source for Optical Tomography

10

Arduino

Figure 2.4. Arduino Uno

An Arduino has 6 analogue input pins and 13 digital I/O pins from which only 6 are PWM

(Pulse-Width Modulation) these PWMs will make the emitters to pulse at different scan rates.

These micro-controllers are open-source, meaning that the components used in the controller

are obtained from off-the-self materials. They are programmed using C language and can be

programmed to provide the user with controls to select any single or groups of LEDs. From

looking that Figure 2.3 it can be seen that Arduino does not have enough pins to control 16

LEDs. But because of its vast functionality it can effectively operate with LEDs Drivers,

these will be able to drive the required number of emitters. Because it has PWM’s it will be

also be able to make the LEDs to pulse at different scan rates.

Raspberry Pi (model 2)

Figure 2.5. Raspberry Pi 2

A raspberry pi is a single-board computer. They operate on Python buy also support C and

C++ languages. Raspberry Pi 2 consists of 20 GPIO and similar to Arduino can be

programmed to control the 16 LED emitters. They are very cost effective and are very

compact in terms of size.

Page 16: Pulsed Fibre Optic Light Source for Optical Tomography

11

De0 Development board

Figure 2.6 De0 Board

These are development board that can be used for a variety of functions it consists of 36

GPIO pins and can be programmed to control the LED emitters. Unlike Arduino and

Raspberry Pi, De0 uses Hardware Description Languages (HDL). They come with built-in

switches that can be programmed to control the LED emitters. HDL is naturally parallel and

assignments can be both parallel and sequential. All the other micro-controllers mentioned

before operate using programming language, which can only handle sequential instructions.

However, De0 boards are not compact in size and can be very expensive unlike the other

micro-controllers.

The mentioned micro-controllers will now be compared with each other against some

parameters that will help in selection of the perfect microcontroller for the project.

Table 2.1. Comparison of micro-controllers

Micro-controller Cost Size Functionality Ease in

programming

PIC series *** ***** ** **

Arduino **** **** *** ***

Raspberry Pi **** **** *** **

De0 board ** *** ***** ****

From looking at the table Arduino was selected as the micro-controller. This is mainly due to

its compact size and inexpensive off-the-self components. Arduino fulfils the requirement to

be used for the project. It can be programmed to control the intensity of the LEDs. However

because it does not have enough pins to control the 16 LEDs, a LED driver has to be used to

drive the required number of LEDs. TLC5940 chip is one of the most popular LED driver

that is used to control large number of LEDs and works very effectively with Arduino.

Page 17: Pulsed Fibre Optic Light Source for Optical Tomography

12

2.2.2 Emitters

Emitters are the main optical sensors in the project and were carefully selected to satisfy the

requirements and characteristics of the hardware system of the project. The requirements for

the projects hardware system was that the emitters must have a very fast setting time when it

is being derived by a pulse rate. The reason for the fast setting time is that when the visible

LED is in operation and are being used in its pulse modes, the visible LED will not be able to

“Keep-up” with fast changes of digital HIGHs and LOWs (On’s and Off’s) and will reduce in

intensity, lowering the performance of the overall product.

There are three emitters that can be selected for the Optical fibre Process Tomography

(OFPT) system visible LEDs, Infrared and laser diodes. Looking at the requirements of the

project, it has already been established that the emitters are going to be visible LED driven.

Thus narrowing the search down to that type of emitters. Visible LEDs are very cost effective

and more user friendly compared to the other types of emitters. Besides, the output power of

visible LEDs is linearly proportional to driving the current. Linearity can play an important

characteristic to light sources in analogue applications which is accentuated in the usage of

the OFPT sensors. For any open debates questioning the use of visible LEDs for the hardware

system. In terms of linearity and cost visible LEDs are a better choice than laser diodes.

Problem with using LED

However, visible LEDs are not without weaknesses. One of the major issue of using visible

LED as a transmitter for the system is that because it operates as a visible light with the

wavelength ranging from 380nm to 700nm, the results in the tomography sensors that would

be used with the OFPT light source system is going be greeted with unwanted noise from the

surrounding environment. Most of the light used in our daily life is visible or white light such

as florescent light or incandescent light which have a peak radiant power of about 380nm.

This can easily affect the light received by the photo-receivers that would be used in the

sensing part of the system, making the projects OFPT light source system impractical and

expendable.

Potential solution

The most suitable and appropriate way to reduce the unwanted noise is to use a visible LED

that emits a light with a wavelength above the radiant power of household lights. This

criterion’s narrow down the search for the selection of the appropriate visible LED emitter for

the projects OPFT light source system.

The visible LED that is to be selected has to have high intensity, fast setting time when driven

by a pulse and above 380nm.

Looking at all the criterion the most appropriate visible LED was chosen that fulfilled all the

requirements. A Cree C503 series –Green colour LED was selected for the project. The

visible LED consists of a 5mm round shape and provides trustworthy performance and a

stable Lumen yield. The visible LEDs were manufactured using “optical-graded” epoxy

resin, offering moisture and temperature resistance for outdoor use.

Page 18: Pulsed Fibre Optic Light Source for Optical Tomography

13

Figure 2.7. Cree c503 series High Intensity Green LED

The figure above illustrates the actual size and shape of the LED. The lens of the LED is

clear and colourless, preventing any coloured lens to reduce the intensity of the LED.

Table 2.2. Parameters of selected LED

Requirements Met (), Not met (×) Evidence

High Intensity Met () The LED operates at a Luminous

intensity of 100 candela

Dominant wavelength Met () Because it a Green coloured LED

it has a dominant wavelength of

535nm

fast setting time Met () The LED is highly stable and

provides effective outcome during

different scan rates

The table above looks up the LEDs parameters and provides evidence that the requirements

asked by the projects light source system has been met.

2.2.3 Preparation of Optical Fibre

In utilizing optical fibre for tomography imaging, the basic optical transmitter converts

electrical info signals into adjusted light for transmission over an optical fibre. Also, the light

beam emitting from the source will be received by the receiving sensors via the optic fibre

cables.

Page 19: Pulsed Fibre Optic Light Source for Optical Tomography

14

Figure 2.8. Fibre optic configuration, similar to Chan’s system

The figure above illustrates how the fibre optic cable is configured. The Transmitter is

directly connected to the fibre optic cable which is then fed to the pipeline containing the

process of interest. With respect to the visible LEDs little physical size, it is trusted that

utilizing fibre optic will permit a higher number of optical sensors to be introduced, thus

achieving high level of resolution measurement in the tomography. Optical fibres provide

high bandwidth which allows measurements to be executed on fast flowing particles.

As stated earlier in the report (page 6), the optical fibre cables are used together with the

selected emitters to increase the level of resolution. It would be of good choice of selecting a

single core fibre optic cable made of polymer, having a core diameter of 1.00mm instead of a

fibre optic cable made of glass. This is because the former approach is easier to install and

affordable and as the core is plastic based rather than glass based, terminating the cable will

be much easier. The requirements for the selection of optic fibre will be very strict as it holds

the bridge that links the projects OFPT light source system to other receiving systems and

would be hindered useless if the bridge is not complete.

Figure 2.9. The selected fibre optic cable

Fibre Optic

Transmitter MATERIAL FLOW

THROUGH PIPELINE

Page 20: Pulsed Fibre Optic Light Source for Optical Tomography

15

The figure above shows the fibre optic cable that was selected to for the system, completing

the bridge and potentially increasing the resolution. The acrylic optical fibre cable is made

with the polymer material mentioned earlier and is suited to for development and design of

short distance links. The cable is matched for visible light having a wavelength of 400nm to

700nm, within the limit of the LED that was selected. The cable is highly durable and heat

resistant. Its internal core has a diameter of 1mm and has an outer diameter of 2.2 mm.

The fibre optic cable has a numerical aperture of 0.47 and an acceptance angle of 56 degrees,

as calculated using the Core refractive index and clad refractive index. The numerical

aperture will determine the acceptance cone of the fibre cable. It determines how much light

can be collected by the optic fibre cable. Equation 2.1 (below) gives the formula to calculate

the numerical aperture for the optic cable. Equation 2.2 (below) gives the formula that can be

used to calculate the numerical aperture and Figure 2.10 shows the acceptance angle of the

selected optic fibre cable. The total receiving angle of the optic fibre cable is twice the

acceptance angle and in this case is 112 degrees.

- (n2)(n1)22

(Eq: 2.1)

asin=NA (Eq: 2.2)

Where:

n1 = core refractive index

n2 = clad refractive index

NA = numerical aperture of the fibre optic

Ɵa = acceptance angle of the fibre cable

(Note: numerical aperture is a measure of how much light can be collected by the optic fibre.

Acceptance angle is the max angle of a light beam hitting the fibre core (along its axis) which

allows the beam to be guided by the core. Core refractive index is the refraction of light when

it hits the core of the fibre cable. Clad refractive index causes the light to be restricted to the

core of the optic fibre cable.)

Figure 2.10. the acceptance angle of an optic fibre cable

Page 21: Pulsed Fibre Optic Light Source for Optical Tomography

16

2.3 Analysis

After the selection of potential components and materials analysis will be carried out to see if

the overall requirements are being met

Table 2.3. Design Specification checklist

Parameter Requirement Met (), Not met (×)

or to be Met (//)

Evidence

LEDs There should be

arrays of LEDs to

provide for

increased number

of measurements

that can be taken

that can be taken

to produce an

image effectively

Met () As established in the

report earlier, 16 LEDs

will be used for the

projects OTPT light

source

The LEDs would

have high

intensity

Met () The LEDs has an

intensity of 100 cd

Fast timing rates

to provide for the

different scan

rates

Met () The LED is highly stable

and provides effective

outcome during different

scan rates

Micro-

controller

To be able to

drive the Array of

LEDs effectively

Met () A LED Driver will be

used with Arduino Uno

to control the selected

array of LEDs

Allow user control

to vary the

intensity of the

LEDs

Met () Arduino can be

programmed effectively

to fulfil the requirement

Be able to provide

different scan

rates for the

emitting LEDs

Met () Arduino can be

programmed effectively

to fulfil the requirement

Allow user control

to switch any

desired

emitter/array of

emitters

Met () Arduino can be

programmed effectively

to fulfil the requirement

Optic Fibre Can be fitted with Met () For more details please

Page 22: Pulsed Fibre Optic Light Source for Optical Tomography

17

cable LEDs refer to chapters “2.4 and

3.7” of the report

Be capable of

accepting the

incoming light

from emitters

Met () The cable has an

acceptance angle greater

than the viewing angle of

the LED

Be able to

transport the light

effectively to the

process of interest

Met () The cable made of

polymer and is ideal for

design and

implementation of short

distance links

From the above table it can be seen that all of the requirements were met, except for the

requirement stating if the optic fibre can be fitted with LEDs, which was accomplished later

in the project. Comparing the components next to their requirements identified that the main

aim of the project can be achieved if no trial error takes place during the implementation of

the project.

2.4 Design solution

Now that all the components are identified and the requirements are met, the physical design

can now be started. Before the implementation of the product can be started, a solution for the

design has to be established. This “established” outline arrangement will shape how the

physical item will look like as it will distinguish which wire goes where and what component

goes where.

Before the final design will be created the different components will need a way to be

collaborated with each other and should be able to work in unison with each other. Starting

from the micro-controller, the TLC5940 LED driver chip has to be connected with the micro-

controller and the LED. The reason for using the TLC LED driver chip is the Arduino UNO

does not have enough PWM (Pulse-Width-Modulation) pins available. The PWM is a method

of getting analogue results with digital means. The PWM will help in controlling the intensity

of the LEDs and in making them pulse, but with lack of PWM pins means that the desired

number of emitters cannot be installed. One solution for this problem is to use the TLC LED

driver chip. This chip uses only a few pins from the Arduino and can drive up to 8 LEDs. The

chip can be daisy-chained, connecting more chips to the chip that is already connected with

the Arduino to increase the number of connected LEDs.

Page 23: Pulsed Fibre Optic Light Source for Optical Tomography

18

Figure 2.11. Circuit diagram

The figure above shows the circuit diagram of how the LEDs were connected with the

Arduino via the TLC chip. The blue, red and purple wires on the right hand side are all

connected to the pins on the Arduino board. In case of daisy-chaining the second chip with

the first one, the red and the green wires (clock and latch signal respectfully) will be extended

parallel to connect to the second chip. The figure below gives a better illustration of how the

daisy chaining will take place.

Figure 2.12. Daisy-chaining the chips

TLC5940

TLC5940

TLC5940

Page 24: Pulsed Fibre Optic Light Source for Optical Tomography

19

The Red wire is connected to Pin 9 on the Arduino board. Pin 9 on the board supports PWM

and will help in controlling the intensity and scan rates. The blue wire will be connected to

pin 12 which will support serial data input and the green wire can be connected to any of the

Arduino’s Digital pins.

Now that the relation between the Arduino and the LEDs are established the coupling

between the fibre optic cable and the LEDs can be designed. Any signal that is lost due to

improper coupling between the optic fibre cable and the sensors can result in inaccurate data

acquisition. In order to prevent this problem of transmission loss due to the coupling between

the LED emitters and the fibre optic cables, custom-made “Caps” can be used. From the data

sheet it was established that the physical size of the selected LED is 5 mm and the outer

diameter of the chosen fibre optic cable is 2.2 mm. the custom-made “Cap” will have an

opening of about 5 mm ( 0.05 mm) and another opening of about 2.2 mm ( 0.05 mm). The

LED will be placed in the 5 mm hole and the terminating end of the fibre optic will be placed

in the 2.2 mm hole. When in operation the emitting light will be forced to escape from the 2.2

mm hole that was made, minimizing any loss that can occur between the coupling of the LED

and the fibre optic cable.

Figure 2.13 Coupling between the LED emitter and fibre optic

The figure above illustrates how the coupling between the visible LED emitter and the fibre

optic cable is carried out. As it can be seen that only space for the light emitted from the

visible LED can escape the cap from only the 2.2 mm hole, forcing the light to go through the

fibre optic cable with minimum loss of light in the coupling.

Now that the design for the coupling between the visible LED and fibre optic has been

created, the overall hardware design can also be created and the implementation of the design

can be carried out.

Optic

Fibre

Custom-made

Cap

LED

5.0

0 m

m h

ole

2.2 mm

hole

Page 25: Pulsed Fibre Optic Light Source for Optical Tomography

20

Figure 2.14.Topology of the hardware construction

The above shows a topology of the hardware construction that was done. The Host computer

was used to upload the written code and supply the micro-controller with power. The Micro-

controller would then be uploaded with the code which would then be used to control the

light projection circuit, giving options for different scan rates, intensity control and switch the

desired LED/array of LEDs either on or off. The emitters will then project light onto the fibre

optic cable which will be used to guide the light to the vessel of process.

Chapter 3 Implementation

3.1 Building the light projection circuit

As mentioned earlier in the design section, 16 visible LEDs are going to be used. The LEDs

will be arranged in a 4*4 network.

A resistor of 150 Ω is connected to the LEDs. The resistor value was calculated using

equation 3. From looking at the visible LED’s datasheet it was established that the current

suitable for providing the highest intensity is 30 mA with a voltage of 5 V.

R

V =I (Eq: 3.1)

Where:

I = Current (Amps)

V = Voltage (V)

R = Resistor (Ω)

Host computer Microcontroller Light

projection

circuit

Transmitter Fibre Optic cable

Page 26: Pulsed Fibre Optic Light Source for Optical Tomography

21

From the equation the resistor value provided was approximately 167 Ω, however a 167 Ω is

not available in the real world and the closest resister to that value is 150 Ω. This supplies the

LEDs a bit more current (33 mA) but still within the acceptable range.

Figure 3.1 light projection circuit

From above it can be seen that the LEDs on each breadboard are evenly spaced, making it

easier to distinguish between the different arrays and LEDs. When in operation, the user can

easily recognise which LED is switched on by pinpointing it location, the LED number

represents the X-axis and the Array number represents the Y-axis. An example can be seen

on Figure 3.1, the highlighted LED can easily be distinguished using it co-ordinates (Array 4,

LED 2).

The vertical connectors on the sides and the middle of the breadboards are connected with

each other. These will be later connected to the GND (ground) pin and 5 V pin on the

Arduino.

The LEDs were obtained from RS-components. The initial LED that was selected from the

design has an intensity of 100 cd. The reason for choosing 100 cd was to provide high

intensity and still be high after travelling through the optic fibre cables (experiencing loss in

intensity). However, the LED that was available with the largest candela that also fitted the

LEDs

1 2 3 4

Arra

ys

1 2

3 4

(Array 4, LED 2)

Page 27: Pulsed Fibre Optic Light Source for Optical Tomography

22

other criterions was 90.5 cd. All other LEDs that were above 90.5 cd were not “through-

hole”, had larger forward operating voltage and required special switches to operate. Thus the

LED with the 90.5 cd was chosen.

3.2 Building the micro-controller timing based circuit

After the light projection circuit was built, the micro-controller timing based circuit was

build. Irrelevant to the title of the sub-chapter, the micro-controller timing based circuit was

to configure the already build-Arduino Uno, making it suitable to drive all the 16 visible LED

emitters.

Figure 3.2. Micro-controller timing based circuit

The image above shows the micro-controller connected with the TLC LED driver chip. It can

be seen that only one TLC chip was used. This is because when buying the LED driver, the

chip was also available with a 16 pin LED driving capabilities. This reduced some wiring in

the overall circuit as there was no need for daisy-chaining of the TLC chip.

The 16 wires will be connected to a couple of actuator switches. These actuators came in

groups of 8 switches and made the overall product look cleaner as they were suitable to be

placed on a breadboard.

The TLC5940 Led driver chip was obtained from Amazon. The initial idea was to buy two

TLC chip with 8 LED driving capabilities and connect them together through daisy-chaining.

But upon searching for the component, a TLC chip with 16 LED driving capabilities was

discovered. The micro-controller on the other was obtained from Amazon as well. The

controller uses an ATmega328 chip. This chip is the heart of Arduino and the programming

code that would be written is uploaded onto this chip. If the testing goes well and no the

Page 28: Pulsed Fibre Optic Light Source for Optical Tomography

23

prototype works effectively, the ATmega328 chip would be removed from the Arduino or a

separate ATmega328 would be obtained and implemented with the prototype. This is because

the Arduino consists of many other components that are not being fully utilised with the

project and can be removed to make the overall size of the product more compact and easier

to use.

3.3 Building the prototype

The Micro-controller and the light projection circuit were connected to tighter via an actuator

switch. The actuator switch will be used to turn on or off the desired LED.

Figure 3.3. Building initial prototype

The image above shows the initial prototype that was build. The prototype does not have any

circuit to make the visible LEDs pulse at different scan rates or any circuit to vary the

intensity of the visible LEDs.

The prototype was then tested in terms of functionality of the actuators to see if all the LEDs

turn on and off effectively and to test the intensity of the LEDs. More details of the testing

can be seen on chapter 4.

After testing it was discovered that the intensity of the LEDs were not as high as expected.

Later some more testing was carried out to find any faults or the reason for the dimness of the

LEDs (The details of these testing can be seen in chapter 4). It was discovered that the LED

Page 29: Pulsed Fibre Optic Light Source for Optical Tomography

24

driver chip was taking too much current away from the Arduino and not providing enough to

the LEDs. Upon looking at the chips datasheet and surfing through some forum related to the

chip, it was discovered that the chip is not powerful enough to be used for a LED with such

high requirements.

A different driver chip was used to see if there was any difference in the intensity of the

LEDs. A 74HC595 shift register chip this time. However, it was also not able to supply the

required results and was very adamant when trying to configure the chip with the Arduino. It

took more pins then the TLC and required daisy-chaining. The main issue was that when

daisy-chained, it didn't permit the user to program the second chip independently and had a

cascading impact when programming the primary chip. In other words, if did not consider the

second chip as an isolated chip and when programming, the two chips had to be considered as

a single chip. This implied if the client switches on the first LED of the first chip they are

consequently switching on the first LED of the second chip.

Conclusion, the results did not vary. Due to lack of time and the deadlines getting closer, one

solution for the problem was to completely change the micro-controller and eliminate the

need for any LED driver chips. Looking back at table 2.1, the comparison between micro-

controllers, it can be seen that the DE0 board offers high level of functionality and has more

than enough GPIO (General Purpose Input/Output) pins to provide for the 16 visible LEDs.

Also the fact that it was already available from the university made it usable at the spot,

rather than wasting time in ordering any other micro-controller. However, the size of the

overall product would be compromised, the De0 board, in size, is larger than the Arduino

board, but at the given circumstances and lack of time, the sheer size of the overall product

had to be sacrificed to make the project work.

3.4 Changing the platform

As the De0 board was already available from the university is made it a lot easier to find a

solution as soon as possible. The De0 board offers two 36 GPIO pins, which is more than

enough for the 16 visible LEDs. The De0 board also comes with already installed switches

which can be used to control the pulse rates of the LEDs.

Keeping the design of the overall project the same. It has to be amended to be able to operate

effectively on a different platform, which in this case in the De0 development board. Before

implementing the development board to the light projection circuit, it was tested using a few

visible LEDs to see if it was able to deliver the expected results effectively, (the results can

be seen in chapter 4). The results from the testing were very sufficient and adequate enough

to be used for the final product.

As mentioned before the topology and the design of the hardware construction was not

changed but rather amended to be used on a different platform. Instead of Arduino the De0

board will be used and the LED driver chip will be removed from the prototype.

Page 30: Pulsed Fibre Optic Light Source for Optical Tomography

25

3.5 Configuring De0 board

Before the final prototype can be build and the light projection circuit connected with the

micro-controller, the De0 board had to be configured. Before it could be connected with the

projection circuit it had to be programmed. The programme would mention the 16 LEDs, the

different buttons to make them pulse at different scan rates. The mentioned ports (leds) in the

code will then be assigned onto the specific GPIO pins. The visible LEDs will be then

connected to its respective GPIO pins. It involved a lot of testing phases to obtain the most

appropriate configuration (more detail can be seen about the testing on chapter 4).

Before the actual hardware configuration of the De0 board was done, a sample code was

written for it. The sample code was written in VHDL (VHSIC-Very High Speed Integrated

Circuit Hardware Description Language). This sample code would allow user control to

switch any LED on or off and also provided with a scan rate of 50 Hz. The testing of the

sample code can be seen in chapter 4 of the report. Also the complete sample code as well as

the complete final code can be found in the Appendix section of the report.

The code below shows a small section of the code that will be discussed, explaining the

different part of the code.

ENTITY testing_led IS

PORT

(

clk_slow : IN STD_LOGIC;

blinker : IN STD_LOGIC;

global_reset : IN STD_LOGIC;

led0 : OUT STD_LOGIC;

led1 : OUT STD_LOGIC;

led2 : OUT STD_LOGIC;

led3 : OUT STD_LOGIC;

led4 : OUT STD_LOGIC;

led5 : OUT STD_LOGIC;

led6 : OUT STD_LOGIC;

led7 : OUT STD_LOGIC;

led8 : OUT STD_LOGIC;

led9 : OUT STD_LOGIC;

led10 : OUT STD_LOGIC;

led11 : OUT STD_LOGIC;

led12 : OUT STD_LOGIC;

led13 : OUT STD_LOGIC;

led14 : OUT STD_LOGIC;

led15 : OUT STD_LOGIC

);

END ENTITY testing_led;

the “clk_slow” is the scan rate of 50 Hz, the “blinker” is the switch that would assign all the

LEDs to “clk_slow” (the scan rate) if it is switched on. The “global_reset” is a safety switch

that was added to turn all the LEDs off in case of any technical issues or any risk of hazard.

All the LEDs listed from “led0” to “led15” are the actual visible LEDs that it would be

assigned to.

Page 31: Pulsed Fibre Optic Light Source for Optical Tomography

26

The De0 board consists of an already build-in clock that operates at 50 MHz, this 50 MHz

clock was used for the different scan rates for the LED. The method from which this was

achieved was by writing another piece of code which “divided” the 50 MHz clock, reducing

its frequency and making it slower so that it can be used for the different scan rates.

The piece of code below shows the process from which the clock division was achieved.

clk_timer: PROCESS (clk, reset)

BEGIN

IF reset = '1' THEN

Counter <= (OTHERS => '0');

ELSIF (clk 'EVENT AND clk ='1') THEN

Counter <= counter + 1;

END IF;

clk_out <= counter (22);

END PROCESS clk_timer;

The clock division is dependent upon the original 50 MHz clock from the board. The

“counter” would keep counting up as the original clock experiences a rise in clock edge.

When the “counter” reaches 22 it will then change the state of the “clk_out”, this “clk_out” is

then assigned to the “clk_slow” as seen from the previous piece of code.

Figure 3.4. Clock divider simulation

The figure above illustrates how a clock divider works. The first wave is the 50 MHz clock.

The wave below it is half of 50 MHz and would only change in state when the second change

is experienced in the 50 MHz clock. The last wave is half of the wave in the middle and

would only change in state with every third change in the 50 MHz clock.

After the clock divider code was written the two pieces of code where then brought together

to work in correlation with other in a new file of code. This new file made the two pieces of

code to work together and would later be used for the selection of the different scan rates.

Every 2nd

change will cause the second wave to

change its state

Page 32: Pulsed Fibre Optic Light Source for Optical Tomography

27

After the overall code was written, the LEDs and the other inputs and outputs mentioned in

the code were then assigned to the respective GPIO pins of the De0 board.

Figure 3.5. Pin assignment

The figure above shows the pin assignment for each of the nodes mentioned in the sample

code. The second column indicates if the specific code was either an input or and output and

the third column is the location of the pins that the specific nodes are assigned to. A table was

created to help assign the appropriate I/O to its respective pins. The table can be found in the

appendix along with the distribution of the GPIO headers.

Now that the code is written and the pins assigned, the configuration of the hardware can now

be implemented. When using the Arduino, the testing was done after whole prototype was

built as seen in figure 3.3. A lot of time was wasted to try built the circuit that was never

deemed to work in the first place, so to save some time, the De0 will first be tested using only

a single LED and a single switch to find the configuration that works effectively. This

configuration will then be implemented to all the LEDs and the switches.

Several configurations were tried before the ultimate configuration was figured out. The

initial configuration was that the anode (positive) side of the LED were connected to the

GPIO pins on the board and the cathode (negative) side of the LED was connected to ground

with a 150 Ω resistor in between. When voltage was applied to the GPIO pin the LED did not

light to the required intensity. It was discovered that the GPIO pins only supplied a voltage of

3.3 V. the LED is supposed to be supplied at least 4 V.

Thus the configuration was changed again. The final configuration that was tried was the

“golden ticket”, the anode side of the LED was connected to the 5 V pin on the De0 board

with the resistor in between and the cathode side of the LED was connected to the GPIO pin.

When the LED is supposed to light the GPIO pin would be programmed to go grounded (0

Page 33: Pulsed Fibre Optic Light Source for Optical Tomography

28

V) completing the circuit and lighting up the LED. (Note: the sample had to be amended

every time to fit the configuration that was implemented).

Figure 3.6. Final configuration

The figure above shows the final configuration that was selected for the new and improved

prototype. Another problem that was being faced was with the switch that made the LED

pulse at the scan rates. One end of the switch went to ground and the other end of the switch

was connected to the GPIO switch. Several configurations were tried with making the switch

work effectively, but all the configurations that were tries did not work. All of them had the

same issue, whenever the user comes close to slide the switch the user’s hands acts as a

parasitic capacitance (unwanted capacitance) to the wire, making it go high and affecting the

outcome. The reason for this unwanted capacitance was that when the switch was off, the

wire connected to the GPIO pin was not grounded and was open to any voltage that was

being experienced. A simple solution to this was to take add a high value resistor and connect

it parallel with the GPIO pin.

Page 34: Pulsed Fibre Optic Light Source for Optical Tomography

29

Figure 3.7. Scan rate’s switch configuration

The above figure explains how the configuration was made for the switch that provided the

scan rate.

Now that the configuration of the De0 board is done, the sample code written, configuration

for the LED and the switches established. The project is now ready to be taken to the next

step with the implementation of the second prototype.

3.6 Building the final prototype

One of the main problems that could alter the sails of the project is the components and the

wires that make the project whole and bridge the connection between the light projection

circuit and the micro-controller. The components can get faulty or the wires can be damaged

from continuous usage. These would affect the final outcome from the prototype and would

cast a very tedious barrier to carry out the fault finding if required.

Thus, before the construction of the final prototype began, all the visible LEDs on the light

projection circuit were supplied with 5 V to see if they are all still operation and there are no

faulty resistors, LEDs or wiring present.

Connected to

ground

Connected to

GPIO pin

Connected to

ground and is

parallel

Page 35: Pulsed Fibre Optic Light Source for Optical Tomography

30

Figure 3.8. De0 configuration circuit

The figure above shows the final configuration that is done for the micro-controller. The

GPIO pins are connected to two 8 actuator switches. The other end of these actuators will be

connected to the light projection circuit that was build. Another actuator with 4 switches is

also connected to the GPIO pins of the De0 board. These 4 switches will be used to make the

visible LEDs pulse at different scan rates.

The master reset or “global_reset” is assigned to the switch that is already installed on the

De0 board. Later on four more switches that are installed on the De0 board will be used to

control Arrays of LEDs. From these four switches the user will be able to switch groups of

four LEDs together. When the product is used in application, it could get time consuming to

switch all the LEDs one by one, by adding these four switches. The user can control 4 LEDs

at a time.

It is now time to bring the two circuits, the micro-controller and the light projection, together

to work in unison. The sample code was used as a frame to write the final code which was

used with the prototype. The code was compiled and simulated to see if there were any

semantic or systematic errors in them. As each of the LEDs was connected with the De0

board were tested to see if it operates efficiently and copes with the different controls.

As mentioned before the topology of the hardware was not changed, it was only altered to

make it adaptable with the change in the micro-controller and the configurations. So far the

development board has shown good promise so far and hopefully will be the “ONE” to make

the project working.

Page 36: Pulsed Fibre Optic Light Source for Optical Tomography

31

Figure 3.9. Final prototype

From the above figure it can be seen that the prototype works perfectly. A potentiometer was

used to control the intensity of the LEDs. The potentiometer has a max resistance of 100 Ω

and is connected between the LEDs and the 5 V supply. The positions were the LED switch

and the scan rate controller are placed are marked and can clearly be seen from the figure.

Because the LEDs are all connected to the same 5 V supply the voltage across each LEDs are

a bit smaller, this was tested individually for each of the LEDs. A simple for is would be to

add extra battery cells to the 5 V supply.

3.7 Coupling the optic fibre

Referring back to table 2.3. It can be seen that one of the requirements, “Can the optic fibre

be fitted with the LEDs?” was marked as To Be Met. Well…. This is where it will be deemed

“MET”.

Looking at the datasheets for the LEDs and the fibre optic cable. It was established that the

size of the LED is 5 mm and the size of the cable is 2.2 mm. one potential solution was

demonstrated in chapter 2.4. To use a custom made sort-of-Cap to cover the LED and

connect the optic cable. The “Cap” would have width of 5.5 mm, height of 3 mm and

thickness of 5.5 mm. the Cap would be made out of PVC and would be made using 3D

printing. Holes would later be drilled on the two ends of the cylinder, one would have a

diameter of 5.1 mm and the other would have a diameter of 2.4 mm. however, before the

modelling of the Cap had begun, it was discovered that the 3D printers available in the

university were not so accurate and would not be capable of creating the Cap with the exact

requirements.

Intensity

controller Scan rate

controller

LED

controller

Page 37: Pulsed Fibre Optic Light Source for Optical Tomography

32

Thus, a different solution was founded. A heat shrink connection tubes could also be used to

make the coupling different the optic fibre and the LED. A heat shrink connection tubes are

shrinkable plastic tubes that are used as a means of protecting or connecting different wires

together. When heat is applied to the plastic tube it will shrink in size and will attain that size

till its end. A normal heat shrink connection tube shrinks to one third of its original size.

Figure 3.10. Coupling of LED and optic fibre.

The figure above shows how the coupling between the optic fibre cable and the LED was

done using the heat shrink connection tube. The tube was heated until it could not shrink

anymore and the two were tightly fitted together.

Both the LED and the optic cable had the resistivity to stand the temperature that was used to

make the connection tubes shrink, about 90 degree Celsius. The fibre optic cable that was

bought came in the length to 20 m. for each of the LEDs about 15 cm to 25 cm of the cable

was cut, which was about 5 m in total that was used for the project.

Page 38: Pulsed Fibre Optic Light Source for Optical Tomography

33

3.8 Finalizing

Figure 3.11. Final product

The figure above shows the final prototype of the project. The De0 is connected to the LEDs

via the switches. Another actuator is connected to the De0 that provided 4 switches which

were assigned to provide the user to choose from different scan rates of 50 Hz, 100 Hz, 200

Hz, 400 Hz and 800 Hz. The last scan rate was assigned to a switch which is already installed

on the De0 board.

Figure 3.12. Array of LEDs

The figure above shows the array of 16 LEDs that are guided through optic cable and aligned

parallel to each other. When used in operation these ends will be placed around the pipeline

and collected by the receiver on the opposite end.

Page 39: Pulsed Fibre Optic Light Source for Optical Tomography

34

Chapter 4 Testing, Results and Discussion

4.1 Testing with Arduino As mentioned earlier the whole project was based on an Arduino platform but due to

unforeseen circumstances the prototype was not able to deliver the expected outcome. From

the data sheet of the selected visible LED it was established that to achieve the max intensity

from the LED it needs to be supplied with a voltage of 4 V and a current of 30 mA (this does

not take into account the other factors that would affect with the brightness of the LED and

would only consider the factors that can be controlled and varied which in this case is the

voltage and the current being supplied).

When the initial prototype (Figure 3.3) was operational and the demo code was uploaded to

the Arduino. The expected intensity was not achieved and thus after that prototype was then

tested against a single visible LED that was taken from the prototype and placed on a separate

breadboard with the TLC chip. This was done to minimise the number of wiring that was

present in the initial prototype and make the testing of the LEDs easier.

Below is the test code that was to test the intensity of the LED

#include "Tlc5940.h"

void setup()

Tlc.init (0); // initialise the chip and set all

channels to an off position

void loop()

Tlc.set (0, 4095); // set LED to highest brightness

Tlc.update (); // update the TLC with the mentioned instructions

The “# include tlc5940.h” is the TLC5940 library that was downloaded from the Arduino

website and placed within the library of the Arduino sketch. This was done to make the

TLC5940 chip programmable within the sketch. The function of the code above is very

simple and makes the LED that is connected to the TLC chip to light up to its brightest

intensity.

Page 40: Pulsed Fibre Optic Light Source for Optical Tomography

35

Figure 4.1. Testing single LED with Arduino

The figure above shows the configuration that was done using only one LED to test its

intensity.

4.2 Results with Arduino The intensity of the LED is dependent upon the current and the voltage being supplied to it.

So to measure the intensity the current and the voltage is to be measured. A simple

multimeter was used to measure both the voltage and the current. The table below shows the

results of the measurements being compared to the expected values.

Table 4.1. Results with Arduino

Parameter Ideal results Expected results Actual results

Voltage (V) 4 3.2 2.0

Current (mA) 30 25 15

Because of the tolerance in the components and the resistance existing in the wires, the

expected results were smaller than the ideal results. As it can be seen the actual results are

significantly smaller than the expected results. The LED lighted up very dimly.

Page 41: Pulsed Fibre Optic Light Source for Optical Tomography

36

But there could be fault in any of the wiring that might be cause for the actual results to be

smaller than the expected results. All the wires were later changed and the parameters were

measured again but the results were still the same.

Figure 4.2. Testing using different configuration

During the testing of finding any faults in the circuit many minor changes were made and the

different configurations were tested with the same parameters. Later on the LED was directly

connected to the Arduino via a resistor, as shown in the figure above. When the LED was

directly connected it lit very brightly and when tested against the parameters, it gave the

results that were expected from it.

Upon looking at the chips datasheet and surfing through some forum related to the chip, it

was discovered that the chip is not powerful enough to be used for a LED with such high

requirements. Thus because of this the chip had to be changed, that was the initial idea

anyways. The chip that replaced the TLC5980 was a 74HC595 chip. However, it was also not

able to supply the required results and was very stubborn when trying to configure the chip

with the Arduino. It took more pins then the TLC and required daisy-chaining. The main

issue was that when daisy-chained, it did not allow the user to programme the second chip

separately and had a cascading effect when programming the first chip. Simply, if did not

consider the second chip as an isolated chip and when programming the two chips had to be

considered as a single chip. This meant that switching one LED on chip-1 also switched on a

LED connected to chip-2.

Page 42: Pulsed Fibre Optic Light Source for Optical Tomography

37

Thus, as mentioned in chapter 3, the whole platform was changed and moved to the De0

development board.

4.3 Testing the VHDL code As mentioned, before the configuration of the De0 could be started a sample code had to be

written to make the micro-controller usable with the LEDs and the switches. Some pieces of

the sample code can be seen at chapter 3.5. The code was written in an application by the

name of “Quartus 2” using VHDL and the simulation for the code was done using Modelsim.

The code was first compiled to look for any syntax error within the code. After the

compilation was done the code was then tested in the simulation to search for any semantic

errors that might exist.

The simulation graph shows the wave in Nano seconds and the unit cannot be changed, sod

for the purpose of doing the simulation the scan rate was made a lot faster than the previous

50 Hz that was assigned in the sample code. (Note: the scan rate was only changed for testing

purposes. It will then be changed back to its original 50 Hz speed when used in the actual

physical hardware)

Figure 4.3. Simulation results.

NOTE: the LED nodes mentioned in the code are connected to the cathode (negative) side of

the LED, they would have to be switched off (LOW state) to turn the LEDs on. So in the

simulation, if the LEDs nodes are HIGH the LEDs do not light up and if the LED nodes are

LOW then the LED would operate

Table 4.2. LED pins connection state

Anode side Cathode side Outcome

HIGH HIGH No light

HIGH LOW Light

Safety Switch 50 MHz clock Pulse control

switch

Pulsing at

25 MHz

Page 43: Pulsed Fibre Optic Light Source for Optical Tomography

38

The anode side of the LED is already connected to a voltage of 5 V. in the coding it’s the

Cathode side that are altering. And when it goes LOW the circuit is complete.

Referring back to figure 4.3. The first wave is the safety switch, when it is on, no LEDs

would light. The second wave is the original 50 MHz clock of the board. When the “blinker”

switch, wave three is switched on, the LEDs start to pulse at a scan rate of 25 MHz. This

confirms that the sample experienced no semantic errors and is liable to be used for the final

product.

4.4 Testing/Results of the light projection circuit

One of the main problems that could alter the sails of the project is the components and the

wires that make the project whole and bridge the connection between the light projection

circuit and the micro-controller. The components can get faulty or the wires can be damaged

from continuous usage. These would affect the final outcome from the prototype and would

cast a very tedious barrier to carry out any fault finding when required.

Thus, before the construction of the final prototype began, all the visible LEDs on the light

projection circuit were supplied with 5 V to see if they are all still operation and there are no

faulty resistors, LEDs or wiring present.

All the LEDs were grounded and the De0 was used to supply the light projection circuit with

the 5 V. a wire was taken from the boards 5 V pin and was connected to multi-meter. The

multi-meter would then bridge the gap the gap between the LED and 5 V supply. If the LED

or the wire connected to the LED is faulty it would not light up and no readings would be

seen on the multi-meter. However, if the LED and its connection is fault free it would light

up and its current would be experienced by the multi-meter.

Figure 4.4. Testing individual LEDs

Page 44: Pulsed Fibre Optic Light Source for Optical Tomography

39

From the above figure the current reading can be seen on the multi-meter, 31 mA and the

LED is lit, indicating that the LED is fault-free for the moment and is liable to be used for the

project. The same test was done for each of the 16 visible LEDs individually.

In total, 4 LEDs were discovered to have been faulty. These faulty components were removed

and replaced with the extra LEDs that were available.

4.5 Testing/Results of different configurations As mentioned before when building the configuration of the De0 board, several

configurations were tried. Below are some of the configurations that were tested and lead to

the final “golden” configuration.

Table 4.3. Finding the golden nugget (configurations)

Configuration Voltage

applied

Anode

side

Cathode

side

Resistor

(Ω)

Voltage

at LED

(V)

Current

at LED

(mA)

1 5 V Connected

to GPIO

Grounded 150 2.5 18

2 6.5 V Connected

to GPIO

Grounded 150 2.5 18

3 5 V Connected

to 5 V

Connected

to GPIO

150 3 18.6

4 6.5 V Connected

to 5 V

Connected

to GPIO

150 3.34 30

5 5 V Connected

to 5 V

Connected

to GPIO

51 3.36 25

6 5 V Connected

to 5 V

Connected

to GPIO

35 3.4 31

In the first two configurations even though the voltage supplied was 5 V and 6.5 V, it did not

affect the voltage that was supplied to the LED pins. The voltage that was supplied to the

GPIO pins was 3.3 V and could not be changed. Thus leading to configurations 3 and 4.

The difference in the readings from configuration 2 to 3 can be seen clearly in the table. The

voltage increased by 0.5 V and the current was increased by 0.6 mA. In configuration 4 an

extra battery cell was added and the voltage applied was increased to 6.5 V. This

configuration gave readings that were expected since the very beginning of the testing trials.

Page 45: Pulsed Fibre Optic Light Source for Optical Tomography

40

In configuration 5 the voltage was brought back to its normal value, 5 V and the resistor was

decreased to one third of the original value that was calculated. The current decreased but the

voltage at the LED was constant. Looking at all the results of the voltage and current,

Equation 3.1 was used again to find a new resistor value that would give a current of 30 mA.

In the golden configuration, the resistor that was used was 35 Ω. It did not exactly give a

current of 30 mA but 28 mA was good enough.

4.6 Testing/Results of individual LEDs (final prototype) Because all the LEDs in the light projection circuit were connected to the same 5 V source.

The voltage across each of the LEDs was reduced. Each of these LEDs were tested in terms

of voltage and current. The table below shows the results of the parameters for the individual

emitters.

The current should be 30 mA and the voltage should be 3.4 V.

Table 4.4. Results of individual LEDs

LED Voltage (V) Current

(mA)

LED Voltage (V) Current

(mA)

1 3.01 20 9 2.98 19

2 2.99 19 10 2.97 19

3 2.98 18 11 3.00 20

4 3.20 21 12 2.96 19

5 2.64 17 13 2.78 18

6 2.89 18 14 3.21 21

7 3.21 20 15 3.01 20

8 2.45 16 16 3.01 20

From the above table it can be seen clearly that none of the LEDs come close to the expected

results. A simple solution for this problem was that a couple more battery cells were added to

the 5 V supply. Increasing the supply to a total of 8 V. All the components were suitable to be

used with 8 V supply and worked efficiently.

Intensity Test

The intensity for the LEDs was also tested. From figure 3.9, it can be seen that a

potentiometer was used to control the intensity of the LEDs. The potentiometer was

Page 46: Pulsed Fibre Optic Light Source for Optical Tomography

41

connected between the light projection circuit and the voltage supply source. The

potentiometer that was used at the start caused some issues. The LEDs would just go off or

would go extremely dim. Upon looking at the data sheet of the potentiometer it was

discovered that it had a resistance of 10 KΩ and turning it even a bit would cause the

resistance to reach more than 500 Ω. The potentiometer was then changed and was replaced

with another potentiometer that had a max resistance of 100 Ω.

4.7 Final Testing Now that the final prototype has been built and the coupling of the fibre optic cables and the

LEDs established. The only that’s left to do is to test the product to see if it is adequate

enough to guide the visible beams to a medium.

One of the topics that can be seen emerging throughout in this report is the intensity of the

LEDs. The whole Arduino platform was changed because the desired intensity was not

achieved. When building the final prototype the intensity of the LEDs were measured by

measuring the voltage and current it receives. The reason for the strictness of the intensity is

that, when the product is in operation, the visible beam will emit from the light projection

circuit through the 15 cm -25 cm fibre optic cable and through the medium just so that it can

cast a shadow of the internals of the medium. If the intensity was not that high there would

have been no light experienced by any receivers on the other end of the container.

A transparent bottle was used as a medium for the test and a Lux-meter was used to test the

intensity of the LED. There were a total of three tests that were done. During the tests all

other lights were turned off and all the tests were performed in a dark room. This was done to

minimize any background visible light that might interfere with the readings on the lux-

meter. The tests that were done were:

Test 1

The first test was to test the intensity of the emitters through the optic fibre cable. There was

no medium placed in this test. This test was done to see if the lux-meter fluctuates as the

distance between the fibre cable and the lux-meter changes. This test also provided a frame of

reference when doing tests 2 and 3.

Table 4.5. Lux reading, no medium.

Distance (cm) Lux-meter reading (LUX)

0 25

3 15

10 8

Page 47: Pulsed Fibre Optic Light Source for Optical Tomography

42

From the above, the results that provide with a good frame of reference. Now that there are

values that can be used for comparison. Test 2 can be carried out

Test 2

In test 2, a bottle was used as a medium. The bottle was placed in between the optic fibre

cable and the Lux-meter. The bottle has a diameter of approximately 7 cm. the bottle was

empty and had no fluid or gas flowing through it. The reading that the lux-meter experienced

was 12 lux.

Test 3

Test 3 was done using the same bottle but this time the bottle was filled with water. This test

was carried out to see how the readings would change when there’s a fluid passing through

the medium. The reading that the lux-meter experienced was 5 lux.

(A lux is a unit of light measurement that takes the area into account. It is equal to one lumen

per square metre)

Table 4.6. Overall test results

Test Medium Distance (cm) Lux-meter reading

(lux)

1 None 7 13.5

2 Empty bottle 7 12

3 Bottle filled with clear

water 7 5

From the above table it can be seen that the lux reading goes down. If the diameter of the

bottle is greater than 7 than the readings will goes even more down. Thus, it can be said that

the product is suitable to be used for a pipeline or container that has a length or diameter of 7

cm or less, if it is more than that then any receivers placed on the other end may not capture

any light or experience very little.

Page 48: Pulsed Fibre Optic Light Source for Optical Tomography

43

Chapter 5 Conclusions

5.1 Conclusion

Now that the final prototype had been built and tested effectively at different stages against

several parameters using various techniques. Let’s look at the projects aims and objectives

again to see if there’s any criteria that still has to be met.

The ultimatum aim of this is to build and design a pulsed fibre optic light source that is going

to be used for optical tomography. For the goal to be achieved the project had focused on a

few major aims that shaped the final product, leading to the success of the project.

1. Build an array of isolated light sources and guide the beams from the source through a

variety of optic fibre

2. Build a circuit/system that would provide variations of scan rates.

3. Build a circuit/system that would allow the user to control the intensity of the light

source

Looking the aims listed above we can be finalised that all the Aims of the product are met.

The isolated light source has been referred as the light projection circuit that was built. The

coupling between the LED and the optic fibre cable was done to make the cable suitable

enough to guide the beams of light from the source.

The micro-controller, De0, was used to provide the users with variable scan rates to choose

from. 5 different scan rates were provided with frequencies of 25 Hz, 50 Hz, 100 Hz, 200 Hz

and 400 Hz.

From the same circuit that was used to provide the different scan rates, the micro-controller

was also programmed to allow users to control the intensity of the LEDs and allow users to

switch any desired LED or Array of LEDs.

The initial idea from the very beginning was to use an Arduino as the micro-controller. The

project was based on an Arduino platform. However, due to unforeseen circumstances the

whole platform had to be changed. The LED driver chip that was used with the Arduino took

a lot of current away from the LEDs. Ironically, the LED driver chip was not able to drive

any of the LEDs effectively. Thus the platform was changed from Arduino to De0

development board. An Arduino Mega could have also been used, as it provided more pins

than Arduino UNO, enough pins to be used for the project. But under the circumstances and

the deadlines dawning in, the De0 was used. It filled the entire criterion’s that were expected

for the project and was already available to be used. However, the sheer size of the project

had to be sacrificed as the De0 board is larger than Arduino. The De0 board worked very

efficiently in delivering the requirements. A worthwhile sacrifice made for the greater good.

Page 49: Pulsed Fibre Optic Light Source for Optical Tomography

44

Just like the micro-controller there were several changes that had to be made, each a new

lesson learned. For example, the original idea for the coupling of the optic cable and the LED

was to use custom-made caps, but the 3D printers available were not accurate enough to print

the caps with the required dimensions. Upon further research to look for a replacement, heat

shrink connector tubes were discovered that worked perfectly in coupling the optic cable and

LEDs.

Apart from the mentioned, there were several other barriers that had to faced, getting the

“golden” configuration to get the highest brightness, fault testing off each components and

wires, finding the right components and so on. Each of these barriers was new lessons that

helped shape the project to a success. It thought that even though there is a barrier the best

option would be to look around the barrier rather than to try to knock it off.

5.2 Reflections and Future Work In reflection, if there was more time available the final product would have been made more

user friendly. The circuit would have been moved to a PCB board if there was more time

available. If would not have affected the performance of the product in any way but would it

easier to carry and easier to use. As a recommendation, if someone tries to make this project

or if the project is carried out again, it is very advisable to read the datasheet from the

beginning and make sure that the components can be collaborated with its neighbouring

components.

What could have been done differently?

Before the construction of the initial prototype had started, the datasheets for each of the

components could have been looked to see if it could have supported other components. After

the initial prototype was constructed and during the testing part it was discovered that the

LED driver chip was not able to drive the LEDs in the first place. All the time that was

wasted in constructing the prototype could have been saved it its datasheet had been read in

advance.

Future work

The product could be moved to a PCB board, the PCB board can be designed and printed out

and the components would be soldered onto it. All the components used are suitable to be

used on a PCB board so no new components would need to be bought. The product has only

16 visible LEDs and can be used for pipeline and container having a diameter and length of 7

cm or less. The LEDs can be changed with another LED that has a higher intensity and more

LEDs can be added, so that it can be used for pipelines that has a diameter greater than 7 cm.

also the product does not consider the receiving side of the tomography, it can be further

developed so that it can be used with any kind of receivers that have photodiodes as their

detectors. A cover can also be designed and printed to house the product.

Page 50: Pulsed Fibre Optic Light Source for Optical Tomography

45

References

[1] Rahim, R., Rahiman, M., Chen, L., San, C. and Fea, P. (2008). Hardware Implementation

of Multiple Fan Beam Projection Technique in Optical Fibre Process Tomography. Sensors,

8(5), pp.3406-3428.

[2] Ruzairi A.R. (1993) A Tomography Imaging System for Pneumatic Conveyors Using

Optical Fibres. Ph.D. Thesis. Sheffield Hallam University

[3] Sallehuddin I. (2000). Measurement of Gas Bubbles in a Vertical Water Column Using

Optical Tomography. Ph.D. Thesis. Sheffield Hallam University

[4] Khoo B.F. (2002). Optical Fibre Sensors for Process Tomography. B.Sc.

Thesis. Universiti Teknologi Malaysia

[5] Hisyamuddin S. (2001). Sistem Tomografi Optik Berkejituan Tinggi. B.Sc.

Thesis. Universiti Teknologi Malaysia

[6] Chan K.S. (2002). Time Image Reconstruction for Fan Beam Optical Tomography

System. M.Sc. Thesis. Universiti Teknologi Malaysia

[7] Rahim, R. (2004). Optical tomography system for process measurement using light-

emitting diodes as a light source. Optical Engineering, 43(5), p.1251-1257.

[8] Williams R.A. (1995) Principles, techniques and applications. Editors. Process

Tomography. pp. 3–12.

[9] Sakami, M., Mitra, K. and Vo-Dinh, T. (2002). Analysis of short-pulse laser photon

transport through tissues for optical tomography. Optics Letters, 27(5), p.336.

[10] Pal, G., Basu, S., Mitra, K. and Vo-Dinh, T. (2006). Time-resolved optical tomography

using short-pulse laser for tumor detection. Appl. Opt., 45(24), p.6270.

[11] Zhang, W. (2001). VHDL Tutorial: Learn by Example. [Online] Esd.cs.ucr.edu.

Available at: http://esd.cs.ucr.edu/labs/tutorial/ [Accessed 18 Mar. 2016].

[12] Johansen, G. and Wang, M. (2008). Industrial Process Tomography. Measurement

Science and Technology, 19(9), p.090101.

[13] Williams, R. and Beck, M. (1995). Process tomography. Oxford: Butterworth-

Heinemann.

Page 51: Pulsed Fibre Optic Light Source for Optical Tomography

46

[14] Idroas, M., Rahim, R., Green, R., Ibrahim, M. and Rahiman, M. (2010). Image

Reconstruction of a Charge Coupled Device Based Optical Tomographic Instrumentation

System for Particle Sizing. Sensors, 10(10), pp.9512-9528.

[15] Schleicher, H. (2016). Optical Tomography - Helmholtz-Zentrum Dresden-Rossendorf,

HZDR. [Online] Hzdr.de. Available at:

https://www.hzdr.de/db/Cms?pOid=12075&pNid=3018 [Accessed 15 Mar. 2016].

[16] Arduino.cc. (2016). Arduino - ShiftOut. [Online] Available at:

https://www.arduino.cc/en/Tutorial/ShiftOut [Accessed 5 Mar. 2016].

[17] Faramarzi, m. (2012). A REVIEW ON APPLICATIONS OF OPTICAL

TOMOGRAPHY IN INDUSTRIAL PROCESS. 1st ed. [ebook] Johor: Universiti Teknologi

Malaysia, pp.767-781. Available at:

http://www.academia.edu/5418078/A_REVIEW_ON_APPLICATIONS_OF_OPTICAL_TO

MOGRAPHY_IN_INDUSTRIAL_PROCESS [Accessed 18 Feb. 2016].

[18] M. T. M. Khairi, S. Ibrahim, M. A. M. Yunus, and M. Faramarzi. A review on

APPLICATIONS OF OPTICAL TOMOGRAPHY IN INDUSTRIAL PROCESS. 2012.

Control and Instrumentation Department, Faculty of Electrical Engineering. Universiti

Teknologi Malaysia.

[19] Elizabeth M. C. Hillman. (2002). Experimental and theoretical investigations of near

infrared tomographic imaging methods and clinical applications. . Ph.D. Thesis. Department

of Medical Physics and Bioengineering University College London.

Page 52: Pulsed Fibre Optic Light Source for Optical Tomography

47

Appendix A Gantt chart

Page 53: Pulsed Fibre Optic Light Source for Optical Tomography

48

Appendix B (Datasheets)

Datasheet for LEDs

Datasheet for TLC5940 LED driver chip

Page 54: Pulsed Fibre Optic Light Source for Optical Tomography

49

Datasheet for Actuator switches

Datasheet for Optic fibre cable

Page 55: Pulsed Fibre Optic Light Source for Optical Tomography

50

Appendix C (VHDL Code)

Below is the code that was written for the scan rates

IBRARY IEEE;

USE IEEE.STD_LOGIC_1164.ALL;

USE IEEE.STD_LOGIC_UNSIGNED.ALL;

ENTITY clk_div IS

PORT

(

reset, clk : IN STD_LOGIC;

clk50 : OUT STD_LOGIC;

clk100 : OUT STD_LOGIC;

clk200 : OUT STD_LOGIC;

clk400 : OUT STD_LOGIC;

clk1500 : OUT STD_LOGIC

);

END ENTITY clk_div;

ARCHITECTURE timer OF clk_div IS

SIGNAL counter : std_logic_vector(35 DOWNTO 0);

BEGIN

clk_timer: PROCESS(clk, reset)

BEGIN

IF reset = '1' THEN

counter <= (OTHERS => '0');

ELSIF (clk 'EVENT AND clk ='1') THEN

counter <= counter + 1;

END IF;

clk50 <= counter(24);

clk100 <= counter(23);

clk200 <= counter(21);

clk400 <= counter(20);

clk1500 <= counter(21);

END PROCESS clk_timer;

END ARCHITECTURE timer;

Page 56: Pulsed Fibre Optic Light Source for Optical Tomography

51

Below is the code that was written for the LEDs

LIBRARY IEEE;

USE IEEE.STD_LOGIC_1164.ALL;

ENTITY testing_led IS

PORT

(

clk_slow_50 : IN STD_LOGIC;

clk_slow_100 : IN STD_LOGIC;

clk_slow_200 : IN STD_LOGIC;

clk_slow_400 : IN STD_LOGIC;

clk_slow_1500 : IN STD_LOGIC;

blinker50 : IN STD_LOGIC;

blinker100 : IN STD_LOGIC;

blinker200 : IN STD_LOGIC;

blinker400 : IN STD_LOGIC;

blinker1500 : IN STD_LOGIC;

array_switch1 : IN STD_LOGIC;

array_switch2 : IN STD_LOGIC;

array_switch3 : IN STD_LOGIC;

array_switch4 : IN STD_LOGIC;

global_reset : IN STD_LOGIC;

led0 : OUT STD_LOGIC;

led1 : OUT STD_LOGIC;

led2 : OUT STD_LOGIC;

led3 : OUT STD_LOGIC;

led4 : OUT STD_LOGIC;

led5 : OUT STD_LOGIC;

led6 : OUT STD_LOGIC;

led7 : OUT STD_LOGIC;

led8 : OUT STD_LOGIC;

led9 : OUT STD_LOGIC;

led10 : OUT STD_LOGIC;

led11 : OUT STD_LOGIC;

led12 : OUT STD_LOGIC;

led13 : OUT STD_LOGIC;

led14 : OUT STD_LOGIC;

led15 : OUT STD_LOGIC

);

END ENTITY testing_led;

ARCHITECTURE rtl OF testing_led IS

SIGNAL led_s : STD_LOGIC_vector(0 TO 15);

Page 57: Pulsed Fibre Optic Light Source for Optical Tomography

52

BEGIN

process( global_reset,

array_switch1, array_switch2, array_switch3,

array_switch4 )

begin

if(global_reset = '1') then

led_s <= "1111111111111111";

elsif (global_reset = '0') then

if(blinker50 ='1') then

led_s(0) <= clk_slow_50;

led_s(1) <= clk_slow_50;

led_s(2) <= clk_slow_50;

led_s(3) <= clk_slow_50;

led_s(4) <= clk_slow_50;

led_s(5) <= clk_slow_50;

led_s(6) <= clk_slow_50;

led_s(7) <= clk_slow_50;

led_s(8) <= clk_slow_50;

led_s(9) <= clk_slow_50;

led_s(10) <= clk_slow_50;

led_s(11) <= clk_slow_50;

led_s(12) <= clk_slow_50;

led_s(13) <= clk_slow_50;

led_s(14) <= clk_slow_50;

led_s(15) <= clk_slow_50;

ELSIF (blinker100 = '1') THEN

led_s(0) <= clk_slow_100;

led_s(1) <= clk_slow_100;

led_s(2) <= clk_slow_100;

led_s(3) <= clk_slow_100;

led_s(4) <= clk_slow_100;

led_s(5) <= clk_slow_100;

led_s(6) <= clk_slow_100;

led_s(7) <= clk_slow_100;

led_s(8) <= clk_slow_100;

led_s(9) <= clk_slow_100;

led_s(10) <= clk_slow_100;

led_s(11) <= clk_slow_100;

led_s(12) <= clk_slow_100;

led_s(13) <= clk_slow_100;

led_s(14) <= clk_slow_100;

led_s(15) <= clk_slow_100;

Page 58: Pulsed Fibre Optic Light Source for Optical Tomography

53

ELSIF (blinker200 = '1') THEN

led_s(0) <= clk_slow_200;

led_s(1) <= clk_slow_200;

led_s(2) <= clk_slow_200;

led_s(3) <= clk_slow_200;

led_s(4) <= clk_slow_200;

led_s(5) <= clk_slow_200;

led_s(6) <= clk_slow_200;

led_s(7) <= clk_slow_200;

led_s(8) <= clk_slow_200;

led_s(9) <= clk_slow_200;

led_s(10) <= clk_slow_200;

led_s(11) <= clk_slow_200;

led_s(12) <= clk_slow_200;

led_s(13) <= clk_slow_200;

led_s(14) <= clk_slow_200;

led_s(15) <= clk_slow_200;

ELSIF (blinker400 = '1') THEN

led_s(0) <= clk_slow_400;

led_s(1) <= clk_slow_400;

led_s(2) <= clk_slow_400;

led_s(3) <= clk_slow_400;

led_s(4) <= clk_slow_400;

led_s(5) <= clk_slow_400;

led_s(6) <= clk_slow_400;

led_s(7) <= clk_slow_400;

led_s(8) <= clk_slow_400;

led_s(9) <= clk_slow_400;

led_s(10) <= clk_slow_400;

led_s(11) <= clk_slow_400;

led_s(12) <= clk_slow_400;

led_s(13) <= clk_slow_400;

led_s(14) <= clk_slow_400;

led_s(15) <= clk_slow_400;

ELSIF (blinker1500 = '1') THEN

led_s(0) <= clk_slow_1500;

led_s(1) <= clk_slow_1500;

led_s(2) <= clk_slow_1500;

led_s(3) <= clk_slow_1500;

led_s(4) <= clk_slow_1500;

led_s(5) <= clk_slow_1500;

led_s(6) <= clk_slow_1500;

led_s(7) <= clk_slow_1500;

led_s(8) <= clk_slow_1500;

led_s(9) <= clk_slow_1500;

led_s(10) <= clk_slow_1500;

led_s(11) <= clk_slow_1500;

led_s(12) <= clk_slow_1500;

led_s(13) <= clk_slow_1500;

Page 59: Pulsed Fibre Optic Light Source for Optical Tomography

54

led_s(14) <= clk_slow_1500;

led_s(15) <= clk_slow_1500;

ELSIF (blinker50 = '0' AND blinker100 = '0' AND blinker200 = '0' AND

blinker400 = '0' AND blinker1500 = '0') THEN

led_s(0) <= '0';

led_s(1) <= '0';

led_s(2) <= '0';

led_s(3) <= '0';

led_s(4) <= '0';

led_s(5) <= '0';

led_s(6) <= '0';

led_s(7) <= '0';

led_s(8) <= '0';

led_s(9) <= '0';

led_s(10) <= '0';

led_s(11) <= '0';

led_s(12) <= '0';

led_s(13) <= '0';

led_s(14) <= '0';

led_s(15) <= '0';

END IF;

END IF;

END PROCESS;

led0 <= led_s(0);

led1 <= led_s(1);

led2 <= led_s(2);

led3 <= led_s(3);

led4 <= led_s(4);

led5 <= led_s(5);

led6 <= led_s(6);

led7 <= led_s(7);

led8 <= led_s(8);

led9 <= led_s(9);

led10 <= led_s(10);

led11 <= led_s(11);

led12 <= led_s(12);

led13 <= led_s(13);

led14 <= led_s(14);

led15 <= led_s(15);

END ARCHITECTURE rtl;

Page 60: Pulsed Fibre Optic Light Source for Optical Tomography

55

Appendix D (Parts list/Bill of Materials)

Part No # Component Quantity Price (£)

1 Visible LEDs 25 3.70

2 Heat shrink connectors 20 4.27

3 Actuator switches 4 3.56

4 Jumper Cables 40 5.29

5 Optic Fibre 1 (20 meters) 23.49

6 Potentiometer 1 10.00

7 De0 board 1 Available from Uni

Total - - 50.31