scieee AI-readable full text Open interactive document viewer

Equivalence of collimated light sources

Boukhris, Azza

Abstract

Ce projet a pour objectif de mener une étude comparative, à la fois numérique et expérimentale, dans le but de substituer une seule source lumineuse collimatée par deux autres sources, quel que soit l'angle d'incidence souhaité. Dans un premier temps, une étude théorique est effectuée en utilisant une approche mathématique afin de comprendre le comportement d’une seule source établie sous forme d'équations. Ensuite, les résultats obtenus à partir de la simulation du programme Matlab ont été interprétés tout en utilisant le principe de superposition. Par la suite, nous procédons à la conception minutieuse d'une structure en 3D. Cette structure a été modélisée à l'aide du logiciel CATIA V5, puis imprimée en 3D afin de positionner les différents composants électriques et mettre en évidence la régulation des LEDs, ainsi que le positionnement précis du capteur solaire, amorçant ainsi la phase de test. Enfin, une étude comparative a été effectuée pour vérifier la concordance entre les résultats théoriques et expérimentaux.

Full text

Author: Azza Boukhris Tutor: José Manuel Quero Reboul Final Master's Project Master's Degree in Aeronautics Equivalence of collimated light sources Dept. of Electronic Engineering Higher Technical School of Engineering University of Seville Seville, 2023 RESUME Ce projet a pour objectif de mener une étude comparative, à la fois numérique et expérimentale, dans le but de substituer une seule source lumineuse collimatée par deux autres sources, quel que soit l'angle d'incidence souhaité. Dans un premier temps, une étude théorique est effectuée en utilisant une approche mathématique afin de comprendre le comportement d’une seule source établie sous forme d'équations. Ensuite, les résultats obtenus à partir de la simulation du programme Matlab ont été interprétés tout en utilisant le principe de superposition. Par la suite, nous procédons à la conception minutieuse d'une structure en 3D. Cette structure a été modélisée à l'aide du logiciel CATIA V5, puis imprimée en 3D afin de positionner les différents composants électriques et mettre en évidence la régulation des LEDs, ainsi que le positionnement précis du capteur solaire, amorçant ainsi la phase de test. Enfin, une étude comparative a été effectuée pour vérifier la concordance entre les résultats théoriques et expérimentaux. Mots clés : Source lumineuse collimatée, Angle d’incidence, Principe de superposition, Régulation des LEDs, Capteur solaire. ABSTRACT This project aims to conduct a comparative study, utilizing both numerical and experimental methods, in order to replace a single collimated light source with two other sources at any desired incident angle. Initially, a theoretical analysis is conducted using mathematical techniques to comprehend the behavior of a single source described by equations. Subsequently, the outcomes obtained through the simulation of the Matlab program are interpreted while employing the principle of superposition. Following this, a meticulously designed 3D structure is created. This framework is modeled using CATIA V5 software and then created with a 3D printer to accurately position various electrical components and emphasize the regulation of the LEDs as well as the precise placement of the sun sensor to initiate the testing phase. Finally, a comparative study is undertaken to validate the consistency between the theoretical and experimental results. Keywords: Collimated light source, Incident angle, Principle of superposition, LEDs regulation, Sun sensor. Acknowledgements I thank above all, MY GOD, the Almighty who has showered me with his blessings and gave me enough strength and patience to go through all the hard times, to come to the end of this training and complete this work. I would like to extend my sincere thanks to the people who provided their help and who contributed to the development of this thesis as well as to the success of this wonderful academic year. First of all, my special thanks go to: I would like to express my gratitude to Prof. Dr. JOSE MANUEL QUERO REBOUL for the honor he attributed to agreeing to lead this work as well as for the precious directions they gave me. Its help and understanding were a real stimulus to complete this work. I owe him immense gratitude and great respect. I would also like to thank the members of the jury who agreed to take an interest in this work and gave us their expert judgment: • Mr. President of the jury who did me the honor of chairing the jury of my defense. • Mr. Examiner for having accepted with great enthusiasm to be the examiner of this work. It was a great source of pride for me. Finally, I would like to thank all the people who contributed to the success of my internship. To my family and friends who have given me the strength to continue and progress. thank you for your unconditional support. To my mother, thank you for being my inspiration and my strength Table of Contents General Introduction 1 Chapter 1: State of Art 3 1.1 Introduction 4 1.2 Collimated light sources 4 1.2.1 Definition 4 1.2.2 Operating mode 4 1.2.3 Sunbeams 5 1.2.4 Advantages 6 1.3 Sun Sensor 6 1.4.1 Working principle 7 1.4.2 Technical Characteristics 8 1.4.3 Incident Angle 9 1.5 Technical background and problem statement 10 1.5.1 Context of the project 10 1.5.2 Problem statement 11 1.5.3 Work requirement 11 1.6 Summary 12 Chapter 2: Theoretical Study 13 2.1 Introduction 14 2.2 Mathematical aspects 14 2.2.1 Single light source 14 2.2.2 Dual light sources 15 2.3 Matlab simulation 18 2.3.1 Basic features 18 2.3.2 Preprocessing 18 2.3.3 Simulation results 18 2.4 Proposed solution 19 2.5 Summary 20 Chapter 3: Mechanical and Electrical Design 21 3.1 Introduction 22 3.2 Mechanical conception 22 3.2.1 CATIA V5 22 3.2.2 General structure 22 3.2.3 Divided pieces 23 3.3 Ender-3 Pro 25 3.3.1 Method 25 3.3.2 Material 26 3.4 LED 26 3.4.1 Selection 26 3.4.2 Features 28 3.5 Temperature Control 28 3.5.1 Heat Sink 28 3.5.2 Fan 29 3.6 Electrical Circuit 30 3.6.1 ARDUINO 30 3.6.2 Schematic 30 3.6.3 Components 31 3.7 Summary 31 Chapter 4: Results and Interpretations 32 4.1 Introduction 33 4.2 Realization 33 4.3 Results 34 4.3.1 Constant Radiation 34 4.3.2 Radiation plot 36 4.3.3 Switch 37 4.3.4 Any Angle 38 4.4 Summary 38 Conclusion and perspectives 40 Bibliography 42 Appendix A 45 Appendix B 46 Appendix C 49 Appendix D 52 Appendix E 56 Appendix F 57 Appendix G 58 List of Tables Table 1: Technical specifications of NANO-ISS60 8 Table 2: Pin description 9 Table 3: Characteristics of the XHP70.2 LED 28 Table 4: Electrical components 31 Table 5: Constant radiation behavior 35 Table 6: Experimental results of switching angles 37 List of Figures Figure 1: Distinction between collimated and non-collimated light 4 Figure 2: Conversion of diverging light into a collimated beam 5 Figure 3: Principle of collimated light source using a lens 5 Figure 4: Sunlight collimation 6 Figure 5: Organizational approach for sun sensor types 7 Figure 6: NANO-ISSX Sun Sensor 7 Figure 7: Electrical interface of the sensor 8 Figure 8: Sun sensor for satellite application 10 Figure 9: Calibration system setup 10 Figure 10: GANTT Diagram 12 Figure 11: Projection of one light source into the sun sensor 14 Figure 12: Overlapped projection of two sources 15 Figure 13: Demonstration of the principle of superposition 18 Figure 14: Analyzing radiation uniformity in photodiodes 19 Figure 15: 3D Solution Design 20 Figure 16: Arc structure 23 Figure 17: Separated structures 24 Figure 18: Impression of the right side of the arc 25 Figure 19: Printed Structure 26 Figure 20: Spatial Distribution 27 Figure 21: LED lighting principle 27 Figure 22: Aluminum Heat Sink 29 Figure 23: MagLev system concept 29 Figure 24: Electrical circuit design 30 Figure 25: Electrical design 33 Figure 26: Conduction of electrical design tests 34 Figure 27: Effect of constant radiation and incident angular from a single source 35 Figure 28: LED evolution on variable radiation 36 Figure 29: Switching between different radiation and angles 37 Figure 30: Comparison between the experimental and the theoretical alpha 38 4 1.1 Introduction In this chapter, we define the concept of collimated light sources, their operating mode and also their advantages, as well as the principle of sun sensors. After that we illustrate the technical background of our project by explaining the context, problem statement and the work requirement that have to be accomplished. 1.2 Collimated light sources 1.2.1 Definition Collimated light sources are based on the concept of parallel beams for each additional ray [1]. In fact, the parallel rays propagate in a homogeneous medium with low beam divergence, ensuring that the light radius remains relatively constant during moderate propagation distances [2]. As a result, collimated light is considered to have an infinite focus point. In contrast, non-collimated light converges to a point where the beams cross, known as the focal point. This difference is exemplified in the accompanying Figure 1 [3]. However, this concept is useful in polarized neutron reflectometry for mapping purposes and star tracking. Figure 1: Distinction between collimated and non-collimated light 1.2.2 Operating mode In concept, we can collimate diverging lights from a point source using lasers such as laser diodes LD or lenses with wildly varying focal lengths f. By adjusting either the distance or the thickness of the lens, the characteristics of the radiation can be significantly changed. To reduce this effect, two parameters should be modified [1]: ● The focal length of the collimating device. ● The size of the light source. Figure 2 [3] below illustrates that increasing the focal length leads to a larger beam diameter, which is necessary to obtain flat and collimated wave fronts [2]. Chapter 1 State of Art 5 Figure 2: Conversion of diverging light into a collimated beam The lens is situated at a focal distance f from the light source, which might be a light-emitting diode LED. It emits a beam formed by bundles of parallel rays that can overlap simultaneously and form a beam spot waist as shown in Figure 3. Every luminous ray intersects the optical axis z at a distinct angle β, which can be measured by monitoring the sensor [4]. These sensors transform source position into angle information to track incident angles and radiations [5]. Figure 3: Principle of collimated light source using a lens Besides, the sensor surface ought to be perpendicular to the emitting rays in order to fully utilize the light energy [6] such as the thicker line presented in the above figure. 1.2.3 Sunbeams The sun's light travels a vast distance of 93 million miles through space before it reaches the Earth [7] as indicated in Figure 4. For this reason, rays are almost parallel to one another, with a maximum angle of approximately 0.5 degrees. This results in collimated light, meaning that most of the light is focused in one direction without scattering or reflecting [8]. Chapter 1 State of Art 6 Figure 4: Sunlight collimation [9] In accordance with the fact that the sun plays a crucial role in a satellite's lifespan, serving as a reference point for attitude control, and due to its broad spectrum and high intensity, it is essential to use transducers to accurately detect its position, such as sun sensors. These devices work by measuring the projection of the sun's rays on the detector plane, which is directly proportional to the intensity of the light received [5]. Moreover, being that the angular distribution of sunlight may not be applicable for some cases in experiments, such as the calibration system setup of satellite attitude control, it is necessary to have another alternative, such as a solar simulator or powerful LEDs that are capable of replicating accurate outcomes similar to the sunbeam radiation [8]. 1.2.4 Advantages According to the rapid expansion of industrial technology all around the world, collimated light sources have been extensively used in several domains of scientific study and industry [10], such as satellite communications, angle measurement and even medical science in light of the fact that they contribute to [6]: ● Maximize effective use of light's radiation to have strong directivity. ● Reduce the energy losses in the emitting systems. ● High brightness. One of the most relevant applications of collimated light is to calculate the direction of the sun or a star tracker. It is crucial to use a solar simulator that emits collimated beams with minimal divergence, calibrated with a sun sensor within a few degrees of precision. Another phenomenon that is closely related is that of Fresnel reflection, which occurs whenever light meets a material contact [8]. 1.3 Sun Sensor Sun sensors are devices that detect the position of the Sun relative to the sensor's location. Over the years, different types of sun sensors have been developed and enhanced. Furthermore, the classification of sensor’s sun position is generally based on the type of Chapter 1 State of Art 7 sensors, signals, data transmission, and solar tracking direction. For this reason, the classification is depicted in Figure 5 [6]. In this project, we made use of the analog Sun Sensor NANO-ISSX developed by Solar MEMS Technology. Figure 5: Organizational approach for sun sensor types [6] 1.4.1 Working principle This type of sensor consists of various optoelectronic modules, and the optical sensing elements are its most essential component. These elements, which include photodiodes such as OPR5911 and an operational amplifier, play a crucial role in this process [11], as they are integral to converting incoming photons into electrons while generating electrical currents to transmit the optical information acquired from the sun's rays. At this stage, the photosensitive cells measure the intensity of the light detected, providing valuable data for calculating the incident angle for both axes [12]. However, this type of photodiode boasts an impressive responsivity of 0.45 mA/mW, exhibiting a linear relationship between the generated current and the light's power. This level of precision allows accurate calculations in close proximity. Figure 6 exposes the sun sensor used during the experiments [11]. Figure 6: NANO-ISSX Sun Sensor [13] Sun position sensor Types Collimating sensors Single detection Four quadrant detection Sun pointing sensors Hybrid sensors Data transmission Conventional sensor Wireless networking Chapter 1 State of Art 8 1.4.2 Technical Characteristics Given that this type of sensor has different fields of view, such as 60, 25, 15, and 5, we worked with the NANO-ISS60 version. This choice was based on its ability to capture a wider field of view and different angle values with high precision to obtain a more comprehensive understanding of the subject matter. These characteristics are expressed in Table 1 below [13]. Table 1: Technical specifications of NANO-ISS60 Sensor type NANO-ISS60 Axes X and Y Fields of view FOV 120x120° Average consumption 5mW Industrial temperature range -40° to 85°C Wide operating voltage range 3,3÷12 V Dimensions (L×W×H) 18×18×3,85 In addition to Figure 7, which shows the sensor's electrical interface, the description of each parameter is also detailed in Table 2, providing a comprehensive understanding of its functionality [13]. Figure 7: Electrical interface of the sensor Chapter 1 State of Art 9 Table 2: Pin description Pin Symbol Description 1 VPH3 Lower-right photodiode voltage (3) 2 VPH4 Upper-right photodiode voltage (4) 3 GND Ground 4 VCC Power supply 5 VPH1 Upper-left photodiode voltage (1) 6 VPH2 Lower-left photodiode voltage (2) 1.4.3 Incident Angle This angle can be calculated into a set of equations employing the four photodiodes voltages of the sensor VPH1, VPH2, VPH3 and VPH4 with a constant parameter C that varies depending on the type of sensor. Given that the sensor has two axes, the angle of incidence can be expressed by the x axis, as shown in the equations below [13]. X1= VPH3+VPH4 (4-1) X2= VPH1+VPH2 (4-2) Fx= X2−X1 X2+X1 (4-3) Angle X= arctg(C.Fx) (4-4) For the Y axis, the incident angle can be written as: Y1= VPH1+VPH4 (4-5) Y2= VPH2+VPH3 (4-6) Fy= Y2−Y1 Y2+Y1 (4-7) Angle Y = arctg(C.Fy) (4-8) Chapter 1 State of Art 10 1.5 Technical background and problem statement 1.5.1 Context of the project Solar MEMS Technologies sun sensor is a vital component for regulating the orientation of satellites and space vehicles as presented in Figure 8, such as the Spanish satellite Nanosat 1B, launched in July 2009 [14]. The sensor's primary function revolves around accurately detecting the position of the sun by measuring its incidence angle with regard to a reference surface [12]. Figure 8: Sun sensor for satellite application In addition, to calibrate the system setup in the experiments, a solar simulator generates collimated light in order to illuminate the sensor. As shown in the following Figure 9, the sun sensor is localized in the center of the light emission and equipped with two motorized rotary stages to measure the incident light in both axes X and Y [15]. Figure 9: Calibration system setup Chapter 1 State of Art 11 1.5.2 Problem statement In some situations, it may be quite difficult to assess the operation of the sun sensor during the installation on the satellite with only a hand-operated torch. Another application of this concept could be its use during the calibration of the system setup. Given that the sun sensor rotates with two motorized rotary stages to determine the incident angle of collimated sun rays, it could be impossible to use three huge solar simulators to study the equivalence of collimated light sources. Taking this into account, it is vital to provide a practical and low-cost method to control it effectively. 1.5.3 Work requirement The main objective of this project is to prove that a single collimated light source can be replaced by two illuminating sources at any incident angle. To validate this approach, two relevant parameters have to be considered:  Calculate the radiation of two lighting emissions.  The use of a solar MEMS sun sensor. In this context, we have devised a structural design that forms an arc composed of three illuminations, which are aligned by three lenses. The three devices are attached to a transition piece positioned on the arc. Moreover, the collimated light focus F1 and F2 of the first and second alternative sources, known as AS1 and AS2, are fixed at specific angles, while the replaced source's focus F is adjusted in an intermediate position between them by adding holes of varied angles. The required tasks that we have to accomplish are as follows: ● Mathematical studies and MATLAB simulation to demonstrate that we can create a superposition of two sources at variable angles and still achieve identical values as a single source. ● 3D structural design using CATIA V5 with well-defined distances and angles to hold all the lighting sources pointing at the sun sensor. ● 3D ENDER printer to have the whole structure in reality for the experimental testing. ● Realization of a power electrical circuit and digital electronic microprocessor applying Arduino Mega 2560 to regulate and define the radiation of the LEDs. ● Comparison of the theoretical results and the experimental data using MATLAB and a digital microprocessor. Chapter 1 State of Art 12 The GANTT chart presented in Figure 10 provides a comprehensive overview of the timeline for completing each task in this project. Figure 10: GANTT Diagram 1.6 Summary In this chapter, we showed the way to meet the requirements of our project as well as an overview that needs to be maintained. In the upcoming chapter, we will explore mathematical modeling and the 3D conception of the proposed solution. Chapter 2: Theoretical Study Chapter 2 Theoretical Study 20 base to ensure displaying data. In addition, regarding this structure the three LEDs are going to be positioned in the upper section of the arc through specially designed holes. While LED 1 which is equivalent to AS1 in the previous chapter is fixed at the midpoint of the arc in such a way that it is perpendicular to the center of the sensor, LED 2 which is linked to AS2 is going to be located at a lower angle while emitting less intense light. On the other hand, LED that corresponds to the replaced source will be placed between these two precedents so that the sensor will be able to carry out the superposition. Figure 15: 3D Solution Design Furthermore, to ensure proper control and prevent any damage due to overheating, the electrical circuit will be designed using electrical components arranged on a perforated prototype. This arrangement is crucial for effectively regulating the LEDs power and preventing them from burning out, bearing in mind the use of the sensor, as it serves to detect the diverse radiations emitted. However, the outcomes of our experiments will be determined by analyzing the data obtained through an Arduino code, which is programmed to conduct and evaluate various tests. By leveraging this comprehensive framework, we aim to attain accurate and reliable measurements that will significantly contribute to our understanding of the subject matter at hand. 2.5 Summary After having determined the expressions of the radiations R1 and R2 through the establishment of the mathematical equations and the simulation's interpretations while using the principle of superposition, the theoretical feasibility of the project is approved. The next chapter deals with the mechanical and electrical designs of our solution essential to the study of the experimental test phase Chapter 3: Mechanical and Electrical Design Chapter 3 Mechanical and Electrical Design 22 3.1 Introduction This chapter illuminates in the first stage a comprehensive 3D design of the arc structure while utilizing CATIA V5. We presented the cuts within the structure alongside a thorough description of the 3D printing technique. Furthermore, we identified the essential components, such as the sun sensor and the LEDs, in addition to other devices. Transitioning to the second part, we introduce the electronic aspect, providing a brief overview of the Arduino software used in this project as well as a detailed exploration of the electrical circuit and its constituent components. 3.2 Mechanical conception 3.2.1 CATIA V5 CATIA V5 is a software program created by Dassault Systems that is globally recognized for facilitating the designs. As a comprehensive computer-aided design CAD system, it offers an array of advanced 3D modeling tools specifically designed for tackling complex product designs across various industries, including aerospace. This integrated software encompasses a wide range of functionalities, supporting technical preparation for production by enabling tasks such as [17]:  The generation of drawings.  The creation of specifications.  The formulation of control programs for computer numerical control CNC machines. 3.2.2 General structure In the following part, we introduce the 3D conception of the maintained structure using CATIA V5. The result of this meticulous process is thoughtfully showcased in the Assembly Drawing, where every intricate detail of the structure is vividly portrayed. In fact, we have developed an arc structure with various holes incorporated into the upper part of the arc ranging from 0° to 55°, as shown in Figure 16. This design was created with the intention of conducting multiple tests, taking into account that the maximum angle detected by the FOV sensor, is 60°. By including holes at different angles, we can test the accuracy and effectiveness of the sensor from various viewpoints to be able to calculate different radiations and incident angles for the substituted LED. In addition, we realized three transition pieces fixed in the arc by screws and nuts to cover three important devices, while each of them contains an extremely high power LED, a radiator, a small fan, and a lens to ensure the generation of collimated lights. Chapter 3 Mechanical and Electrical Design 23 Those structures are positioned as follows: ● Transition piece 1: Fixed frameworks containing LED 1, which emits focus F1. It has to be centered as well as aligned with the sun sensor, to maximize radiation output. Consequently, it is precisely positioned at 0° in the middle of the arc. ● Transition piece 2: To maintain stability, a stationary framework incorporates the LED 2 which is tasked with the focus F2. This transition piece is situated at 35° to produce less radiation compared to the previous component. ● Transition piece 3: It is a mobile structure that holds the LED capable of adjusting angles from 0° to 35° in 5° increments, allowing the focus F to be directed at various angles and measure multiple radiation sources. Figure 16: Arc structure Analogous to mathematical calculations, we synchronize the simultaneous activation of LEDs 1 and 2, positioning them strategically in fixed locations with well determined angles of incidence. With this arc structure we studied how the superposition of two focuses can affirm that LED maintains an identical angle of incidence and consistent radiation properties. 3.2.3 Divided pieces When it comes to experimental studies, the positioning of components is a crucial aspect that can significantly impact the reliability of the results. In this regard, the orientation of the LEDs plays a critical role in determining how they interact with the sensor. As an example, positioning transition piece 1 in a perpendicular manner at the center of the sensor frame contributes significantly to the refinement of measurement precision. Conversely, the placement of transition piece 2 in the upper section of the arc introduces potential impacts on the outcomes, as it exhibits a lower incident angle compared to transition piece 1, as well as lower radiation intensity. Therefore, localizing the sensor at the center, Chapter 3 Mechanical and Electrical Design 24 affixed by double-sided tape to guarantee its fixation, is necessary to have effective readings when used alongside the upper devices featuring LEDs. Due to the inability of the 3D printer to print the whole structure, we performed the four cuts presented in the Drawing Sheet. The arc structure is divided into four parts in the 3D layout, as shown in Figure 17, while containing the transition pieces for the three lights emitting. The separated parts are presented as follows: ● Sensor frame. ● Upper part of the arc. ● Left cut of the arc. ● Right cut of the arc. (a) (b) (c) (d) Figure 17: Separated structures: (a) Sensor frame; (b) Upper piece of the arc; (c) Left/Right piece of the arc; (d) Transition piece; Chapter 3 Mechanical and Electrical Design 25 3.3 Ender-3 Pro The Ender-3 Pro is a fused deposition modeling referred to FDM type printer. This technique is aptly named, as it involves the deposition of fused material in layers to create a final product. Additionally, users can create complex designs with ease, allowing for rapid prototyping and inexpensive manufacturing of custom products [18]. 3.3.1 Method To accommodate the large arc design in CATIA V5 and the limited size of the 3D printer, which was 220x220x250mm, the arc structure was divided into different parts for easier printing. The design was then saved in STL format to store the 3D geometry of an object. Next, this file was imported into UltiMaker Cura 5.2.2, which is slicing software that prepares the model for printing by generating a G-code file. This code contains instructions for the printer, guiding its movements and filament extrusion to create the final structure. The image presented in Figure 18 depicts the completed printing of the right side of the arc structure once the printer finalizes its operation. Figure 18: Impression of the right side of the arc Chapter 3 Mechanical and Electrical Design 26 3.3.2 Material The research focused on using a high-quality thermoplastic polymer known as Polylactic Acid PLA. In addition, it is considered as a biodegradable polyester material that can be derived from renewable sources such as tapioca roots, sugarcane, or cornstarch. The raw material has a diameter of 1.75mm and melts at 220°C during the printing process [18]. As shown in Figure 19, the arc structure was attached to a double sided acrylic glass, in order to keep away from unexpected movement which could lead to inaccurate results or potential damage. Besides, the findings of this printing are expected to assemble the whole divided piece to be able to set the electrical components and finally perform experimental tests. Figure 19: Printed Structure 3.4 LED To guarantee optimal connection of the wires, the positive and negative terminals of each LED utilized in the experiment were carefully covered with a thin layer of tin through a specialist soldering device that carried out this operation. In addition, to collimate the light emitted from the LEDs, we made use of curved glass lenses, which are optical devices designed to modify the divergence of illuminating rays. The lenses used in the laboratory have the ability to convert divergent light into collimated light, which is an essential aspect of our work [3]. 3.4.1 Selection Built on Cree LED’s extreme high power technology, the XHP70.2 LED provides a cost-effective solution with high lumen density, reliability, and color consistency in a compact 7.0mm x 7.0mm package [19]. Chapter 3 Mechanical and Electrical Design 27 Given that the lights emitting used in this project are configurable at 12V, the distribution of their illumination in a given space is presented in the following Figure 20. Figure 20: Spatial Distribution [20] The principle of illumination is based on the fact that the maximum intensity of radiation is received at the center, while other light diffuses on the right and left sides with less significant intensities, as illustrated in Figure 21. In addition, this type of LED is widely used as a flashlight and high-bay lighting for commercial and industrial applications, given that it provides a concentrated beam of light. Figure 21: LED lighting principle [21] Chapter 3 Mechanical and Electrical Design 28 3.4.2 Features The features of the XHP70.2 LED are presented in Table 3 as shown below. Table 3: Characteristics of the XHP70.2 LED [19] Configuration 12V by PCB layout Typical Direct Voltage For 12V: 11.2V Maximum Direct Current For 12V: 2400mA Maximum Power 29W Maximum Light Output 4292 lm (48W) Low Thermal Resistance 0.3 °C/W Unlimited Floor Life ≤ 30ºC/85% RH Junction Temperature 150°C Binning 85 °C Wide Viewing Angle 125° 3.5 Temperature Control During the testing phase, an issue arose which is the excessive heat generated by the LEDs, due to its similarity to the light emitted by the sun, the overheating was so severe that it caused tin soldering in the cables, rendering them useless. To mitigate this problem, it is essential to maintain an optimal temperature. One of the most effective ways is to use a heat sink and a fan. This method is not only efficient but also cost-effective, as it helps to ensure the longevity of the LEDs and reduces the need for repairs. 3.5.1 Heat Sink Heat sinks are commonly used in electronic devices to absorb and distribute heat generated by components such as LEDs. In the experiments conducted, we used this reference, DFFIT0223 as depicted in Figure 22, which is made of high-quality aluminum and measures 30x30x10mm. The lighting sources were glued to the back of the heat sink given that it Chapter 3 Mechanical and Electrical Design 29 contains a thermal adhesive tape called 3M-8810, which can be easily removed through a blue protective film. This method is not only efficient but also cost-effective, as it helps to ensure the longevity of the LEDs and reduces the need for frequent replacements or repairs [22]. Figure 22: Aluminum Heat Sink 3.5.2 Fan The purpose of using fan is to push the hot air far away from the LED to prevent the component from overheating and malfunctioning. The expulsion of heat into the surroundings helps the fan regulate the temperature and maintain the reliability of the component. We opted for the MagLev technology motor fan MF-30060V1-1000U-A99 due to its superior efficiency compared to traditional fan motors. This is attributed to the elimination of abrasions that cause noise, reducing the sound by 23.6 dB(A). The fan's airflow is 4.9 CFM, and it has a rated voltage of 5 VDC with a rated power consumption of 0.56 WATTS (max. 0.65 WATTS). This system attaches the rotor along the entire 360-degree surface, ensuring stable rotation. Furthermore, the standard magnetic flux is perpendicular to the magnetic flux, making it even more powerful [23] as depicted in Figure 23. Figure 23: MagLev system concept Chapter 4 Results and Interpretations 36 4.3.2 Radiation plot Our focus then shifted to studying the effects of the incident angle by varying the radiation output of LED, ranging from 0 to 200, which constitute 78.5% of the total radiation. To collect experimental data, we made use of the sun sensor and the Arduino serial plot, as expanded in Appendix C. Based on the results shown in Figure 28, it can be concluded that the incident angle remains constant despite the type of radiation being emitted. It is interesting to note that the experimental angle E_Alpha for LED stabilizes at 15°, which corresponds to its position within the arc. This implies that the evolution of radiation R is independent of the sensor parameter, and the two factors can be treated as unrelated. Furthermore, the low energy detected by the sensor is responsible for the noises as observed in the next figure. Figure 28: LED evolution on variable radiation Therefore, the sensor that detects low energy levels and a low pass filter has a relationship due to the fact that a low pass filter can help reduce the noise caused by low energy given that it can be deployed to eliminate high-frequency signals while permitting low frequency signals to pass through. This can improve the accuracy of the sensor readings and provide more reliable data. However, it is important to note that a low-pass filter cannot completely Chapter 4 Results and Interpretations 37 eliminate all noise and that regular monitoring and maintenance of the sensor are still necessary to ensure optimal performance. 4.3.3 Switch After confirming the effect of constant and changing radiation with the angle of incidence, we proceed to the most crucial verification performed in Appendix D, which is the conformity of the mathematical calculations presented in Figure 13 in chapter 2 and the performed tests. Initially, we set R1 and R2 with different radiations that accounted for approximately 92 and 65, which represent 36% and 26% of the whole radiation, respectively as shown in Table 6. Table 6: Experimental results of switching angles R1 R R2 VPH1 VPH2 VPH3 VPH4 E_Alpha 92 0 65 0,5784 0,7474 0,882 0,679 15,2859 0 150 0 0,5791 0,7463 0,8798 0,6771 15,2394 92 0 65 0,536 0,6999 0,7611 0,5813 15,6564 0 150 0 0,5794 0,7464 0,8794 0,6775 15,2086 Throughout those experiments, we kept R at 0. Following that, to avoid sensor saturation and ensure precise results, we switched the method and gave R a specific radiation of 150 while keeping the other two radiations at 0. As observed in Figure 29, the superposition of two radiation sources, which are in our case R1 and R2 leads to the same experimental angle E_Alpha of R. Figure 29: Switching between different radiation and angles 0 50 100 150 200 15.2859 15.2394 15.6564 15.2086 R1 R R2 E_Alpha R1, R, R2 Chapter 4 Results and Interpretations 38 For instance, in our experiment, LED was substituted for LEDs 1 and 2, and the resulting angle was approximately 15°. This example illustrates how the concept of replacing a single collimated source with multiple focuses can be effectively applied in practical experiments. 4.3.4 Any Angle After all the verifications made in the previous codes, we made a program in MATLAB presented in Appendix E in order to affirm that the sensor would provide at any given angle the same experimental value of E_Alpha as the theoretical angle of the LED titled T_Alpha. To accomplish this, a program was developed using the initial program presented in Appendix A with some necessary modifications. In fact, a matrix was created at a margin of 0 up to 35°, containing T_Alpha, R1, and R2. The matrix was then integrated into the Arduino code revealed in Appendix F to observe and analyze the behavior of the experimental and theoretical angles. This was the ultimate goal of this program, and its successful execution would ensure the accuracy of the applicability of this project. Based on the data illustrated in Figure 30, it can be inferred that the obtained results are indicative of a high level of precision. Consequently, we can successfully conclude that the two angles are almost parallel, given that the errors are minimal (around 1.4°) and it can be related to factors such as the structure’s nature and materials, as well as the fixing mechanism used. Figure 30: Comparison between the experimental and the theoretical alpha 4.4 Summary Upon extensive examination of radiation behavior as well as angles of incidence during the emission of one single and multiple lighting sources, specifically positioned within the arc 0 20 40 60 80 100 120 140 160 010 20 30 40 R1 R2 E_Alpha T_Alpha R1,R2 T_Alpha, E_Alpha Chapter 4 Results and Interpretations 39 structure and simulated while using precise codes, we ultimately succeed in demonstrating the close similarity between mathematical predictions and experimental findings. This remarkable agreement is observed with a marginal discrepancy of approximately 1.5°, affirming the accuracy and reliability of the results obtained. 40 Conclusion and perspectives The goal of this research was to examine the equivalence of collimated light sources, both theoretically and experimentally. The initial focus involved integrating the principle of superposition by employing equations, which precluded the need for a figure projection. It was crucial to make certain assumptions and estimates to facilitate the study. Furthermore, it was necessary to compare the simulated results from mathematical equations with test experiments, to ensure accurate validation. This validation was crucial to proving the precision and efficacy of the used sun sensor, thereby building trust in its calibration setup. Throughout the course of this project, we successfully validated the accuracy of the mathematical equation through simulation. Additionally, we commenced the testing phase by generating a 3D arc structure design, which was printed later on. This structure enables us to strategically position diverse electrical components, serving the purpose of preventing the overheating of the three LEDs while ensuring collimation through lenses. Subsequently, we initiated the testing phase by meticulously arranging all the components based on an electrical schematic, which is essential for regulating the functionality of the LEDs. These sequential procedures were indispensable in establishing a reliable connection between the sun sensor and the Arduino board. To achieve this, we meticulously developed multiple codes, aiming to ascertain the viability of each substitution and evaluate their compatibility with the required steps as well as the existing codes. As this project serves as a proof of concept, the comparative analysis shows that the data can be considered reliable. As results, the preliminary findings have been numerically and experimentally validated, indicating that it is feasible to substitute a single collimated light source with two others while maintaining nearly identical radiation as well as incident angles. This assertion has been fully verified in the last Arduino code, in which we incorporated certain margins of incident angles that the Matlab program accompanied with their respective radiations, such as R1 and R2. However, the acquired results are closely matched with the predicted ones, giving a minimal error margin of only 1.5 degrees. Given that this work was undertaken using a 2D approach to prove its viability in real life settings through a proof of concept. Moving forward, future aerospace activities would greatly benefit from taking into account the significance of calibrating this specific type of sun sensor from Solar MEMS Technology prior to its integration into satellites. Although the 41 mathematical equations will undergo enhancement with the implementation of a 3D approach, which boils down to the fact that instead of relying on three light sources, the revised methodology incorporates five LEDs, necessitating an exhausted examination of methods to minimize the structure required to accommodate all the electrical devices, while the fundamental principle remains unchanged. 42 Bibliography [1] Considerations in Collimation | Edmund Optics. www.edmundoptics.com. Online. [Accessed 28 April 2023]. Available from: https://www.edmundoptics.com/knowledgecenter/application-notes/optics/considerations-in-collimation/ [2] PASCHOTTA, Dr Rüdiger. Collimated Beams. www.rp-photonics.com. Online. [Accessed 28 April 2023], Available from: https://www.rp-photonics.com/collimated_beams.html [3] ALTMAN, David , 2009. Detection of Fluorescence from Single Molecules Online. [Accessed 1 May 2023]. Available from: https://web.stanford.edu/class/chem184/manual/LabProtocols2.pdf [4] Beam Spots (Waists) in White Light Output by a Collimating Lens, 2021. www.thorlabs.com. Online. [Accessed 1 May 2023]. Available from: https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=14510 [5] GUO-DONG, Xu, JIAN, Chen, et ZHEN-DONG, Xu. Research on high precision measurement of sun rays vectors. In: 2010 First International Conference on Pervasive Computing, Signal Processing and Applications. IEEE, 2010. p. 998-1000 [6] SALGADO-CONRADO, Lizbeth. A review on sun position sensors used in solar applications. Renewable and Sustainable Energy Reviews, 2018, vol. 82, p. 2128-2146 [7] EDDY, John A. The sun, the earth, and near-earth space: a guide to the sun-earth system. Government Printing Office, 2009 [8] OPTICS, G2V, 2022. Angle of Emission - Collimated light source Explained. G2V Optics Inc. Online. 10 March 2022. [Accessed 5 May 2023]. Available from: https://g2voptics.com/angle-of-emission/ [9] OPTICS & PHOTONICS, Elise M. Strobach and NEWS NOVEMBER, Svetlana V. Boriskina, 2018. Daylighting Online. [Accessed 5 May 2023]. Available from: https://www.optica-opn.org/opn/media/Images/PDF/2018/1118/24-31_OPN_11_18.pdf?ext=.pdf [10] CHANG-QING, Cao, TING, Wang, XIAO-DONG, Zeng, et al. The analysis of divergence angle of collimated beams. Optik, 2017, vol. 135, p. 305-307. [11] HOLLANDER, K. J. C. Modeling and characterizing a sun sensor for nano satellites. 2017. Thèse de baccalauréat. University of Twente 43 [12] GERMÁN SANTAMARÍA, 2021. How sun sensors work | Solar MEMS. Solar MEMS. Online. 27 September 2021. [Accessed 15 May 2023]. Available from: https://www.solarmems.com/how-sun-sensors work/#:~:text=These%20photosensitive%20units%20work%20by [13] MRH, 2014. NANO-ISSX Technical Specifications Sun Sensor NANO-ISSX/c Technical Specifications Features Online. [Accessed 17 May 2023]. Available from: http://www.solarmems.com/smt_pdf/NANO_Technical_Specifications.pdf [14] DELGADO, Francisco J., QUERO, J. M., GARCIA, J., et al. SENSOSOL: MultiFOV 4- Quadrant high precision sun sensor for satellite attitude control. In : 2013 Spanish Conference on Electron Devices. IEEE, 2013. p. 123-126. [15] DELGADO, Francisco J., QUERO, Jose M., GARCIA, Juan, et al. Accurate and wide-field- of-view MEMS-based sun sensor for industrial applications. IEEE Transactions on Industrial Electronics, 2012, vol. 59, no 12, p. 4871-4880. [16] MATLAB - MathWork. ch.mathworks.com. Online. [Accessed 1 June 2023]. Available from: https://ch.mathworks.com/products/matlab.html [17] LYASHENKO, Vyacheslav, SOTNIK, Svitlana, and MANAKOV, Volodymyr. Modern CAD/CAM/CAE Systems: Brief Overview. 2021. [18] HAQUE, Md Sabit Shahriar. Minimizing Stringing Issues In FDM Printing. ResearchGate [online], 2020, vol. 2, p. 8. [19] PRODUCT FAMILY DATA SHEET XLamp ® XHP70.2 LEDs PRODUCT DESCRIPTION, 2021. Online. [Accessed 5 June 2023]. Available from: https://www.mouser.fr/datasheet/2/723/ds_XHP702-2326690.pdf [20] SCULLY, Taylor, 2016. Spatial Distribution Cree XP-G2 LED - LEDSupply Blog. Online. 22 January 2016. [Accessed 5 June 2023]. Available from: https://www.ledsupply.com/blog/ledoptics-explained/capture-4/ [21] IQUARKLIGHTING, 2019b. Understanding the beam angle of Led lighting products. Iquarklighting. Online. 10 January 2019. [Accessed 7 June 2023]. Available from: https://www.iquarklighting.com/understanding-the-beam-angle-of-led-lighting-products/ [22] AL Heat Sink (With adhesive tape) - 30*30*10mm. www.robot-domestici.it. Online. [Accessed 7 June 2023]. Available from: https://www.robot-domestici.it/joomla/home/al-heat- sink-with-adhesive-tape-303010mm 44 [23] MOKHAMMAD SANPRADIPTO JALUNTORO, 2019. Vapo Bearing Maglev Technology | PDF | Bearing (Mechanical) | Friction. Scribd. Online. November 2019. P. 11. [Accessed 7 June 2023]. Available from: https://fr.scribd.com/document/237961514/Vapo- Bearing-Maglev-Technology [24] ARIAWAN, K. U., SANTYADIPUTRA, G. S., et SUTAYA, I. W. Design of Hexapod Robot Movement Based on Arduino Mega 2560. In: Journal of Physics: Conference Series. IOP Publishing, 2019. p. 012011. 45 Appendix A – Normalized radiation of two sources MATLAB Code function [R1,R2] = Two_focuses(Alpha1,Alpha2) clc ; close all ; clear all %R=1; Standardized radiation Alpha1 = 0; %Degrees Alpha2 = 45; %Degrees %Alpha is the theoretical angle varied between Alpha1 and Alpha2 from grade to grade Alpha = Alpha1:1:Alpha2; R1 = (sind(Alpha) - cosd(Alpha) * sind(Alpha2)/cosd(Alpha2))... /(sind(Alpha1)- cosd(Alpha1) * sind(Alpha2)/cosd(Alpha2)); R2 = (sind(Alpha) - cosd(Alpha) * sind(Alpha1)/cosd(Alpha1))... /(sind(Alpha2)- cosd(Alpha2) * sind(Alpha1)/cosd(Alpha1)); figure ('Position', [100 200 600 500]); plot(Alpha,R1,Alpha,R2) xlabel('Alpha') ylabel('Radiation of R1 and R2') grid on legend ('R1/R','R2/R'); title ('Superposition of Ri/R'); %Check that the output sum is 1 Ra = (R1*cosd(Alpha1)+R2*cosd(Alpha2))./cosd(Alpha); Rb = (R1*sind(Alpha1)+R2*sind(Alpha2))./sind(Alpha); figure('Position',[700 200 600 500]); plot(Alpha,Ra,Alpha,Rb) xlabel('Alpha') ylabel('Radiation of Ra and Rb') grid on legend ('Ra','Rb'); title('Uniformity Verification'); end 52 Appendix D – SWITCH int Value1,Value2,Value3,Value4; float VPH1,VPH2,VPH3,VPH4 ,Y1,Y2,Fy; double E_Alpha; int R1=92; //Percentage of radiation LED 1 at 90° int R=0; //LED at 15° int R2=65; // LED 2 at 35° //Defining of four low-pass filters for each output voltage of photodiodes in order to reduce noise and to have more accurate results #define FILTER_CONST (float) 0.01 //Execution timing of the filter float filter1(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } float filter2(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } float filter3(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } float filter4(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; 53 return y; } void setup() { Serial.begin (115200); // OUTPUTS pinMode (8,OUTPUT); //Configuration of LED 1 in PWM pinMode (7,OUTPUT); //Configuration of LED in PWM pinMode (6,OUTPUT); //Configuration of LED 2 in PWM //INPUTS pinMode (A0,INPUT); //Configuration of VPH1 as an Input pinMode (A1,INPUT); //Configuration of VPH2 as an Input pinMode (A2,INPUT); //Configuration of VPH3 as an Input pinMode (A3,INPUT); //Configuration of VPH4 as an Input } long int count=0; //Initialization of the counter bool mode=0; void loop() { count++; if (count > 2000) //2000ms is the execution timing between each instruction in serial monitor { count=0; prn(); if (mode==0){ R1=92; R=0; R2=65; mode=1; }else{ R1= 0; R=150; R2= 0; mode=0; } } 54 analogWrite(8,R1); //Write the analog value of radiation 1 for LED 1 to pin 8 analogWrite(7,R); //Write the analog value of radiation for LED to pin 7 analogWrite(6,R2); //Write the analog value of radiation 2 for LED 2 to pin 6 //Convert the analog value of VPH1 to digital Value1 = analogRead(A0); VPH1 = ((float)Value1*5.0/1023.0) ; VPH1=filter1(VPH1); //Convert the analog value of VPH2 to digital Value2 = analogRead(A1); VPH2 = ((float)Value2*5.0/1023.0) ; VPH2=filter2(VPH2); //Convert the analog value of VPH3 to digital Value3 = analogRead(A2); VPH3 = ((float)Value3*5.0/1023.0) ; VPH3=filter3(VPH3); //Convert the analog value of VPH4 to digital Value4 = analogRead(A3); VPH4 = ((float)Value4*5.0/1023.0) ; VPH4=filter4(VPH4); } void prn() //Print { Serial.print(" R1= "); Serial.print(R1); Serial.print(" R= "); Serial.print(R); Serial.print(" R2= "); Serial.print(R2); Serial.print(" VPH1= "); Serial.print(VPH1,4); //Display 4 decimal for voltage VPH1 Serial.print(" VPH2= "); Serial.print(VPH2,4); //Display 4 decimal for voltage VPH2 Serial.print(" VPH3= "); Serial.print(VPH3,4); //Display 4 decimal for voltage VPH3 55 Serial.print(" VPH4= "); Serial.print(VPH4,4); //Display 4 decimal for voltage VPH4 Y1= VPH1+VPH4 ; Y2= VPH2+VPH3 ; Fy= (Y2-Y1)/(Y2+Y1) ; E_Alpha = 236.5*Fy*Fy*Fy - 245.0*Fy*Fy + 136*Fy + 1.322; //Polynomial equation Serial.print(" Fy="); Serial.print(Fy,4); //Display 4 decimal Serial.print(" E_Alpha= "); Serial.println(E_Alpha,4); //Display 4 decimal for the experimental alpha of LED } 56 Appendix E – Modulated radiation of two sources MATLAB Code function [R1,R2] = Two_focuses_for_one_radiation (T_Alpha,Alpha1,Alpha2) clc; close all; clear all R=150; %Modulated radiation of LED R1= round ((sind(T_Alpha) - cosd(T_Alpha) * sind(Alpha2)/cosd(Alpha2))... /(sind(Alpha1)- cosd(Alpha1) * sind(Alpha2)/cosd(Alpha2)) *R); R2= round ((sind(T_Alpha) - cosd(T_Alpha) * sind(Alpha1)/cosd(Alpha1))... /(sind(Alpha2)- cosd(Alpha2) * sind(Alpha1)/cosd(Alpha1))*R); end 57 Appendix F – Matrix for modulated radiation of two sources MATLAB Code function M = Any_given_angle(Alpha1,Alpha2) %Matrix for any given angle for T_Alpha = Alpha1:1:Alpha2 [R1,R2] = Two_focuses_for_one_radiation(T_Alpha,Alpha1,Alpha2); M(T_Alpha,:)=[T_Alpha R1 R2]; save("m.dat","M",'-ascii'); end end 58 Appendix G – Verification of the Experimental and Theoretical Angle ARDUINO Code int Value1,Value2,Value3,Value4; float VPH1,VPH2,VPH3,VPH4,Y1,Y2,Fy; double E_Alpha; //Experimental incident angle of LED int R1=0; //Percentage of radiation 1 of LED 1 int R=0; //Percentage of radiation of LED int R2=0; //Percentage of radiation 2 of LED 2 int T_Alpha=0; //Initialization of theoretical alpha of LED float E_Alpha=0; //Initialization of experimental alpha of LED //Matrix from Matlab program calculated in Appendix F int M [35] [3]= { {1 , 150 , 0 }, //Values of E_Alpha, R1, R2 {2 , 146 , 5}, {3 , 142 , 9}, {4 , 138 , 14}, {5 , 134 , 19}, {6 , 130 , 23}, {7 , 126 , 28}, {8 , 122 , 33}, {9 , 118 , 37}, {10 , 113 , 42}, {11 , 109 , 47}, {12 , 105 , 51}, {13 , 100 , 56}, {14 , 96 , 60}, {15 , 92 , 65}, {16 , 87 , 69}, {17 , 83 , 74}, {18 , 78 , 78}, {19 , 74 , 83}, 59 {20 , 69 , 87}, {21 , 65 , 92}, {22 , 60 , 96}, {23 , 56 , 100}, {24 , 51 , 105}, {25 , 47 , 109}, {26 , 42 , 113}, {27 , 37 , 118}, {28 , 33, 122}, {29 , 28 , 126}, {30 , 23 , 130}, {31 , 19 , 134}, {32 , 14 , 138}, {33 , 9 , 142}, {34 , 5 , 146}, {35 , 0 , 150}, }; //Defining of four low-pass filters for each output voltage of photodiodes in order to reduce noise and to have more accurate results #define FILTER_CONST (float) 0.05 //Execution timing of the filter float filter1(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } float filter2(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } float filter3(float x){ static float x_old=0; 60 float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } float filter4(float x){ static float x_old=0; float y=x_old+(x-x_old)*FILTER_CONST; x_old=y; return y; } long int count=0; //Initialization of the counter void setup() { Serial.begin (115200); //OUTPUTS pinMode (8,OUTPUT); //Configuration of LED 1 in PWM pinMode (7,OUTPUT); //Configuration of LED in PWM pinMode (6,OUTPUT); //Configuration of LED 2 in PWM //INPUTS pinMode (A0,INPUT); //Configuration of VPH1 as an Input pinMode (A1,INPUT); //Configuration of VPH2 as an Input pinMode (A2,INPUT); //Configuration of VPH3 as an Input pinMode (A3,INPUT); //Configuration of VPH4 as an Input //Serial plot Serial.print(" T_Alpha "); Serial.print(" "); Serial.print(" R1 "); Serial.print(" "); Serial.print(" R2 "); Serial.print(" "); Serial.println(" E_Alpha "); R1= M[T_Alpha][1] ; //Write the second column of the matrix R2= M[T_Alpha][2] ; //Write the third column of the matrix } void loop() { 61 count++; //Counter if (count > 300) //300ms is the execution timing between each instruction in serial monitor { count=0; prn(); //Write the value of count T_Alpha ++; if (T_Alpha>34) T_Alpha=0; R1= M[T_Alpha][1]; R2= M[T_Alpha][2]; } analogWrite(8,R1); //Write the analog value of radiation 1 for LED 1 to pin 8 analogWrite(7,R); //Write the analog value of radiation for LED to pin 7 analogWrite(6,R2); //Write the analog value of radiation 2 for LED 2 to pin 6 //Convert the analog value of VPH1 to digital Value1 = analogRead(A0); VPH1 = ((float)Value1*5.0/1023.0) ; VPH1=filter1(VPH1); //Convert the analog value of VPH2 to digital Value2 = analogRead(A1); VPH2 = ((float)Value2*5.0/1023.0) ; VPH2=filter2(VPH2); //Convert the analog value of VPH3 to digital Value3 = analogRead(A2); VPH3 = ((float)Value3*5.0/1023.0) ; VPH3=filter3(VPH3); //Convert the analog value of VPH4 to digital Value4 = analogRead(A3); VPH4 = ((float)Value4*5.0/1023.0) ; VPH4=filter4(VPH4); } void prn() //Print { Serial.print(M[T_Alpha] [0]);