scieee AI-readable full text Open interactive document viewer

Arduino based laser control

Bernal Muñoz, Ferran

Abstract

[ANGLÈS] Diode laser for communications control based on an Arduino board. Temperature control implementation. Software and hardware protection for the laser implementation.

Full text

Arduino based laser control A Degree's Thesis Submitted to the Faculty of the Escola Tècnica d'Enginyeria de Telecomunicació de Barcelona Universitat Politècnica de Catalunya by Ferran Bernal Muñoz In partial fulfilment of the requirements for the degree in SCIENCE AND TELECOMMUNICATION TECHNOLOGIES ENGINEERING Advisor: Jose Antonio Lázaro Villa Barcelona, January 2015 1 Abstract The first idea was to realize a tuneable laser for optic communications control using an Arduino platform for the electronic part. When the project advanced, that idea should be simplified due the problems appeared. Then the main goal was to control a DFB (Distributed Feedback Laser) laser with a moderate range of wavelength tuneability by temperature control. To control that kind of lasers some variables should be managed. These variables are controlled electrically. To compute all the variables a communication between Arduino and MATLAB was opened. This software provides a computation power higher and the possibility of save the variables’ values. Moreover, a DMX MosFet Receiver device was added to provide the electric power that Arduino is not able to do. Then it has been tried to implement and integrate a laser’s software and hardware protection, a temperature measurer for laser’s temperature and a PID control to stabilize it. 2 Resum La idea principal va ser realitzar el control de un làser de comunicacions òptiques sintonitzable utilitzant una plataforma Arduino pel control de tota la part electrònica. A mesura que va avançar el projecte, aquesta idea va ser simplificada degut als problemes trobats i va passar a considerar-se com objectiu controlar un làser DFB (Distributed Feedback Laser) amb un marge d’ona sintonitzable controlant la temperatura. Pel control d’aquest tipus de làsers s’han de controlar diferents variables les quals son modificades a nivell electrònic. Per controlar tot això es va afegir una comunicació entre la placa Arduino i MATLAB ja que aquest software al PC proporciona una potencia de càlcul molt més gran. També es va afegir una plataforma DMX MosFet per donar més potència elèctrica a la placa Arduino, massa bàsica per aquesta tasca. Amb tot això s’ha intentat implementar e integrar una protecció hardware i software pel diode làser, un mesurador de la temperatura interna del làser i un control PID per la mateixa. 3 Resumen La principal idea fue realizar el control de un láser de comunicaciones ópticas sintonizable utilizando una plataforma Arduino para el control de toda la parte electrónica. A medida que el proyecto fue avanzando, ésta idea se simplificó debido a los problemas encontrados y pasó a considerarse como objetivo controlar un láser DFB (Distributed Feedback Laser) con un margen de onda sintonizable controlando la temperatura. Para el control de este tipo de láseres se deben controlar distintas variables las cuales son manejadas a nivel electrónico. Para controlar todo esto se añadió una comunicación entre la placa Arduino y MATLAB, ya que éste software en el PC proporciona una potencia de cálculo mucho mayor. También se añadió una plataforma DMX MosFet para dar más potencia eléctrica a la placa Arduino, demasiado básica para esta tarea. Con todo esto se ha intentado implementar e integrar una protección hardware y software para el diodo láser, un medidor de la temperatura interna del láser y un control PID para la misma. 4 It is for that people who has suffered and enjoyed the engineering with me 5 Acknowledgements First of all, I want to recognise my supervisor Jose Lázaro for guide me during the entire project and give me support in the different areas of the project. He also has spent many hours with me in the laboratory trying to find solutions for the different problems especially with the PID design and implementation. Without his dedication this project would not have been possible. Finally, I have to thank the entire people who have helped me in the everyday things which made that project easier in different ways: family, friends, university-mates... 6 Revision history and approval record Revision Date Purpose 0 10/01/2015 Document creation 1 05/02/2015 Document revision DOCUMENT DISTRIBUTION LIST Name e-mail Ferran Bernal Muñoz [email protected] Jose Antonio Lázaro Villa jose.antonio.la[email protected]du Written by: Reviewed and approved by: Date 10/01/2015 Date XX/MM/YYYY Name Ferran Bernal Name Jose A. Lázaro Position Project Author Position Project Supervisor 7 Table of contents Abstract ............................................................................................................................ 1 Resum .............................................................................................................................. 2 Resumen .......................................................................................................................... 3 Acknowledgements .......................................................................................................... 5 Revision history and approval record ................................................................................ 6 Table of contents .............................................................................................................. 7 List of Figures ................................................................................................................... 9 List of Tables: ................................................................................................................. 10 1. Introduction .............................................................................................................. 11 1.1. Objectives and Motivation ................................................................................. 11 1.2. Technical description ........................................................................................ 11 1.3. Work plan ......................................................................................................... 12 1.4. Incidences ........................................................................................................ 16 2. Background: ............................................................................................................ 17 2.1. DFB communications Laser .............................................................................. 17 2.1.1. Tuneable Laser ......................................................................................... 17 2.1.1.1. Gain Section ............................................................................................ 18 2.1.1.2. Coupler Section ....................................................................................... 18 2.1.1.3. Reflector Section ..................................................................................... 19 2.1.1.4. Phase Section ......................................................................................... 19 2.2. MATLAB ........................................................................................................... 20 2.3. Arduino ............................................................................................................. 21 2.4. MATLAB + Arduino ........................................................................................... 21 3. Instrumentation used: .............................................................................................. 23 3.1. Power Supply ................................................................................................... 23 3.2. Multimeter ........................................................................................................ 23 3.3. JDS Uniphase Laser ......................................................................................... 23 3.4. Laser plinth ....................................................................................................... 24 3.5. ThorLabs TED 200-C Temperature Controller .................................................. 25 4. Sub-systems Description: ........................................................................................ 26 4.1. DMX Master Shield + DMX MosFet Receiver ................................................... 26 4.2. Arduino – MATLAB communication .................................................................. 27 4.2.1. MATLAB Interface for Arduino: .................................................................. 27 8 4.2.2. Arduino Target for Simulink: ...................................................................... 28 4.2.3. Communicate Arduino with MATLAB by Serial port: .................................. 28 4.2.4. Final communication protocol .................................................................... 28 4.2.5. MATLAB GUI ............................................................................................. 29 4.3. Laser’s protections ........................................................................................... 29 4.4. Temperature measurement using Arduino Board as Oscilloscope .................... 31 4.5. PID control for temperature .............................................................................. 32 5. Results .................................................................................................................... 34 5.1. Laser protection ................................................................................................ 34 5.2. Software results ................................................................................................ 34 5.3. Temperature measurer ..................................................................................... 36 5.4. PID warm up control ......................................................................................... 36 6. Budget ..................................................................................................................... 38 6.1. Project costs ..................................................................................................... 38 7. Conclusions and future development: ...................................................................... 39 8. Bibliography: ............................................................................................................ 40 Appendices: .................................................................................................................... 42 Glossary ......................................................................................................................... 43 15 Project: Project Documentation WP ref: 07 Major constituent: Documentation Sheet 06 of 07 Short description: Collect all the information used during the project and write the final document to deliver for the evaluation. Planned start date: 15/01/2015 Planned end date: 30/01/2015 Start event: 20/01/2015 End event: Internal task T1: Collect the information used during the project Internal task T2: Write the final document to deliver to evaluation Deliverables: Degree’s thesis document Dates: 02/02/2015 Table 7 Work package #07 Milestiones WP# Task# Short title Milestone / deliverable Date (week) 01 01 Read laser doc - 1 01 02 Define laser specs - 2 02 01 Develop ARDUINO code - 7 02 02 Test the Arduino with DMX ARDUINO code working properly 8 03 01 Develop MATLAB code - 10 03 02 Develop ARDUINOMATLAB connection Connection Arduino-PC 13 04 01 Redefine scope - 14 05 01 Temperature measurer Temperature measurer 15 05 02 PID control characterization PID constants 18 05 03 PID implementation and test PID control - 06 01 Hardware protection Hardware protection 19 06 02 Software protection Software protection - 07 01 Documentation Final thesis document 20 Table 8 Milestones summary 16 Next there is the order of the different packages: 1- Review Tunable Laser Documentation 2- Arduino Development 3- MATLAB GUI 4- Redefine Scope 5- PID Control 6- Diode Laser Protection 7- Project Documentation 1.4. Incidences There have been some important incidences which have done the initial plan fall. For that incidences is for which finally it was decided to manage a DFB laser which is easier to manage and can implement practically all the functionality designed at the start of the thesis. The first incidence found was that the TinkerKit website was closed. That means that it was so difficult to find important information about the DMX Shield and the DMX MosFet Receiver used in the project. Finally it was impossible to find any tutorial or basic document with first steps to work with these devices and it was so difficult to find the official libraries to install into the Arduino program to work properly with the devices. All this made harder to work with these devices and took more time to start testing them and know how they work internally. The second incidence has been with the PID control to maintain constant the laser’s temperature. The first tests were done with a pump laser which was too simply and did not have integrated a Thermistor to measure the temperature in the laser but it was not specified. Then it was spent some time until we realized that the laser did not have those components and the problem was not when computing the temperature measure. Another problem found which has to see with the PID is that when trying to characterize it using the DMX MosFet we obtained strange measures which had to see with the DMX MosFet and its behaviour. After performing lots of different tests I have not been able to does it work as is supposed, and the PID control has not been properly implemented. In the next sections there are more details about this big issue. Fig. 1 Gantt diagram with the final development of the project 17 2. Background: Here is a summary about the information found during the first stage of the project. It is about the four big items which would be combined to design and integrate a whole system. 2.1. DFB communications Laser A distributed feedback laser (DFB) is a type of laser diode which emits light when current is applied through the diode. When the current is the appropriate laser starts to emit, but this provokes other effects which should be taken in care. The most important is that the internal temperature rises. It is important because a DFB laser is not an electronic device which works properly in a temperature range. Every temperature degree of difference makes the laser works in a different way modifying the wavelength or the output power. Then it is important to have this parameter into account to characterize the laser’s output. 2.1.1. Tuneable Laser A tuneable laser is a kind of laser which can switch its wavelength when varying some parameters. One of the ways to change the wavelength is changing the temperature. The problem of this kind of tuning is that is slower and the wavelength range is least than other tune ways. The other parameters changed to tune the laser are the configuration of different sections of the laser. When changing these sections is provoked the named plasma effect. It is produced by the current injection on the laser cavities and allows wavelength tuning by refraction index changes. These four sections are: gain section, coupler section, phase section and sampled reflector section. Fig. 2 Detail of the 4-sections of a Tunable Laser with the wavelength path as shown in [1] 18 It is important to notice that varying the current introduced in the gain section does not produce a wavelength change; it only affects the output power from the laser diode. In the other three sections, when varying the current it is varied the effective refraction index which provokes that the wavelength outgoing from the laser cavity varies in function of the different indices. Next there is a little explanation on how the changes affect the different sections. 2.1.1.1. Gain Section It is the section which injection current should be properly introduced to allow the laser work. When the current is higher than a certain threshold and the other currents are not null the diode laser starts emitting light. Once this threshold is passed the output power increases in a logarithmic way as is represented in the figure 3. Fig. 3 Output Power versus Gain current fixing three other currents and temperature as shown in [1] 2.1.1.2. Coupler Section This section works as a filter, when increasing the input current in this section there are lower sampled modes. Then we can observe some nanometres jumps in the figure 4. Fig. 4 Wavelength versus Coupler Section current fixing three other currents and temperature as shown in [1] 19 2.1.1.3. Reflector Section This section is used for fine tuning; increasing the input current does this section selects lower order cavity modes. In the next figure there are little jumps of about tenths of nanometres. Fig. 5 Reflector Section current increase characteristics fixing three other currents and temperature as shown in [1] It is important to notice that depending on the bias current in the other sections. There could appear some non-lineal behaviour in the laser output wavelength. In the figure 6 we can see how changing the coupler bias current into a different point that the one chose in the figure 5 it has a big jump eith little current increase. Fig. 6 Reflector Section current versus wavelength fixing the three other currents as shown in [1] 2.1.1.4. Phase Section The phase section tunes all the cavities at the same time. It produces some chaotic wavelengths with non-linear behaviour when changing a little the input current for this section. In the figure 7 we can see an example of how the output varies when increasing the current introduced in this section. 20 Fig. 7 Phase Section current versus wavelength fixing three other currents and temperature as shown in [1] 2.2. MATLAB One of the most important parts in this project is about how to manage the data acquired. For this purpose it was chosen the MATLAB software. First of all it is important to know what MATLAB is to understand why has been used during the project and which advantages provide us. MATLAB is a numerical computing environment which allows matrix manipulations, graph 2-D and 3-D graphics, create easily Graphic User Interfaces, interface with other programs... It is very used software in the engineering world for its computation power and the multiple applications it has. Moreover, there is a huge community of developers which use the software and share for free the tools created by them or publish their functions to solve specific problems. In this project it was important to have software which could interact easily with other programs for example to export data collected to an Excel file or to interact with the device which controls the electronic part of the laser. Another important point was the possibility of creating a simple GUI for the final user which is going to manage the laser at the end. Finally, there is the need of having software to manage all the different currents to introduce to the laser, manage and save the data extracted from it, create a friendly GUI for the final user and connect the computer with an outside device to manage the laser. In spite of there are other software which can give the characteristics commented below or inclusive is possible to create an specific software to do all this, for the project it was chosen MATLAB for its capability of offering all those characteristics in a simple and easy develop tool. 21 2.3. Arduino Arduino is an open-source electronics platform based on easy-to-use hardware and software. The Arduino boards are systems which provide sets of digital and analog I/O pins that can be interfaced to various extension boards and other circuits. Every board has a microcontroller or processor integrated which can run a program and does the system work without consuming process resources from the computer. There is an example of an Arduino board in the figure 8. It is very useful for simple programs which are based on controlling a simple system basing the decision to take on the data collected from some sensors. Fig. 8 Arduino UNO Board The other big point that Arduino has is the easy way to connect a board and the data it processes with a computer to manage this data in different ways. Every board features serial communications, including USB in some models, for load the programs created but to transfer data between both systems too. It allows to use these boards in more complex systems which need a major process power or to use more memory because they can work with a very powerful computer easily and work as an interface to connect different devices to the computer without processing the data more than necessary to send it. For programming the microcontrollers, the Arduino platform provides an integrated development environment (IDE) based on the Processing project, which includes support for C and C++programming languages. Moreover, as happens with MATLAB, Arduino has a huge developer’s community which are very active in the Arduino’s forum where there are lots of projects or examples to follow. 2.4. MATLAB + Arduino Since 2010 MATLAB started to work into make easier to manage an Arduino board from a MATLAB session. Then from that moment in every 6-months MATLAB release there have been news about the Arduino package including new functionalities or new instructions to execute in MATLAB to produce changes in the board pins or read data directly from them. Moreover, since 2012 MATLAB included a package to prototyping, testing and running Simulink models in an Arduino UNO board. With new releases the number of boards which can work with Simulink has raised. The fact that a board can work with Simulink is very useful for control and robotics purposes in which Simulink is very easy-to-use for designing systems. 22 In summary it is very useful to combine both tools because they are complementary. MATLAB gives a high computing power in mathematics while Arduino is very powerful to manage different electronic devices easily from a computer. Then, together they can be integrated to form a very complex system which, for example, needs to capture information from some sensors, process it in a complex way and depending on the results decide what to do managing some other devices. 23 3. Instrumentation used: To perform all the tests and reach some of the goals it has been necessary to use some instrumentation from the Laboratory which is going to be mentioned here with a little explanation about why has been used. 3.1. Power Supply This instrument has been used basically with two purposes. The first one is to feed the DMX MosFet Receiver which needs a 12-24V of voltage supply to work. The second one has been as a controlled current source. It has been done setting up desired saturation intensity and a big voltage referred to the resistance is going to be used. That was useful when performing tests with laser’s cooler for example. Fig. 9 Power supply used during the tests 3.2. Multimeter A multimeter has been basic during the testing due its multiple functions. First it was important to measure the internal resistance of different elements from the laser as the Thermistor, the peltier resistance... Next, it has been very useful to monitor the intensity through the cooler to characterize it and perform some tests. Another important point has been to check which pins in the DB9 output of the plinth are connected to the butterfly pins where the laser is placed. 3.3. JDS Uniphase Laser To perform practically all the tests it has been necessary a laser as it is the focus of the project. The first laser tested was an agree systems pump laser at 980nm. After performing some tests and watching irregular data collected the conclusion was that this laser didn’t integrate a TEC system to control temperature then it was useless to perform the tests required. Then, after testing some lasers it was finally decided to continue working with the JDS Uniphase laser because it implemented all the parts which were necessary for the project scope. It is not a tunable laser but has implemented a Thermistor to compute the temperature, a thermoelectric peltier cooler to manage the temperature in the laser, an emitting diode, an integrated wavelength monitor and it was build in a 14-pin butterfly package for an easy management of the device. For more information you can find the laser’s datasheet in the appendix 24 3.4. Laser plinth It is necessary to connect the laser with other devices used in the project, to do that it has been used a laser plinth. This consists on a platform to stack the laser and work safely with it because it has to be taken into account that a laser is not a cheap device. The laser plinths used provide two DB9 inputs to connect easily the different laser pins individually customizing a DB9 cable or to connect with different devices to control some variables from that kind of lasers. At the beginning a Throlabs’ plinth was used to perform the tests but when the protection circuit was designed an easy way to implement it was to use the LDH BFY-B Profile’s plinth which has a plate to interconnect the laser’s pins easily. In the figure 10 there are both plinths used during the project. Fig. 10 Profile’s plinth (left) and Thorlabs’ plinth (right). The Profile’s plinth has a particularity, the butterfly pins where the laser is placed are connected with the pins in the bottom row and the upper row pins are connected to different pins in the DB9 connectors. Next there is the connection reference from upper row (right to left watching the picture) to the DB9 connectors: Fig. 11 DB9 connectors pins for the Profile’s plinth LD Driver Upper row pin TEC Driver Upper row 6 8 5 2 7 6,7 4 3 8 9 3 4 9 10 2 5 1 13 2 11 4 12 5 1 Table 9 Connection dependencies for Profile’s laser plinth 31 Fig. 16 Circuit designed for software protection. 4.4. Temperature measurement using Arduino Board as Oscilloscope It is very important to notice that laser behaviour depends on the temperature. Then, an important variable to be monitored is the temperature into the laser cavity. To do that, the laser integrates a Thermistor. A Thermistor is a kind of resistor which resistance depends on the temperature, more than in standard resistors. To measure this Thermistor resistance it has been used a simple circuit combined with the Arduino board. It consists on a voltage divider with a known resistance and the Thermistor. With this, the next step is to put a known voltage from the Arduino (there is a pin with constant 5V output) and read the voltage in the middle of the voltage divider to know the voltage in the Thermistor. In the figure 17 there is a picture with the assembly done to do measure the temperature. Fig. 17 Laser temperature measurement system Once is known the voltage in the Thermistor is time to compute the temperature. First the resistance in the Thermistor should be known. It is an easy calculation because the resistor put in the divider is known. Now, to compute the temperature it has been used the next equation: 32 Where To is the room temperature (298.15 Kelvin=25ºC), B is the parameter equation which is specified in the laser characteristics, R is the resistance measured in the Thermistor and Ro is the resistance in the Thermistor at To. Finally, the calculated temperature is sent to MATLAB and it generates a graphic with its time evolution. There is an example of measuring the laser temperature at room’s temperature, which means without exciting it. The figure shows the noise measurement digitalized by the Arduino A/D converters for the analogue pins. The error read is very small and provokes a deviation in a 0.4 Kelvin error range. Fig. 18 Room’s temperature measurement with noise measurement digitalized 4.5. PID control for temperature As it has been said before, it is important to control the temperature in the laser to ensure its expected behaviour. To do that it has been chosen a PID control to maintain a constant temperature in the laser. A proportional-integral-derivative controller (PID controller) calculates an error value as the difference between a measured process variable and an objective value. The controller tries to minimize the error by adjusting the process manipulating a variable. In this case the variable to set is the temperature and the variable which is manipulated is an integrated thermoelectric cooler (TEC). This uses the Peltier effect to create a heat flux between the junction of two different types of materials. After performing some tests finally it was decide to use a controller with only proportional and integral actions. It was done because the derivative action is very sensitive to noise and it provokes instability. Then some tests were done with only PI actions and the controller accomplished the expectations. To tune the proportional and integral constants has been used the process reaction curve method. It consists on excite the system with a unitary step and measuring the parameters which characterize the response in the resultant sigmoid. In this case what has been done is put a current through the cooler and measure the temperature variations in the laser. It has been done to characterize the warm up and the cool functions which have different curves. In the figures 19 and 20 there are both curves. 33 To get those curves has been necessary to perform some tests and manage the current introduced to the cooler. Next there is the explanation about how the tests have been done and the problems found. The first to do with the PID design was to check the laser’s cooler and the Thermistor worked properly. It was done with the Thorlabs’ TEC and the results were coherent. Once this test was performed, the next step was to reproduce the results found with the temperature controller with a controlled current from the power supply to ensure the behaviour is the same. When it is ensured is time to do the same test with the DMX MosFet to check if there is something different, and there was where problems became. To warm up the laser the behaviour was as expected and there were not problems. But when trying to cool the laser the readings from the Thermistor gave strange values. In the results section are the final figures from the last tests performed. First the problem seems to be the formula to calculate the temperature. To check the measurer it was performed a test without the laser putting in the site of the Thermistor a known resistor which should give negative temperature and it worked properly. After that, the other test carried out was to ensure the DMX MosFet receiver didn’t provoke a strange behaviour in the readings. To do that the system was checked using 2 Arduino UNO boards. The first one was only to read the temperature and the other one to manage the DMX MosFet and its output values. The results of this test were exactly the same as were in the tests with only one board, then the library used didn’t affect the Serial communication. Fig. 19 Warm up response to unitary step Fig. 20 Cool response to unitary step 34 5. Results Here can be found the results for the different sub-systems designed and the analysis of the different tests performed with the systems. 5.1. Laser protection The first important result is a simple hardware and easy to implement laser protection. It has been integrated in a 28-pin plate easily work with the laser plinth used during the project. But it is important to notice that this protection is useful to all DFB lasers. In the next figure the final integration with the plinth could be seen. Fig. 19 Laser protection integrated in the plinth Moreover, it has been designed a software protection which only needs the testing of the auxiliary circuit designed to adapt it to the Arduino UNO board. This software protection can be taken as model to design other protections as a maximum voltage protection to a point in the circuit to protect, for example, the cooler. 5.2. Software results From the software part has not been achieved a finished package which can be seen as a result but there are interesting findings to be mentioned. First of all an effective and powerful Arduino-MATLAB communication has been achieved. It is important because it provides freedom to compute much interesting and complex data in a computer and finally manage whatever through an Arduino board. The Serial communication is the most complex to be established but is quicker and has more power through the use of headers developed in the project. Next, using the communication explained before, there has been partially developed a friendly GUI, which can be found in the Appendix. It is ready to integrate the different parts of the program which have not worked as expected at the end by the final code which works properly. Next there are two images from the main windows developed until now for the GUI. The first one is the Scan Window where the user sets up the parameters in which is going to be based the scan performed for a tuneable laser. Once the user clicks on START button the system checks the inputs and, if everything is correct, starts the scan. 35 Fig. 20 Scan Window from the MATLAB GUI The other main window developed for this GUI is the Tune Window. The idea is that the user sets up a configuration for the tuneable laser and read at the same time the behaviour of it. It allows to perform quick tests having clear the currents around the user wants to work. Fig. 21 Tune Window from the MATLAB GUI Moreover, some simpler sketches have been developed to test or design the different sub-systems. The software laser protection or the temperature measurer could be an example of this. 36 5.3. Temperature measurer A Thermistor based temperature measurer using an Arduino board has been performed. It has been developed for the laser used in this project but changing the parameters to compute the temperature it could be used to read the temperature with any kind of Thermistor. To monitor the current temperature in the Thermistor it could be opened a Serial monitor in the Arduino IDE or through a MATLAB code developed to catch this data and plot it in function of time. 5.4. PID warm up control With the PID there have been lots of problems. All the problems came trying to cool the laser through the DMX MosFet Receiver. Then, it has been possible to stabilize the temperature at a high value than the room temperature. In the figures 24 and 25 are two examples about it. The first one is maintaining the temperature at 330 Kelvin and the second one at 310 Kelvin. With those tests performed, it was time to try if this part of the PID control could work together with the laser diode. To do that was necessary to see how the laser is warmed up when feeding the diode. It could be seen in the figure 26. After that, the test was to try to put the laser at 310 Kelvin while feeding the diode. In the figure 27 there is the result, the PID is acting until the goal temperature is achieved and then the laser continues warming slower due the laser diode off heat. Fig. 25 PID acting at 310 Kelvin Fig. 24 PID acting at 330 Kelvin Fig. 26 Laser temperature when feeding diode at 100mA Fig. 27 Laser temperature when feeding diode at 100mA and PID acting until 310 Kelvin 37 After that, so many tests have been performed trying to find and solve the problem when trying to cool using the DMX MosFet. Finally it has been discarded a problem with the Arduino reading from the analogue input pin when combined with the DMX devices. It has been discarded a problem with the Tinkerkit’s device output reading the same input current to the cooler with the next two graphics: As a final result, there are some sub-systems which work properly and some of them have been properly integrated. Moreover, there is a lot of information about the different tests performed and there are some conclusions about the development followed which are interesting for future developments. These conclusions are detailed in the “Conclusions and future development” chapter. Fig. 29 Laser temperature when cooler current from power supply Fig. 28 Laser temperature when cooler current from DMX MosFet 38 6. Budget In this part there are detailed the costs of the prototype until the project has ended. As it is an unfinished prototype the costs are not closed or the final ones. When the project will be finished, then should be performed a viability analysis. 6.1. Project costs Next there is a table with the costs of all the devices used during the project. It is important to notice that in the costs are not included some devices which have been used to test and will not be in the final system. An example of this could be the laser used to perform the tests or the power supply used during the project. Item# Name Type Description Cost 01 Arduino UNO Hardware Arduino board, UNO model 20€ 02 MATLAB License Software Student’s license 69€ 03 DMX Master Shield Hardware Shield for the Arduino board 20€ 04 DMX MosFet Receiver Hardware 4-mosfet device 46€ 05 Electronic Components Hardware Cables, Diodes, Resistors 15€ 06 Personal Time Hours dedicated 2880€* 07 Consultants Time Hours dedicated by supervisor 700€** TOTAL 3750€ Table 10 Project costs * Next is detailed the personal cost calculation based on the hours dedicated to the project by the student: 20 weeks * 18hours/week * 8€/hour = 2880€ ** In this part the supervisor advices and hours spent have been budgeted approximately 39 7. Conclusions and future development: There are some interesting conclusions extracted from this project which are explained next. The first conclusion and which has more impact during the project is that the DMX MosFet Receiver has not become the desired device. This system was chosen to solve the problems providing the need currents to control a laser which any Arduino board could provide. But the reality has been that this caused more problems than solved delaying important parts of the project and finally provoking an unfinished work. The solution proposed for future developments is to catch a MosFet transistor and characterize it to be controlled from the Arduino board providing the base voltage to control the laser’s sub-systems as the DMX is supposed to do. Once it is controlled and tested, Arduino sells plates easy to integrate with the different boards to weld the necessary components being easy to build a customized shield. Another important conclusion is the powerful of the Arduino-MATLAB communication viewed during the project. The level of communication achieved during the project is important for future developments to try to fulfill the main goal of control a more complex laser as a tuneable one. But it is not important only for this project and purpose; its powerful could be used in many projects which need more compute power or is required to implement an easy GUI to manage a system easily from the computer. Moreover it is very useful to collect and save data from sensors connected to an Arduino board and manage it to find different results. Then, it is important to notice that the first main goal is not achieved, but is not as far as it seems. It has not been able to control a laser from a computer through an Arduino board but when the problem with cooling the laser is solved there will be a PID which only had to be fine tuned for cooling to control a simple laser. With this consolidated, it is going to be easy to continue performing the necessary tests to control a tuneable laser and finally finish developing the GUI which is self-developed. Finally, as a main conclusion, it could be said that the project has not resulted as expected but there are some encouraging results which have to be taken into account to keep working on the project. The first goal for this project is very interesting and useful and it is important to keep working despite the difficulties to achieve it. 40 8. Bibliography: [1] V. M. Polo. “Contribution to the dynamic tuning of tunable laser sources for modulation and optical packet routing in WDM and access networks”, Department of Signal Theory and Communications, UPC, Spain, 2006 [2] E. Tous. “Diseño y puesta en marcha de un banco de medidas de caracterización de diodos láser semiconductores”, UPC, September 2010 [3] Gerard Recktenwald. “Temperature measurement with a Thermistor and an Arduino”, July 2010. [4] V. Chausse, J. Medina, A. Miguel, B. Molas, J. Sendra, A. Vidal. “Làser de femtosegons en forma de 8 basat en EFDA i controlat per Arduino”. UPC. [5] “Sistemas Eléctronicos de Control 1011a”. UPC, 2011 [6] http://allaboutee.com/2011/07/04/how-to-send-data-from-matlab-to-your-arduino/ [7] http://playground.arduino.cc/Interfacing/Matlab [8] http://playground.arduino.cc/DMX/DMXShield [9] https://felixmaocho.wordpress.com/2013/08/05/arduino-manejo-de-interrupciones/ [10] http://es.mathworks.com/help/control/ref/pid.html [11] https://code.google.com/p/tinkerit/wiki/DmxSimple [12] http://es.mathworks.com/help/control/ug/control-system-modeling-with-model- objects.html [13] http://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation [14] http://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method [15] http://en.wikipedia.org/wiki/PID_controller#Overview_of_methods [16] https://github.com/TinkerKit/DmxMaster [17] http://stackoverflow.com/questions/15229349/control-simulink-from-m-file [18] http://es.mathworks.com/hardware-support/arduino-matlab.html [19] http://es.mathworks.com/hardware-support/arduino-matlab.html [20] http://arduino.cc/en/Reference/AttachInterrupt [21] http://arduino.cc/en/pmwiki.php?n=Reference/AnalogReference [22] http://playground.arduino.cc/Main/PcInt [23] http://es.mathworks.com/help/matlab/ref/errordlg.html [24] http://arduino.stackexchange.com/questions/140/how-can-i-communicate-from- arduino-to-matlab [25] http://forum.arduino.cc/index.php?topic=45519.0 [26] https://github.com/TinkerKit/DmxMaster/blob/master/examples/FadeUp/FadeUp.ino [27] http://store.arduino.cc/product/T040060 [28] http://arduino.cc/en/Main/arduinoBoardDue