إىل من يسعد قليب بلقياها إىل روضة إحلب إليت تنبت أأزىك إ ألزهار " أأيم " إىل رمز إلرجوةل وإلتضحية إىل من دفعين إىل إلعمل وبه إزدإد إفتخار " أأيب " إىل من مه إقرب أأ ّيل من رويح إىل من شاركين حضن أأالم وهبم إس متد عزيت وإرصإري " إخويت " إىل من أنس ين يف درإس يت وشاركين مهويم تذاكر ًإ وتقدير ًإ " أأصدقايئ " إىل هذه إلرصح إلعلمي إلفيت وإجلبار " جامعة إلنجاح إلوطنية " إهدي هذإ إلبحث 1|Page Acknowledgments: During our graduation studies at An-Najah National University, several persons collaborated directly and indirectly with our work. Without their support it would be impossible for us to finish this work. That is why we wish to dedicate this section to recognize their support. Expressing a sincere acknowledgement we will start it to our advisor, Dr. Kamel Subhi because he gave us the opportunity to work under his guidance and supervision. We received motivation, encouragement and support from him. We also want to express our gratitude to DR. Maher Khamash the head of department of electrical and telecommunication engineering for his continuous work to raise this department level up and Dr. Marwan Mahmoud for being the encyclopedia of the power electronics principles and the expert in the practical applications of it. At last, but the most important we would like to thank our families, for their unconditional support and Abdullah Hanawi the electrical workshop supervisor. 2|Page Table of Contents CHAPTER 1 .................................................................................................................................................................................................. 8 INTRODUCTION................................................................................................................................................................................... 8 1.1 Over view ............................................................................................................................................................................... 8 1.2 Motivations for carrying out the project :.............................................................................................................................. 9 1.3 Report Organization: ............................................................................................................................................................. 9 CHAPTER 2 ................................................................................................................................................................................................ 10 CONSTRAINTS, STANDARDS AND EARLIER WORK .................................................................................................................................. 10 CHAPTER 3 ................................................................................................................................................................................................ 12 LITERATURE REVIEW ........................................................................................................................................................................ 12 3.1 Types of lamps used in streetlights ...................................................................................................................................... 12 3.2 Hardware and components: ................................................................................................................................................ 15 3.3 Theories and circuit analyses ............................................................................................................................................... 24 CHAPTER 4 ................................................................................................................................................................................................ 30 METHODOLOGY ................................................................................................................................................................................. 30 CHAPTER 5 ................................................................................................................................................................................................ 32 SOFTWARE WORKS ............................................................................................................................................................................. 32 5.1 Matlab ................................................................................................................................................................................. 32 5.2 Arduino UNO ........................................................................................................................................................................ 44 CHAPTER 6 ................................................................................................................................................................................................ 46 RESULTS AND ANALYSIS ..................................................................................................................................................................... 46 6.1 The triac dimmer results ...................................................................................................................................................... 46 6.2 The IGBT dimmer results ...................................................................................................................................................... 47 CHAPTER 7 ................................................................................................................................................................................................ 49 DISCUSSION AND ECONOMICAL ........................................................................................................................................................... 49 7.1 Discussion ............................................................................................................................................................................ 49 7.2 Economical advantage ....................................................................................................................................................... 49 CHAPTER 8 ................................................................................................................................................................................................ 50 CONCLUSION .................................................................................................................................................................................... 50 REFERENCES ............................................................................................................................................................................................. 51 APPENDIX .................................................................................................................................................................................................. 52 Appendix A ................................................................................................................................................................................. 52 Appendix B ................................................................................................................................................................................. 53 3|Page List of figures: CHAPTER 3 FIG. 3.1 : THE AOTO CONTROL STREET LIGHT CIRCUIT .................................................................................................................... 14 FIG. 3.2 : THE OUTPUT OF THE BRIDGE ........................................................................................................................................... 16 FIG. 3.3 : CIRCUIT SYMBOL FOR AN OPTOCUPLER ........................................................................................................................... 17 FIG. 3.4 : THE TRIAC SYMBOL AND SIMPLIFIED CROSS SECTION OF THE DEVICE ............................................................................. 19 FIG. 3.5 : THE CIRCUIT USED IN THE SECOND DIMMER .................................................................................................................... 21 FIG. 3.6 : BASIC TYPE OF DIMMER ................................................................................................................................................... 23 FIG. 3.7 : TRIAC OPERATION ............................................................................................................................................................ 24 FIG. 3.8 : PERFORMANCE OF ZERO CROSSING DETECTIO ................................................................................................................ 26 FIG. 3.9 : THE DUTY CYCLE ............................................................................................................................................................... 27 FIG. 3.10 : THE EFFECT OF DUTY CYCLE AT THE AVERAGE VALUE ................................................................................................... 27 FIG. 3.11 : (95%) OF DUTY CYCLE ..................................................................................................................................................... 28 CHAPTER 5 FIG. 5.1 : THE SIMULATION CIRCUIT FOR AUTO STREET LIGHT CONTROL CIRCUIT ......................................................................... 31 FIG. 5.2 : VOLTAGE IN DIFERENT FIRING ANGLE ( VREFF =0) ........................................................................................................................ 33 FIG. 5.3 : VOLTAGE IN DIFERENT FIRING ANGLE ( VREFF =.2) ........................................................................................................................ 34 FIG. 5.4 : VOLTAGE IN DIFERENT FIRING ANGLE ( VREFF =.4) ........................................................................................................................ 34 FIG. 5.5 : VOLTAGE IN DIFERENT FIRING ANGLE ( VREFF =.7) ........................................................................................................................ 35 FIG. 5.6 : VOLTAGE IN DIFERENT FIRING ANGLE ( VREFF =.9) ........................................................................................................................ 35 FIG. 5.7 : FUNCTION OF CURRENT WHEN ( VREFF =0 ) ............................................................................................................................... 36 FIG. 5.8 : FUNCTION OF CURRENT WHEN ( VREFF =.2 ) .............................................................................................................................. 36 FIG. 5.9 : FUNCTION OF CURRENT WHEN ( VREFF =.4 ) .............................................................................................................................. 37 FIG. 5.10 : FUNCTION OF CURRENT WHEN ( VREFF =.7 ) ............................................................................................................................ 37 FIG. 5.11 : FUNCTION OF CURRENT WHEN ( VREFF =.9 ) ............................................................................................................................ 38 FIG. 5.12 : CHANGE IN POWER WHEN ( VREFF = 0) .................................................................................................................................... 39 FIG. 5.13 : CHANGE IN POWER WHEN ( VREFF = .2) ................................................................................................................................... 39 FIG. 5.14 : CHANGE IN POWER WHEN ( VREFF = .4) ................................................................................................................................... 40 FIG. 5.15 : CHANGE IN POWER WHEN ( VREFF = .7) ................................................................................................................................... 40 FIG. 5.16 : CHANGE IN POWER WHEN ( VREFF = .9) ................................................................................................................................... 41 FIG. 5.17 : SIMULATION CIRCUIT FOR IGPT .............................................................................................................................................. 41 FIG. 5.18 :OUTPUT VOLTAGE WHEN ( DUTY CYCLE =.75) ........................................................................................................................... 42 FIG. 5.19 : OUTPUT VOLTAGE WHEN ( DUTY CYCLE =.6) ............................................................................................................................. 43 FIG. 5.20 : OUTPUT VOLTAGE WHEN ( DUTY CYCLE =.5) ............................................................................................................................. 43 FIG. 5.21 : OUTPUT VOLTAGE WHEN ( DUTY CYCLE =.4) ............................................................................................................................. 44 4|Page List of tables: CHAPTER 3 Table 3.1 lamp type comparison :.............................................................................................................................................. 13 CHAPTER 7 Table 7.1 the percentage of dimming and power consumption during a day : ......................................................................... 48 5|Page Nomenclature: LED : Light emitting diode PMW : Pulse width modulation 6|Page Abstract Recently, the electrical power suppliers try to meet the increasing demand on the electrical power in one of two ways. Firstly, through using renewable energy resources like solar energy and wind energy. Secondly, through effective managing the electrical power such as reducing the losses through using new approaches in technologies. This project introduces two approaches to effectively reduce the electrical power used in street lighting through auto control intensity of the street light. The intensity of street lights is required to be kept high during the peak hours. As the traffic on the roads tends to decrease slowly in late nights, the intensity can be reduced progressively till morning to save energy. Thus, the street lights switch ON at the dusk and then switch OFF at the dawn automatically. The process repeats every day. One way to achieve this is to use a power electronic circuit consisting of a thyristor and its control circuit. This circuit will be installed on the street light cable and by controlling the firing angle of the thyristor, the intensity of the street light will change. The second way to achieve auto intensity control is through using white Light Emitting Diode (LED) where intensity control is possible by pulse width modulation.. The electrical source that is used here will be solar cell Arduino programmable microcontroller is engaged to provide different intensities at the different times of night using PWM technique in the two projects. 7|Page Chapter 1 Introduction 1.1 Over view In this project an auto control of the street lights will be done by using power electronics circuit which consists of small components, also this method is cheap. Illumination Intensity of street lighting changes according to the time in the night. For example the illumination intensity decreases because there is no need to the same amount of lightening in the street at certain hours of the night. The illumination intensity of the street light lamps is directly related to the applied voltage. And hence, by using controlled power electronic devices such as the triac, it is possible to obtain a variable voltage using different firing angles and hence obtaining a control of the street light intensity. The rest of the functionality of the system is provided by an Arduino takes an interrupt signal from the zero crossing detector, and sends control pulses to the opto-triac, then the triac become conductive[1*]. The zero-detect signal is taken to pin 2 of the Arduino, an interrupt input. This will occur at the start and end of the zero-crossing detector pulse [1*]. Finally, we can control the illumination intensity of the light decease it or increase it as we need. This project is the first step to increase the demand of electric power, the second step which has been done in the second project by replacing the electrical source into renewable energy source like solar energy battery and an electrical switch “IGBT”. In the second step the Pulse Width Modulation “PWM” technique will be used to dim the lightening of the LED light 8|Page 1.2 Motivations for carrying out the project : The energy sources in the world are decreasing rapidly and there is large energy consumption in street without benefit, so we should find way to reduce the losses. Controlling the street lights using the dimming circuit is very useful method to save and reduce the power consumption add to this it is a very cheap method. 1.3 Report Organization: The report is subdivided into seven chapters which are organized as following: The first chapter is an introduction shows the essential information regarding the details and the motivation for the carrying out the project, the second talks about the standards, constraints and earlier work, the third is literature review, the fourth is about the street lights types, the fifth includes the methodology; the sixth is about results and circuit analysis for auto Control Street lights. The seventh is discussion chapter where the results will be interpreted and compared. Finally the eighth includes the conclusion and recommendations. 9|Page Chapter 2 Constraints, standards and earlier work In this project the IEC code has been used, the international electro-technical commission is a worldwide organization for standardization comprising all national electro-technical committees (IEC committees). The object of ICE is to promote international co-operation on all questions concerning standardization in the electric and electronic fields. To this end and in addition to other activities, IEC publishes international standards, technical specifications (PAS) and guides (hereafter referred to as “IEC” publications). Their preparations is entrusted to technical committees; any IEC committee interested in the subject dealt with may participate in this preparatory work. International, governmental organizations liaising with IEC also participate in this preparation. IEC collaborates closely with the International Organization for Standardization (ISO) in accordance with conditions determined by agreement between the two organizations. In this project IEC 60027 which consists of the letter symbols to be used in electrical technology. IEC 60038 defines a set of standard voltages for use in low voltage and high voltage ac electricity supply systems. Earlier work: One of the earliest recorded dimmers is Granville Woods “Safety Dimmer”; published before that was liable to cause fires. Early dimmers were directly controlled through the manual manipulation of large dimmer panels. This required all power to come through the lighting control location, Which could be inconvenient and potentially dangerous for large of high-power systems, such as those used for stage lighting. When thyristor dimmers came into use, analog remote control systems (often 0-10 v lighting control systems) became feasible. The wire for the control systems was much smaller (with low current and lower danger) than the heavy power cables of 10 | P a g e previous lighting systems. Each dimmer had its own control wires, resulting in a huge number of wires leaving the lighting control location and running to each individual dimmer. Many people attribute the invention of the first commercially viable light dimmer to Eugene Alessio, an electrical Engineer. In the sixties, Alessio began thinking about an electronic linear means for adjusting a light level on a single light bulb. Using a Triac, he built several prototype breadboard circuits to experiment with this new concept. To house this novel device, he decided on a 2-inch round device approximately 2.5 to 3 inches long with one end capable of being screwed into a light bulb socket and the other end able to receive a light bulb. Although the device interested Sears and other large department stores, Alessio's patent did not completely protect his idea. He passed along a working prototype to the Sears representatives, who took it to Texas Instruments to mass manufacture the product. 11 | P a g e Chapter 3 Literature review 3.1 Types of lamps used in streetlights A streetlight, lamppost, streetlamp, light standard, is a raised source of light on the edge of road or walkway, which is turned on or lit at a certain time every night. The first lamp was invented around 70,000 BC. A hollow rock, shell or other natural found object was filled with moss or a similar material that was soaked with animal fat and ignited. Humans began imitating the natural shapes with manmade pottery, alabaster, and metal lamps. Wicks were later added to control the rate of burning. Around the 7th century BC, the Greeks began making terra cotta lamps to replace handheld torches. The word lamp is derived from the Greek word lampas, meaning torch. Early lighting fuels consisted of olive oil, beeswax, fish oil, whale oil, sesame oil, nut oil, and similar substances. These were the most commonly used fuels until the late 18th century. However, the ancient Chinese collected natural gas in skins that was used for illumination. In the 19th century, most cities in the United States and Europe had streets that were gaslight. Gas lighting for streets gave way to the gas discharge lights used from 1930 till now; there are too many types of gas lights: Low Pressure Sodium (LPS): LPS is the most efficient streetlight source used in street lighting. The lamps produce monochromatic orange-yellow light, from lamps which are long and skinny. Drawbacks of using LPS lamps include the color rendering. When the lamp is on, everything around it looks either orange-yellow, black or shades in between. Also, as the lamp ages, it uses more wattage, which lighting designers need to account for. That increase in wattage does result in little-no lumen depreciation, meaning it the light output from the lamp stays fairly constant over its life. 12 | P a g e High Pressure Mercury: It is a negative resistance device. This means its resistance decreases as the current through the tube increases, so if the lamp is connected directly to Constant- voltage source like the power lines, the current through it will increase until it destroys itself. Therefore it requires a ballast to limit the current through it. Mercury lamp ballasts are similar to the ballasts used with florescent lamps. Metal Halide: It is very closely related to the mercury lamps. The basic lamp is the same as a mercury lamp, but with other metallic elements added. The result is a good quality white light. Metal halide has not gained wide acceptance as a source of street light. It is mostly found in parking lots and inside commercial and industrial buildings. The light is more efficient than mercury vapor, but the lamp life is shorter. Another problem incurred with metal halide is "color shift". The color of the light produced by each lamp varies slightly, which leads to a cluttered effect High Pressure Sodium (HPS): The lamps were developed in the early 1970s and are more energy efficient than mercury and metal halide lamps. The lamps give off an amber color, have virtually no problem with color shift, and last for long periods of time. The lamps begin to incur problems when they near the end of their life. Lumen depreciation is a problem with HPS, though still not as severe as the depreciation seen with Mercury. The lamps begin to "cycle," which means they turn themselves off and come back on a minute later. This problem has been addressed with the recent introduction of non-cycling HPS lamps. Those lamps differ in power, output, efficiency, energy use and color rendition. The following table shows the differences them. 13 | P a g e Table 3.1: Lamp Type Comparison. What might be surprising is to know that the lighting can often represent a large costly energy load. For example high pressure sodium bulbs convert about 50% of the energy they consume into usable light and are highly efficient choice when it comes into usable lighting requirements but its economically it means that the other 50% are lost on turning in an excited state along with mercury to produce light. But HPS has a very awesome specialty which is the change of luminance according to the supplied power.[2*] In this project we are going to direct our precious revenues towards supporting the cost of lighting expenses. We will be able to control constrain and contain those expenses so that the resulting savings improves our income statement. Smart choice to control street lights is the Auto-Diming, which can be done using the dimmer circuit detailed in the following chapter. [3*] 14 | P a g e 3.2 Hardware and components: The controller circuit job is to change the illumination of the street lights according to a time we set this can be done by changing the conduction angle of the thyristor as the time changes which changes the power supplied to the light. The figure (3.1) show the circuit which we use it in our project: fig. 3.1 The auto control street light circuit 15 | P a g e The circuit in details : zero crossing circuit A zero cross circuit is an electrical circuit that detects the instant when a sine wave, or the natural format of alternating current (AC), is at zero volts in amplitude and sends a signal to its controlled circuit. It is very useful in preventing high-surge currents for protecting resistive loads such as incandescent lamps and heaters and in preventing high-surge currents that generate electromagnetic interference to electronic circuits. The zero cross circuit detects the power line voltage two times during the cycle and makes sure the instantaneous power line voltage is zero before engaging the power switch. Without the zero cross circuit, the switch could engage at a peak voltage level that causes an abrupt high-surge current. Moreover, the zero cross circuit may also ensure that the AC load is switched on early enough in the voltage cycle to obtain full power from the AC supply. [4*] What do we use for zero crossing circuit? 1. Transformer : A static electrical device that transfers energy by inductive coupling between its winding circuits. A varying current in the primary winding creates a varying magnetic flux in the transformer’s core and thus a varying magnetic flux through the secondary winding. This varying magnetic flux induces a varying electromotive force (EMF) or voltage in the secondary winding. Transformers can be used to vary relative of circuits or isolate them or both. Transformers range in size from thumbnail-sized used in microphones to units weighing hundreds of tons interconnecting the power grid. A wide range of transformer designs are used in electronic and electric power applications. Transformers are essential for the transmission, distribution and utilization of electrical energy. [5*][6*] 16 | P a g e 2. Full-wave rectification A full-wave rectifier converts the whole of the input waveform to one of constant polarity (positive or negative) at its output. Full-wave rectification converts both polarities of the input waveform to pulsating DC (direct current), and yields a higher average output voltage. Two diodes and a center tapped transformer, or four diodes in a bridge configuration and any AC source (including a transformer without center tap), are needed. Single semiconductor diodes, double diodes with common cathode or common anode, and four-diode bridges, are manufactured as single components. Figure (3.2) shows the output of the bridge. [7*] Fig. 3.2 the output of the bridge. 17 | P a g e 3. Optocoupler An optoisolator, also known as an optical coupler or optocoupler, is a semiconductor device that allows signals to be transferred between circuits or systems, while keeping those circuits or systems electrically isolated from each other. Optoisolators are used in a wide variety of communications, control, and monitoring systems. In its simplest form, an optoisolator consists of a light-emitting diode (LED), IRED (infrared-emitting diode), or laser diode for signal transmission, and a photo sensor for signal reception. The "transmitter" takes the electrical signal and converts it into a beam of modulated visible light or infrared (IR). This beam travels across a transparent gap and is picked up by the "receiver," which converts the modulated light or IR back into an electrical signal. The electrical output waveform is identical to the electrical input waveform, although the input and output amplitudes (signal strengths) often differ. The optoisolator is enclosed in a single package, and has the appearance of an integrated circuit (IC) or a transistor with extra leads. . [8*] Fig. 3.3 circuit symbol for an optocoupler 18 | P a g e Dimming circuit: Dimmers are devices used to vary the brightness of a light. By decreasing or increasing the RMS voltage and, hence, the mean power to the lamp, it is possible to vary the intensity of the light output. Although variable-voltage devices are used for various purposes, the term dimmer is generally reserved for those intended to control light output from resistive incandescent, halogen, and (more recently) compact fluorescent lights (CFLs) and lightemitting diodes (LEDs). [9*] What we use for Dimming circuit? 1. MOC3021 The MOC3021 is optically isolated triac driver devices. These devices contain a GaAs interfid emitting diode and a light activated silicon bilateral switch, which function like a triac. This is designed for interfacing between electronic controls and power triacs to control resistive and inductive loads for 240V AC operations. The usage of MOC3021: Triac driver. Industrial controls. Traffic lights. Motor control. Solid state relay. 2. TRIAC The Triac or bi-directional Thyristor construction is a device that can be used to pass or block current in either direction. It is therefore classed as an AC power control device. It is equivalent to two Thyristor in anti-parallel with a common gate electrode. As only one device is required there are cost and space savings. 19 | P a g e The Triac has two main terminals. TE1/ TE2 (power in and load out) and a single gate connection. The main terminals are connected to both p and n regions since the current can be conducted in either direction. The gate is similarly connected, since a Triac can be triggered by both negative and positive pulses. Fig. 3.4 the triac symbol and a simplified cross section of the device The ON state voltage/ current characteristics resembles a Thyristor. The Triac static characteristics show that the device acts as a bi-directional switch. The condition where terminal TE2 is positive with respect to terminal 1 is denoted by the term TE2+. If the Triac is not triggered the low level of leakage current increases as the voltage increases until the break over voltage V is reached and then the Triac turns ON. The Triac can be triggered below V by a pulse to the gate, provided that the current through the device exceeds the latching current I before the trigger pulse is removed. The Triac has a holding current value below which conductance cannot be maintained. If terminal 2 is negative with respect to terminal TE2 the blocking and conducting conditions are similar to the TE2+ condition, but the polarity is reversed. The Triac can be triggered in either direction by both negative and positive pulses on the gate. The 20 | P a g e actual values of gate trigger current and holding current as well as latching current can be slightly different in the different operating quadrants of the Triac due to the internal structure of the device. Cathode/ Anode voltage ratings The voltage of the AC mains is usually regarded as a smooth sine wave. In practice there is a variety of transients, some occurring regularly and others only occasionally. Although some transients may be removed by filters, Triacs must still handle cathode/ anode voltages in excess of the normal mains voltage level. [10*] 3. Aurdino The Arduino Uno is a microcontroller board based on the ATmega328 which can be programmed with the Arduino software. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, the Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically. The ATmega328 has 32 KB memory (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library). [11*] 4. loads (high pressure sodium lamp) High pressure sodium (HPS) lamps, a member of the high intensity discharge (HID) lamp family, are the most efficient white light source commercially available today. HPS lamps were developed and introduced as energy-efficient sources for exterior, security, and industrial lighting applications, and are particularly prevalent in street lighting applications. Due to their high efficiency and long life. 21 | P a g e In a high pressure sodium lamp, a compact arc tube contains a mixture of xenon, sodium and mercury. The xenon gas which is easily ionized, facilitates striking the arc when voltage is applied across the electrodes. The heat generated by the arc then vaporizes the mercury and sodium. The mercury vapor raises the gas pressure and operating voltage, and the sodium vapor produces light when the pressure within the arc tube is sufficient. High pressure sodium lamps are the most efficient artificial white light source with about 29% of the energy used by the lamp producing light. [12*] The second dimmer components: Figure 3.5 the circuit used in the second dimmer What are the components used in this circuit? 22 | P a g e 1. IGBT: Insulated-gate bipolar transistor Is a three-terminal power semiconductor device primarily used as an electronic switch and in a newer devices is noted for combining high efficiency and fast switching. It switches electric power in many modern appliances. An IGBT cell is constructed similarly to a n-channel vertical construction power MOSFET except the negative drain is replaced with a positive collector layer, thus forming a vertical PNP bipolar junction transistor. This additional positive region creates a cascade connection of a PNP bipolar junction transistor with the surface n-channel MOSFET. IGBT symbol 2. IR2110: Its an IGBT driver, used to isolate the lower and higher side of the transistor, it provides the high peak current necessary to charge and discharge the gate rapidly. Fast charging of the gate means decreasing switching losses, i.e turn the MOSFET/IGBT on or off as fast as possible/feasible. (There are other considerations for the correct switching frequency). 23 | P a g e 3. Arduino. 4. Load: LED lights 3.3 Theories and circuit analyses Dimmer theory What is a dimmer? A dimmer is a device which is created originally to control the brightness of lamps by altering the total power delivered to the lamp and thus the brightness. Figure 3.6 demonstrates a basic type of dimmer (Triac dimmer) Fig.3.6 Basic type of dimmer The resistor R is a protective resistor for the triac's gate. The potentiometer Rp along with the capacitor C controls the time that the triac will be conductive, counting from the zero point of the input waveform. 24 | P a g e Operation principles The Triac dimmer operation principle: The dimmer operation is based on the fact that, during a full cycle of an AC waveform, the thyristor will only allow a part of the waveforme to be delivered to the load (lamp). Figure 3.7 shows wave forme of triac operation. Fig.3.7 Triac operation Both waveforms above come from the same dimmer. The only difference is that the waveform on the left will bright the lamp higher than the waveform on the right. That is because of the left waveform, the triac on the lift will be conductive earlier than the triac shown in the right waveform. The time that the triac becomes conductive is symbolized with the Greek letter α (ALPHA) and is measured in angles from the zero point of the waveform. This zero point is the point that the voltage is 0 volts, and this happens 2 times every one full period of the wave form. When α becomes smaller, the dimmer becomes conductive sooner and the lamp is brighter. When α becomes bigger, the triac delays more to become conductive and thus the lamb is dimmer. 25 | P a g e A full wavelength period is 360 degrees (2π). Due to the fact that during a full wave length the zero cross occurs twice, α can take values from 0° to 180 degrees (0 - π). When α = 0°, the full power is delivered to the load and when α = π, no power is delivered to the load. [13*] Zero crossing detection The zero cross detection circuit is the most critical part when designing a dimmer. This circuit will watch the input power waveform and detect when this waveform crosses the 0 point and becomes 0 volts. Zero cross detection circuits are mainly used in cases when the dimmers needs to be controlled from a micro controller. In that case, the micro-controller needs to know the zero cross detection point of the waveform, so that it cancalculate the angle offset to send the trigger pulse to the gate of the triac. Here is an example calculation. Suppose that the AC power oscillates in a 50Hz cycle. This means that each cycle will take 1/50Hz = 20 mSec to be completed. During those 20mSec, the waveform will cross the zero point two times, one at the beginning and one in the middle of the cycle, that will be after 20/2 = 10mSec. If we want the lamp to be half the way bright, then the microcontroller needs to send a pulse in the middle of each semi-cycle. Thus, a pulse must be sent after 5mSec after each time the waveform passes the zero point. For this to be done, the microcontroller will watch the zero cross detection circuit (ZCD) for a pulse. When the ZCD send this pulse, the micro controller will count 5 mSec and then will trigger the gate of the triac. In figure 3.8 the circuit will perform a Zero Cross Detection circuit. This circuit is very stable and accurate, and has a controllable pulse width. Another great advantage is that because of the transformer, this circuit has a complete galvanic isolation with the mains supply so that it makes it completely safe and risk free of destroying the microcontroller due to power peaks. [13*] 26 | P a g e Fig.3.8 performance of zero crossing detection Zero cross-dimmer response In this project the transformer gives an AC signal , which will enter the half wave bridge, then the rectified signal enters the optocoupler which gives pulse at every zero crossing , this signal then can be used to steer an interrupt in the arduino .The output of the optocoupler will enter to the arduino and then to the triac to control the lightning. Principle of operation in the IGBT dimmer AC dimmer using IGBT transistor chopping the sine wave according to PWM output from Arduino. PWM from the Arduino is fast enough to allow neglect any synchronization and zero-crossing issues and simply dim the light to desired luminance by a single command analogWrite(pin, value). IGBT is fairly new development, a transistor allowing to control AC voltage (320V in this case) and a power of a range of a normal home lights. Pulse- Width Modulation (PWM), or Pulse- Duration Modulation (PDM), is a modulation technique that varies the width of the pulse, formally the pulse duration based on 27 | P a g e modulator signal information. Although this modulation technique can be used to encode information for transmission, its main use is to allow the control of the power supplied to electrical devices, especially to inertial loads. The average value of voltage (and current) fed to the load is controlled by turning the switch between supply and load on and off at fast pace, the longer the switch is on compared to the off periods which called the duty cycle, the higher the power supplied to the load is. So changing the duty cycle will change the power supplied to the load. Fig 3.9 the duty cycle. Fig 3.10 shows the effect of duty cycle at the average value. 28 | P a g e There are too many types of switches can be used (E.g BJT, MOSFET and IGBT etc.) depending on application. The output voltage waveform of an ideal inverter should be sinusoidal. The voltage waveform of an ideal inverter should be sinusoidal. The voltage waveforms of practical inverter are however, non-sinusoidal and contain certain harmonics. Square wave or qusai-square wave voltage maybe acceptable for low and medium power application and for high power application low distorted, sinusoidal waveform are required. The output frequency of an inverter is determined by the rate at which the inverters control circuitry and consequently, an adjustable frequency AC output is readily provided. The harmonics content of output voltage can be minimized or reduced significantly by switching technique of variable high speed power semiconductor devices. The waveform illustrated in Fig 3.11 shows 95% duty cycle, which is almost the full power. Fig 3.11 (95%) of duty cycle According to this; the lightening intensity can be varied by changing the duty cycle. When its 100% full power will be delivered to the light and as the duty cycle decreased the power delivered will be decreased . 29 | P a g e Chapter 4 Methodology Our work divides into: Software: We put the circuit design of the street light controller made simulations and then we did the programming part. Hardware: We brought the circuit components together and connected them. 30 | P a g e Designing the circuit and preparing the components needed. Making a simulations for the design Bringing circuit components together and connecting them Writing the Arduino code roject finishing, designing a smart street light intensity in cheap way 31 | P a g e Chapter 5 Software works 5.1 Matlab We use matlab to simulate the circuit and obtain initial results. Figure 5.1 show the simulation circuit for auto street light control circuit: 32 | P a g e Figure 5.1 the simulation circuit for auto street light control circuit We use matlab to see the result of the project by building the dimmer circuit also connect it to pulse generator. We change the fire angle and see the result into the voltage, current and the output power by using scope. We control the firing angle by change the v reference into the comparator in the pulse generator. The below figures show the voltage in different firing angle: 1-when v reference =0: Figure 5.2 2-when v reference =.2: 33 | P a g e Figure 5.3 3-when v reference =.4: Figure 5.4 34 | P a g e 4-when v reference =.7: Figure 5.5 5-when v reference =.9: Figure 5.6 We notice when the firing angle is increase the voltage at the load decrease. The function of the current: 35 | P a g e 1-when v reference =0: Figure 5.7 2-when v reference =.2: Figure 5.8 3-when v reference =.4: 36 | P a g e Figure 5.9 4-when v reference =.7: Figure 5.10 37 | P a g e 5-when v reference =.9: Figure 5.11 We can notice from the above figures that the amplitude of maximum current is decrease when the firing angle decreases. According to the results above we can conclude the power also decrease when the firing angel increase. The below figures show the change of the power: 1-when v reference =0: 38 | P a g e Figure 5.12 2-when v reference =.2: . Figure 5.13 3- when v reference =.4: 39 | P a g e Figure 5.14 4-when v reference =.7: Figure 5.15 40 | P a g e 5-when v reference =.9: Figure 5.16 The IGBT Dimmer simulation Figure 5.17 show the simulation circuit for IGPT circuit: Fig.5.17 41 | P a g e We use matlab to see the result of the project by building the circuit also connect it to pulse generator . We change the duty cycle and see the result into the voltage ,current and the output power by using scope. The below figures show the output voltage in different duty cycle: 1- When duty cycle =.75: Fig.5.18 42 | P a g e 1- When duty cycle =.6: Fig.5.19 1- When duty cycle =.5: Fig.5.20 43 | P a g e 1- When duty cycle =.4: Fig.5.21 5.2 Arduino UNO We use Arduino c++ code to make dimming to the light power. In the Triac dimmer: The concept this is to make stepper dimmer. A scale is set to dim values to divide the half sine AC wave .Then timer has been triggered to interrupt every single step. The code will trigger an interrupt 256 times every time zero cross detected. If the value of dimming corresponds with the present step then triac is fired and one step later AC pin is lowered. The code is provided in appendix A 44 | P a g e In the IGBT dimmer: A PWM code has been written, it gives a pwm signal supplied to the gate of the IGBT. The code is provided in appendix B. 45 | P a g e Chapter 6 Results and analysis The picoscope and oscilloscope have been used to check the results out after different components in the circuit: 6.1 The triac dimmer results The input signal >>> Fig.6.1 The rectified signal and The zero crossing signal compared with it >>>> Fig.6.2 The arduino out put signal >>>> Fig.6.3 The signal at the load >>> Fig.6.4 46 | P a g e 6.2 The IGBT dimmer results The input signal (at the inverter input): it is the pwm signal comes from the arduino : 1. when the duty cycle equals to 90% Fig.6.5 47 | P a g e 2. When the duty cycle equals 75% : Fig.6.6 3. When the duty cycle equals 20%: Fig.6.7 48 | P a g e Chapter 7 Discussion and economical 7.1 Discussion comparing the results shows that in the triac dimmer when the firing angle is changed the output voltage will be changed as the alpha increased the output voltage will be decreased whereas in the IGBT dimmer the output voltage will be changed according to the pwm signal at the gate; as the duty cycle increased the output voltage will be increased. Using one of those two methods the dimming can be done and the wanted light intensity can be controlled either by controlling the firing angle or duty cycle; this will save the electrical energy. 7.2 Economical advantage Time of the day Percentage of dimming Power consumption 6-10 No dimming 250 watt 10-12 30% 175 watt 12-3 50% 125 watt 3-6 40% 150 watt Table 7.1 the percentage of dimming and power consumption during a day If there is a 1000 lamps in the city then the cost of street light in one night: 49 | P a g e 1-without dimming: 1800 NIS 2-with dimming: 1305 NIS The saved money=500 NIS Chapter 8 Conclusion As the world is running out of fuel getting this stepper dimmer will save and help in the reduction of energy consumption. According to the results of simulation we can get the proper illumination with suitable amount of energy supplied. When the firing angle is changed the voltage and current will be changed dependently. AS the firing angle increases the voltage will be decreased which will decrease the illumination, where the firing angle change depends on the time of day, we set a timer and according to its value the firing angle will be changed. What if we could use a more efficient way to save energy? Green electricity is the second choice of saving his planet, which was used in the second part of our graduation project, where a 12 volt solar battery in the circuit. 50 | P a g e References [*1] http://www.rotwang.co.uk/projects/triac.html [2*] http://trilliumee.com/Services_Page.html [3*] https://www.echelon.com/applications/street-lighting/ [4*] http://www.wisegeek.com/what-is-a-zero-cross-circuit.htm [5*] http://en.wikipedia.org/wiki/Transformer [6*] Electric machines book by D. P. Kothari, I. J. Nagrath [7*] Fundamentals of Power Electronics by D.P. Muhammad Rashid [8*] http://www.ustudy.in/node/7519 [9*] http://www.epanorama.net/documents/lights/lightdimmer.html [10*] http://www.sprags.com/summary.html [11*] http://arduino.cc/en/Main/arduinoBoardUno [12*] http://www.lightingassociates.org/i/u/2127806/f/tech_sheets/High_Pressure_Sodium_Lamps.pdf [13*] http://pcbheaven.com/wikipages/Dimmer_Theory/ https://www.pantechsolutions.net/power-electronics/introduction-of-igbt-based-single-phase-pwm-inverter 51 | P a g e Appendix Appendix A #include <TimerOne.h> // Avaiable from http://www.arduino.cc/playground/Code/Timer1 int FREQ =60 ; // 60Hz power in these parts int AC1_Pin= 9 ;// Output pin (TRIAC triggering) int AC2_Pin =10; // Output pin (TRIAC triggering) int AC3_Pin =11 ;// Output pin (TRIAC triggering) int DimMax = 100; int DimMin = 0; // Max value in dimming scale // Min value in dimming scale int volatile Dim1 = 0; // Present dimming value double halfSineTime = 1000000 / (2 * FREQ);//The Timerone PWM period, 60Hz = 8333.33uS int rampInterval = halfSineTime/DimMax; int rampCounter = DimMax; // Time of one step //Down counter with present step int rampPeriod = 5;// For the fading, time in seconds that takes for the half way-up dimming (the same downwards) int wait = rampPeriod*1000/DimMax;//Delay between increments of dimming int buffer = 0.1*DimMax;// allows a safety buffer of steps in which results are dirty void setup () { //set the mode of the pins… pinMode(AC1_Pin, OUTPUT); pinMode(AC2_Pin, OUTPUT); pinMode(AC3_Pin, OUTPUT); attachInterrupt(0, light, FALLING ); //Zero-crossing detector Timer1.initialize(halfSineTime); Timer1.disablePwm(9); Timer1.disablePwm(10); Timer1.disablePwm(11); } 52 | P a g e Appendix B int led = 5; //LED connected to digital pin 10 void setup() { pinMode(led, OUTPUT); TCCR0B = 0x03; } // the loop() method will run continuosly until power is removed. void loop() { //Increase the brightness for (int value=0; value<=255; value+=10) { analogWrite(led,value); delay(300); } delay(200); //Decrease the brightness for (int value=255; value>=0; value-=10) { analogWrite(led,value); delay(300); } delay(200); } 53 | P a g e 54 | P a g e