New Design of Illumination Sensor with Interface Circuit Ayman A. Aly 1,2 Abstract Light-emitting diode (LED) is a semiconductor device that gives off visible light when forward biased [1-3]. Similarly to solar cell, LEDs are photovoltaic, when exposed to sunlight it creates voltage. Based on this property, an inexpensive, simple and user friendly design of new sensor is proposed, the proposed sensor design can be used in different applications, including as light sensor, sun-perpendicularity sensor, the proposed design is developed such that the sensor can be interfaced with Microcontroller, PLC (as control unit), or without the use of control unit, with other electronic/electric interfaces (Relay/transistor) for load activation. Index Terms Illumination Sensor; Interface Circuit; Proteus. I. INTRODUCTION Light sensors find their way into a host of interesting applications. For instance, a light sensor in a camera measures the amount of light that the film will be exposed to. Once the amount of light is known, the proper lens aperture can be calculated to make sure that the picture is taken with the proper amount of exposure. In a smoke detector, a light sensor can be used to measure the amount of light transmitted by a known light source, such as an LED, through the air inside the sensor assembly. When the air becomes smoky, the amount of light received by the sensor changes. If the amount of light change goes above a preset threshold, then more than likely something nearby is burning, and a horn is activated to indicate there s a fire in the building. There are many other applications for light sensors, such as flame detectors, security systems, lighting control, robotics, etc. In these applications, many of us think that since the sensor produces an analog output, interfacing this type of 1 Mechatronics Track, Mechanical Engineering dept., College of Engineering, Taif University, P. N. 888, Taif, Saudi Arabia, 2 Mechatronics Section, Mechanical Engineering dept., Faculty of Engineering, Assiut University, P. N. 71516, Assiut, Egypt, sensor to a microcontroller will require a conventional analog-to-digital converter. Actually, though, by using just a few discrete components, interfacing a light sensor to an A/D-less microcontroller is very simple. Photodiodes and phototransistors are two of the most popular and lowcost light sensors. These devices are readily available in the $1 range. Both devices produce current outputs as a function of light intensity. The operating range of such devices varies depending on the manufacturer. Many of these sensors are equipped with builtin lenses tuned to particular wavelengths, so they re most effective for detecting or measuring light with those wavelengths. To get the best performance, the voltage across the sensor must be held constant during measurement. Ambient light sensors are included in many laptops and cell phones to sense the environment lighting conditions, allowing for adjustment of the screen's backlight to comfortable levels for the viewer. The range of "comfortable levels" is dependent on the room's light. Understandably, a screen's brightness needs to increase as the ambient light increases. What is less obvious is the need to decrease the brightness in lower light conditions-for comfortable viewing and to save battery life. In a cell phone, the ambient light sensor are located under a protective cover glass. Because of this protection, most of the ambient light is obstructed. The obstruction reduces the amount of light to be measured, requiring a solution with lowlight accuracy. For the accuracy needed in low-light conditions, the best sensor choice is the integrated photodiode with an ADC. Note that the inclusion of a highpass filter can minimize power supply noise from coupling into the backlight illumination. A few research works have been carried out on the effect of solar radiation on light-emitting diodes [3-4]. Here we are most interested in 5mm Gallium (III) phosphide (GaP) green Light-emitting diode (GaP Green LED). To carry out experimental tests, the proposed sensor design were built as shown in Figure 1(a)(b), the functional diagram is shown in Figure 2. testing in different sunlight and ambient conditions. Mulimeter were used to measure the values of generated output voltage. 9
)a) (b( Figure 1(a)(b) LED circuit for experimental testing/ measuring output generated voltage (Microcontroller/ PLC) or to interface (Relay/transistor) circuit that will activate (AC or DC) load To increase the value of generated voltage, and to result in more precise output voltage values (readings) for different ambient conditions, a series arrangement of three Green LEDs is applied, the circuit is shown in Figure 3(b). Three LEDs will result in approximately 5V that can be used to activate Transistor/relay switching, more than three LEDs or LED The physical implementation of the proposed sensor design with three LEDs, transistor and relay is shown in Figure 4. Physical interfacing of the proposed sensor with control unit (Microcontroller, PLC), or with interface circuits are shown in Figure 5. Sun light LEDs LED(s) Generated Voltage Analog voltage signal [0-1.74] VDC Figure 2: The functional diagram Vout (a) 1 LED P-transistor Relay To Mu II. EXPERIMENTAL SETUP Experimenting with transparent GaP Green LEDs, for photo-generated voltage and current,, showed that, when it is exposed to sunlight in different ambient conditions different voltage values are generated across LED's two leads (anode (+) and cathode (-)), as described next: 1) In shiny day (no clouds/dust), when the sun is at perpendicular position to the top the green LED, it generates output voltage approximately between 1.65V - 1.74V 2) in shiny day (no clouds/dust), when the sun is not at perpendicular position, LED generates output voltage around 1.55 V 3) In cloudy day, it generates around 1.43V 4) inside (lighted) room, LED generates around 0.4 V Vout 3 LEDs P-transistor Relay To Mu Based on those characteristic and values of generated output voltage, the preliminary sensor design, were developed, in such way shown in Figure 3(a), where it can be interfaced to control-unit (Microcontroller/ PLC) or to interface (Relay/transistor) circuit. The values of generated output voltage are used as input signal to control-unit (b) 3 LEDs Figure 3(a)(b) Preliminary 1 and 3 LEDs Sensor designs 10
III. ELECTRONICS SIMULATION To test the correctness of design, control algorithm (code) and electronic components compatibility, electronic simulation model of the proposed sensor design using Proteus software environment is developed (shown in Figure 6 ). Variable resistor is used as variable analog signal source to replace the input signal of the sensor. As an output load both electric motor and lamp are used. IV. MICROCONTROLLER BASED ALGORITHM IN MICRO C PRO LED Wire with Vout Relay (on back side) Transistor To read the output analog value of proposed sensor generated voltage, the next code can be used to activate and deactivate two actuators (Motor-Lamp) based on the value of generated voltage ( corresponding to sunlight angle fallen on LEDs), similar code can be used to control the suntracker to point the solar panel in perpendicular position to sun light. Figure 4. The physical implementation of the proposed sensor design with interfaces unsigned LED; Vout Figure 5: physical interfacing of the proposed sensor with/without control unit 11
void main( ) { Ansel=0x04; trisa=0xff; TRISD=0; PORTD=1; TRISB=0; while(1( { PORTB.2=0; //Lamp is ON if (LED<10); PORTB.1=0; //actuator is Off } } Figure 6 Electronic simulation using Proteus software environment LED=ADC_Read(2);// generated voltage of LED is connected to pin2, converted to digital value Vout=LED>>2; if Vout >=25 ;// if the generated voltage greater than 1.6V PORTB.1=1; // actuator connected to pin B is turned ON if (LED<25)&( LED>13); // if the generated voltage between 1,4 and 1,5 V. POTENTIAL APPLICATIONS OF THE PROPOSED SENSOR 1) Light sensor; ( Day/---/night) 2) Sun perpendicularity (Yes/No) to solar panel in sun tracking systems. 12
3) Intensity of sun irradiant sensor; the output voltage of sensor, is proportional to sunlight intensity, therefore, a rage of sensor outputs based on input intensity, for specific location, can be done. 4) Security systems; motion detection Table 1. Cost estimation N0. Item Quantity Market Unit price (S.R.) Total 1) I. LED - BASIC GREEN 3MM 3 0.5 1.5 2) P-Transistor IRL 1 5 5 3) 5VDC Relay 1 12 12 4) Connecting wires 1 1 1 (20cm) 5) Proper housing 1 5* 5 The unit price, based on local market unit prices, is approximately 25 S.R. REFERENCES [1] Ezeonu Stella O., Okonkwo Godfrey N., & Nweze Christian I, ''investigating the photovoltaic behaviour of light-emitting diode (LED)'', IJRRAS 15 (3), 347-358 June (2013) [2] V.K. Mehta, R. Mehta. Principles of Electronics, S.Chand & Company Ltd, India, 181-182 (1980). [3] T.L. Floyd. Electronic Devices, Pearson Education Inc, India. 135, (2002). [4] Red Rock Energy Electronic projects LED1LED sensor Relay Tracker Schematic, (2009). 13