International Journal of Electronics and Computer Science Engineering 228 Available Online at www.ijecse.org ISSN- 2277-1956 Design and Construction of Variable DC Source for Laboratory Using Solar Energy Hnin Mar Wai 1, Zaw Min Min Htun 2 1 Department of Electronic Engineering, Mandalay Technological University # Mandalay, Myanmar Abstract- The purpose of this paper is to design and construct variable DC power supply for laboratory using switch mode DC to DC converter. The regulated power of a variable output voltage ranging is from 0 to 36 V with a maximum output current of 3A is presented in this paper. This variable DC power supply is based on the step-down and step-up output voltage process which use both buck and boost converter topologies. A switching converter comprise of capacitors, an inductor, a diode and a switch. DC power supply is an essential device for most of electrical circuits and engineering students. The benefits of this design are; reduce size, less expensive and energy save. In this design, a microcontroller is used to control output voltage for precise and stability. The output voltage and duty cycle is displayed with LCD display. Keywords Switching mode power supply, Buck converter, boost converter, Converters design, microcontroller, LCD display I. INTRODUCTION Energy from the sun is the best option for electricity generation as it is available everywhere. Solar energy is renewable and also cleaner than any other energy produced from fossil fuels. Solar energy is virtually available everywhere in the world and it is abundant and no other source in renewable energy. Solar energy from PV panel converts into electrical energy. Some of the energy pollutes the environment to generate the electricity. Thus, this system intends to produce electricity by using solar energy and to supply power for a laboratory. In this design, 80 W solar panel is used which has 17.6V and 4.55 A. Using charge controller, voltage is charged into 12V battery. In this system, only DC to DC converter portion is mainly designed. Therefore, 12V battery is used as a source for DC to DC converter. Power supply is an element that supplies electrical power to a device or group of devices. Usually, DC power supply is employed in the laboratory for experimental purpose and for testing low power devices. It is a variable power supply which can supply and connect various loads. Most of the power supplies are constructed using transformers and for high ratings power supply would be bulky. Furthermore, output voltage regulation is limited to small range. In this design, switching mode power topologies are mainly employed. The switching power supply is not only improving in the world of engineering but also rapidly growing markets in the power conversion world. Switching mode power supply (SMPS) can convert a DC input voltage into a different output voltage depending on the circuit topologies. The switching power supply overcomes advantages on linear power supply due to smaller in size, light weight, provide a high quality output, lower power dissipation, reduced costs and more efficient. Therefore, they are extensively used in low power consume devices such as in personal computer, computer peripherals, communication, medical electronics and adapters of consumer electronic devices to give various level of dc output voltages. II. CIRCUIT OPERATION OF BUCK CONVERTER A buck converter is called a step-down DC to DC converter because the output is less than the input. There are only four main components to the buck converter circuit, a high speed switching device, a freewheeling diode, an inductor (L) and an output filter capacitor(c). The output voltage is maintained and monitored at a desired level by a control circuit which is a switch ON and OFF at a set frequency but with a varying duty cycle. The duty cycle is defined as the ratio between ON time to the period of the switching frequency. When the switch is turned ON, current begin flowing from the supply through L, into C and the load. The inductor build up energy in its magnetic field, with the voltage drop developed across L bucking some of the input voltage. When the switch is turned OFF, by its nature the inductor opposes any drop in current by suddenly reversing its voltage and supplies current to the
229 Design and Construction of Variable DC Source for Laboratory Using Solar Energy load via the diode. The DC output voltage which appears across the load is a fraction of the input voltage and is proportional to the duty cycle. The output voltage can be defined as V O =Vs D Figure 1: Buck Converter Circuit III. CIRCUIT OPERATION OF BOOST CONVERTER Boost converter is essentially a step up power converter that takes in a low voltage input and provide at a much higher voltage. The ideal boost converter has five basic components, namely a power semiconductor switch, a diode, an inductor, a capacitor and a PWM controller. The placement of the inductor, the switch and the diode in the boost converter is different from that of the buck converter. It is more complex than the buck. In this case, the MOSFET is in the lower position while the diode is in the upper position. The inductor is on the input side and output has a purely capacitive filter. When the switch is turned ON, diode D is reverse biased and input voltage is applied across inductor. Current builds up in the inductor to a peak value. When the switch is turned OFF, the voltage across L reverse causing the voltage at the diode to rise above the input voltage. The diode then conducts the energy stored in the inductor, plus energy direct from the supply to the smoothing capacitor and load. Therefore output voltage is always greater than the input voltage, making this a set-up converter. For continuous mode operation, the boost converter equation is obtained by a similar process for the buck and is given below: V o = 1 V i 1 D.
IJECSE, Volume 3, Number 3 230 Hnin Mar Wai and Zaw Min Min Htun Figure 2: Boost Converter IV. PROPOSED SYSTEM DC to DC Converter Solarpanel Battery Charge controller Buck and Boost converter load Variable PWM LCD display PIC 16F877A Voltage sensing Figure 3: Overall block diagram of Variable DC power supply V. PRODUCT SPECIFICATIONS Table 1: Boost Converter specifications Table 2: Buck Converter specifications specifications value unit specifications value unit Input voltage(vin) 12 V Input voltage(vin) 12 V output voltage(vout) 11 V output voltage(vout) 36 V Maximum output current 3 A Maximum output current 3 A frequency 30 KHz frequency 30 KHz VI. HARDWARE DESIGN CONSIDERATION
231 Design and Construction of Variable DC Source for Laboratory Using Solar Energy (A) Inductor Selection Inductor losses are the hardest to eliminate, because it has an exact number of turns on the coil to maintain the necessary inductance for the converter to function. The larger the inductor value, the higher the maximum output current because of ripple current. However, if the inductor value is low, the size of inductor will be small. The inductor current rating always must be greater than the switching current. In this design, ferrite core is chosen for use in both buck and boost converter. Ferrite core is mostly used for high frequencies application. Switching frequency is selected at 30 khz. Before calculating of inductor value, it is needed to know about the inductor ripple current. Therefore, IL 0.3 Iout max 0.3 3 0.9A For buck converter inductance value, the input and output parameters are as allow; V IN =12V, I L =3A, Fsw=30 khz Therefore, L= =33.9µH For boost converter, the maximum desired output voltage is 36V. The inductor ripple current is IL 0.3 Iout max 2.7A Now, we can calculate the inductor value by substituting by the following equation; L 98.76µH For Buck Converter Where V IN = typical input voltage V OUT = desired output voltage f SW = switching frequency of the converter = inductor ripple current Δ IL For Boost Converter (B) Rectifier Diode Selection Diode choice is a tradeoff between breakdown voltage, speed, and forward voltage. The higher the forward voltage, the more power that will be dissipated and lost. However, fast diode is needed to act as a switch for the energy in the inductor. If the diode is slow to react, the efficiency of the converter will lower and damaging high voltage transients will develop. To reduce power losses, diodes are selected these abilities: fast switching characteristics, low forward voltage drop, low reverse recovery, sufficient peak and average current handling capability and low thermal resistance. However, fast diode is required to act as a switch for the energy in the inductor. If the diode is slow to react, the efficiency of the converter will lower and damaging high voltage transients will develop. Schottky diode is the most suitable for switched mode power supply and high frequencies DC to DC converter because their current and voltage rating are low. The best combination of these characteristic that could be found was STPCW30LW45CW which has 45 V reverse breakdown, and 0.57 V of forward drop at the expected currents of 30A. Furthermore, switching losses are ignored by using schottky diode. Firstly, the diode current is estimated by this equation. I F =I out (max) (1 D) The power dissipation can be calculated by this equation P D =V F I D Where I F = average forward current of rectifier diode I out = maximum output current necessary in the application (C) Capacitor Selection
IJECSE, Volume 3, Number 3 232 Hnin Mar Wai and Zaw Min Min Htun The right value of capacitance is required to obtain a desired output voltage. As before, the output current is 3A, D =0.9 for buck and boost converter is D=0.67, Ts = 33µs. Assume that the output voltage ripple is 1% of its dc value (i.e. V O = 0.12V.).Therefore, the formula equation for buck converter is following: C For boost converter, the output capacitor is expressed by IL 8 Fsw Vout =100μF C= Iout D Fsw Vout =1000µF Where Cout =output capacitance I out (max) =maximum output current of this application D =duty cycle =switching frequency F sw (D) MOSFET Selection A MOSFET can be used as a switch. It is a voltage-controlled device which is fully ON and approximates a closed switch when the gate-source voltage is sufficiently large. All of buck converter circuit, p-channel MOSFET was used to simplify because it is no need to use the g1ate driver circuit. If the gate voltage is sufficiently high, current will flow from drain to source in P-MOSFET. In this design, the switching MOSFET for buck converter have the following features: drain current is 19A and drain to source breakdown voltage (V DS ) is 100V, Rds of 0.2Ω. Hence, IRF9540N (p-channel) has been selected for buck converter. Only small size of heat-sink is required for small heat dissipation at high current flow conditions. An N-channel enhancement mode power MOSFET is mostly used as a high speed switching device for boost converter. In n-mosfet, the gate voltage is sufficiently high, the current flow from drain to source. The goal of this design for boost converter is set to implement a low-cost hardware device that can give ease and flexibility to produce DC output voltage 36V. Therefore, IRF540 power MOSFET has the following characteristic V DS =100V and I D =33A. Not only it has a maximum leakage current is 100nA and very low resistance of 0.07but also small conduction loss. E. Voltage Sensing Circuit To monitor and sample the voltage from output voltage, voltage divider circuit is required. The operation voltage of PIC16F877A is 3V to 5V. In this circuit, consist of two resistor which one is resistor and other is
233 Design and Construction of Variable DC Source for Laboratory Using Solar Energy potentiometer. These resistors will divide the voltage from output to a suitable volatage which is received by the built in ADC in the microcontroller. Voltage division defines as R 2 V = [ ] V out s R + R 1 2 VII. EXPLANATION OF OVERALL CIRCUIT Figure 4: Schematic diagram of PIC16F877A with Buck and Boost Converter Operation of Overall Circuits There are four parts in this circuit: buck converter, boost converter, driver circuit to drive the gate of MOSFET and voltage sensing circuit. In this design, the mainly source input voltage is from 12 V battery. Firstly, 12V input voltage is step-down nearly minimum output voltage 1.5V to maximum output voltage is 11V. Therefore, buck converter (step-down) was selected. Secondly, the minimum output voltage is 14 v to maximum output voltage is approximately 36V for boost converter. The DC/DC converter is controlled by PIC16F877A microcontroller which is clocked at 20MHz by the crystal. To monitor and sample the output voltage, voltage divider network is needed to lower their voltage range. The PIC16F877A operates voltage range is 3V to 5V. The 5V to power the PIC16F877A is produced by LM7805 linear regulator. For PWM output, pin17 (Capture Module PWM) is used to control the duty cycle of the buck and boost converter. Using PIC software, the frequency of the PWM is set to 30 KHz. The battery voltage runs through a voltage divider network to drop the input voltage into the 5V range that can be read by PIC and output voltage is senesced by using the voltage sensing circuit. Finally, 16 2 line LCD is used to display the output voltage and duty cycle. VIII. SOFTWARE DESIGN CONSIDERATION (A) Microcontroller In this design, PIC 16F877A is chosen as a microcontroller. This microcontroller is the most suitable requirement of this design because of it has ADC (analog to digital converter) module and hardware PWM module. It is operated at speed of 20MHz crystal. At this speed each instruction set will be executed at 50ns second. This program is written in Micro C language and is compiled by micro PRO for version 4.15. The resulting hexadecimal file was programmed to PIC16F877A by connecting PICKIT 2 Programmer. It could read, write, erase and verify the
IJECSE, Volume 3, Number 3 234 Hnin Mar Wai and Zaw Min Min Htun program from the PIC microcontroller in a thousand of times. This PIC16F877A is a complete combination of characteristics, performance, low power consumption for this application. The flash memory has 8 14 bytes, 368 8bytes of data memory (RAM), I/O Ports, CCP modules program for the control process of the microcontroller was written using Micro C. Using PIC kit2.v.2.6.1, the resulting hexadecimal file was programmed on PIC16F877A that is connected to the parallel port of a computer. This program starts by initializing the A/D module and the D/A PWM module and sets the duty ratio at 50%. The PWM module is turned off at this time and the program runs A/D conversion on channel RA0 to sense the output voltage. If the output voltage is greater than desired voltage, the duty cycle will be decreased by 1 and otherwise duty cycle will also be decreased. Figure 5: Circuit Construction of PIC 16F877A for Voltage Sensing Start Initialize ADC module Initialize PWM module PWM duty cycle ratio For buck converter Sense Output voltage YES NO Switch=1 YES Sense Output voltage For boost converter Output voltage >11? PWM duty S=S+1 PWM duty S=S+1 Output voltage >36? NO PWM duty S=S-1 Delay Time Delay Time PWM duty S=S-1 Figure 6: Flowchart of Buck and Boost Converter
235 Design and Construction of Variable DC Source for Laboratory Using Solar Energy Table 3: Pin assignment of PIC16F877A on buck and boost converter Input/output Pin Assignment Connect Process input MCLR To connect always +5V input RA0 To control duty cycle of converters input RA1 To sense converter output voltage input OSC1,OSC2 To connect oscillator 10MHz output CCP1 To send PWM signal to the switch of converter output RD2 to RD7 To display the output voltage result (B) Displaying Device There are many types of Liquid Crystal Display (LCD) module lying on their display function technique. Alphanumeric LCD module is used to provide the user with clear vision for viewing. In this design, 2 16 LCD is employed to display duty cycle and output voltage. They have some advantages of LCD are their low power consumption and low cost. There are basically two types of LCDs are parallel and serial LCDs. Serial LCDs are easier to use than the parallel ones but they usually cost and they couldn t be easily available in the local market. Therefore, a parallel LCD is used in this design. GDM 1602A LCD has been selected. It is two characters per line display module. It has 16 interfacing pins. 1 2 3 4 5 6 9 10 11 12 13 14 7 8 Vss VDD VEE Rs Rw E D0 D1 D2 D3 D4 D5 D6 D7 IX. SIMULATION AND TEST RESULT Figure 7: Simulation Result of Buck Converter Figure 8: Simulation Result of Boost Converter
IJECSE, Volume 3, Number 3 236 Hnin Mar Wai and Zaw Min Min Htun Figure 9: Circuit Construction of Buck and Boost Converter Figure 10: Circuit Construction of Buck Converter Figure 11: Circuit Construction of Boost Converter Table 4: Load variation of Buck Converter Table 5: Load Variation of Boost Converter Vin Load Vout Vin Load Vout 12 1Ω 3.7 V 12 1Ω 13.7V 12 2Ω 4.2 V 12 2Ω 14.6V 12 3Ω 4.9 V 12 3Ω 17.4V 12 4Ω 5.5 V 12 4Ω 19.2 V 12 5Ω 5.9 V 12 5Ω 20.6 V 12 6Ω 6.5 V 12 6Ω 21.5 V 12 7Ω 6.8 V 12 7Ω 22.6 V 12 8Ω 7.1 V 12 8Ω 23.7 V 12 9Ω 7.5 V 12 9Ω 24.9 V 12 10Ω 7.7 V 12 10Ω 26 V 12 11Ω 7.9 V 12 11Ω 27.7 V 12 12Ω 8.1 V 12 12Ω 28.8 V 12 13Ω 8.3 V 12 13Ω 30.3 V 12 14Ω 8.6 V 12 14Ω 32 V 12 15Ω 8.9 V 12 15Ω 32.8 V 12 16Ω 9.5 V 12 16Ω 33.4 V 12 17Ω 9.7 V 12 17Ω 35.3 V 12 18Ω 10.1 V 12 18Ω 35.9 V 12 19Ω 10.5 V 12 19Ω 36 V 12 20Ω 10.9 V 12 20 36.9 V
237 Design and Construction of Variable DC Source for Laboratory Using Solar Energy X. DISCUSSION There are several types of DC to DC converter and among them, non-isolated DC to DC converter version buck and boost converter has been employed for this system. It is a high frequency switching element, thus it is required to obtain a high switching diode, a capacitor and an inductor for energy storage. Furthermore, also needed MOSFET which is used as a switch for ON and OFF. But high frequency switching device are increased in noise. XI. CONCLUSION Solar energy becomes more and more popular and it is very available solar panels in anywhere. Solar energy is the primary energy source for earth. Some of the energy pollutes the environment to generate the electricity. But, solar energy is non-polluting, no moving parts and no noise. Therefore, solar energy is used as a source through battery. Using solar energy, can obtain some advantages are no loss other fuel energy and save the electrical energy. Almost every laboratory DC power supplies use power transformers to step down the voltage which are very heavy and bulkier. By using transformer it is very difficult to have good output regulation. By using switch-mode principle we could overcome advantages are less cost, reduce size and more efficient. This work may have completed a function but it is a low cost laboratory DC power supply using PIC16F877A microcontroller. The use of the microcontroller for this design reduces the size. The PIC was successfully programmed to facilitate control for output voltage. The test carried out on this project give that it is stable, reliable and accurate. REFERENCE [1] Hazel Gravel, power semiconductor application laboratory, switching mode power supply. [2] Introduction to power electronics [3] Buck power stage in switch mode power supplies and Boost power switch mode power supplies [4] Switchin moder power supply topologies part (II) [5] www.microchips.com smps