TEMPERATURE CONTROLLED NiCd BATTERY CHARGER HAZER BIN MOHAMAD SAYUTI This thesis is submitted as partial fulfillment of the requirements for the award of the Bachelor of Electrical Engineering (Hons.) (Power System) Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang NOVEMBER, 2008 iv ACKNOWLEDGEMENT In order to finish this thesis, I have met a lot of people to refer or take advice, my beloved friends, supervisor and subject coordinator. They have contributed towards my understanding and thought about thesis writing, since this is my first time to write the thesis so I have no experience. I wish to express my appreciation to my supervisor En Ruhaizad Bin Ishak for encouragement, guidance, and criticism, he also responsible to push me in order to finish my project and the thesis perfectly on time, thanks a lot to him. I am also very thankful to subject coordinator En Reza Ezuan Bin Samin for their cooperation to give me a guide line of writing thesis. Not forget to En Fairuz who help me a lot in developing the programming, he also give me a guidance and suggestion about the temperature sensor. To all FKEE labs staff especially En Shalmizan who gives me an excuse to get a new PIC on last minute after mine had burn while doing the project. My sincere gratitude also goes to Mohd Khairi Khalib, my tutor who has helped me a lot in programming. Without all of them, my thesis will not have been as presented here. v ABSTRACT Nowadays electronic gadgets are widely use due to the growth of new technology. Most electronic gadgets use dry cell as their main energy source; this is due to its small size, efficiencies and recharge ability. Recharge the battery can save cost and reduce the thrown of old battery which can effect the environment. Electrochemical reaction in battery is affected from the temperature. Connecting a device creates a current and the electrons flow through the device to the positive side. At the same time, an electrochemical reaction takes place inside the batteries to replenish the electrons. The effect is a chemical process that creates electrical energy. Once the battery nears a full charge, excess charge current becomes heat. The heat begins to accumulate in the mass of the battery side. As the heat accumulates, temperature of the battery begins to rise. Current through the battery begins to double for every degree Celsius, thus more power is dissipated in the battery which means more heat is generated, as a result more current flows which produce more heat. The heat increase the resistance of the battery, thus the voltage loss occurs and the charging became less efficiency as a result the optimum charging can’t be achieved. To overcome this problem, the cooling fan is added to maintain the battery temperature. The sensor is function to measure the battery’s temperature and driver circuit driving the cooling fan if the battery’s temperature reaches the set value (31 ºC). vi ABSTRAK Pada masa kini, alat elektronik digunakan dengan meluas kesan daripada pertumbuhan teknologi baru. Alatan elektronik kebanyakan menggunakan sel kering sebagai penjana tenaga utama, ini disebabkan oleh saiznya yang kecil, kecekapanya dan keupayaan untuk dicas semula. Cas bateri dapat menjimatkan belanja dan mengurangkan pembuangan bateri lama yang boleh memberi kesan tidak sihat kepada persekitaran. Tindakbalas elektrokomia didalam bateri diakibatkan daripada perbezaan suhu yang terhasil. Penyambungan litar lengkap sesebuah alat mengakibatkan arus elektrik dan elektron-elektron bergerak melalui alat tersebut menuju ke bahagian positif. Pada masa yang sama, tindakbalas elektrokimia terhasil di dalam bateri dan menambah jumlah elektron. Kesan daripada proses kimia tersebut menghasilkan tenaga elektrik. Apabila bateri hampir cas penuh, arus elektrik daripada cas lebihan akan bertukar menjadi haba. Peningkatan suhu mula untuk terkumpul didalam bateri. Peningkatan suhu yang terkumpul mengakibatkan suhu bateri meningkat. Elektrik yang melalui bateri bermula untuk meningkat untuk setiap penambahan darjah celcius, oleh itu lebih kuasa dihamburkan dalam bateri, bermaksud lebih haba dihasilkan, kesannya tenaga elektrik yang terhasil akan menghasilkan lebih haba. Peningkatan haba meningkatkan rintangan bateri meningkat, oleh itu berlaku kehilangan voltan dan proses cas menjadi semakin kurang cekap. Hasilnya cas optimum tidak akan tercapai. Untuk mengatsi masalah ini, kipas digunakan untuk mengekalkan suhu bateri. Alat pengukur suhu digunakan untuk mengukur suhu bateri dan litar pemandu memandu kipas penyejuk. vii TABLE OF CONTENTS PAGE TITLES i DECLARATION ii DEDICATION iii ACKNOWLEDGEMENT iv ABSTRACT v ABSTRAK vi CONTENTS vii LIST OF TABLES xi LIST OF FIGURES xii LIST OF APPENDICES xiii CHAPTER 1 INTRODUCTION 1.1 Overview 1 1.2 Objectives 3 1.3 Scope of project 3 1.4 Problem statement 4 1.5 Thesis organization 5 viii CHAPTER 2 2.1 LITERATURE REVIEW NiCd Cell 6 2.1.1 Introduction to NiCd Cell 6 2.1.2 Advantages 7 2.1.3 Voltages 7 2.1.4 Charging 8 2.1.5 Charging method 9 2.1.6 Overcharging 9 2.2 Thermistor 10 2.2.1 Introduction 10 2.2.2 Advantages 11 2.2.3 Disadvantages 11 2.3 PIC Microcontroller 12 2.3.1 History 13 2.3.2 Variants 14 2.3.3 Microchip Programmer 14 2.4 MPLAB 15 2.5 PICBasic Pro Compiler 16 2.6 Driver Circuit 16 CHAPTER 3 METHODOLOGY 3.1 Introduction 18 3.2 Methodology 19 3.2.1 Developing power supply and charging circuit 21 ix 3.2.2 Installation of temperature sensor 23 3.2.3 Developing LCD display circuit 25 3.2.4 Developing driver circuit 27 3.2.5 Developing PIC Circuit 29 3.2.5 Build PIC programming 30 3.3 Picture of hardware CHAPTER 4 34 RESULT AND DISCUSSION 4.1 Introduction 35 4.2 Charging process 35 4.3 Charging temperature 38 CHAPTER 5 CONCLUSION AND RECOMMENDATION 5.1 Conclusion 40 5.2 Future recommendation 41 5.3 Costing and commercialization 41 REFERENCES 43 APPENDIXES APPENDIX A PIC Programming 45 APPENDIX B PIC 16F877A Date sheet 48 APPENDIX C High/Low Driver Data sheet 54 APPENDIX D Thermistor TTC103 Data sheet 57 APPENDIX E Voltage Regulator LM317 Data Sheet 59 x APPENDIX F Power MOSFET IRF540 Data Sheet 61 APPENDIX G Table of price 63 APPENDIX H Hardware of project 65 xi LIST OF TABLES TABLE NO TITLE PAGE 3.1 Voltage versus temperature 25 4.1 Time of charging with the increasing in voltage 36 4.2 Time of charging with the increasing in battery Temperature 38 xii LIST OF FIGURES FIGURE NO. TITLE PAGE 1.1 NiCd charging rate versus temperature 4 2.1 40 pin PIC 16F877A 12 3.1 Flow chart the whole project 20 3.2 Power supply and charging circuit 22 3.3 Thermistor TTC103 23 3.4 Characteristic Curve 24 3.5 2x16 LCD Display 25 3.6 LCD display connection 26 3.7 Driver circuit 28 3.8 Developing PIC circuit 29 3.9 Methodology of Programming 31 3.10 Example of Hex files 32 3.11 Hardware and labeling 34 4.1 Charging voltage versus Time 37 4.2 Battery temperature versus Time 39 xiii LIST OF APPENDICES APPENDIX TITLE PAGE A PIC Programming 45 B PIC 16F877A Data Sheet 48 C High/Low Driver Data Sheet 54 D Thermistor TTC103 Data Sheet 57 E Voltage Regulator LM317 Data Sheet 59 F Power MOSFET IRF540 61 G Table of Price 63 H Hardware of the Project 65 1 CHAPTER 1 INTRODUCTION 1.1 Overview Nowadays electronic gadgets are widely use due to the growth of new technology. Most electronic gadgets use dry cell as their main energy source; this is due to its small size, efficiencies and recharge ability. Recharge the battery can save cost and reduce the thrown of old battery which can effect the environment. Temperatures do affect the battery since battery is electrochemical devices that convert chemical energy into electrical energy. As full charge is reached the amount of energy used in the endothermic reaction decrease and the amount dissipated in heat increase (making the cell get hot). Connecting a device creates a current and the electrons flow through the device to the positive side. At the same time, an electrochemical reaction takes place inside the batteries to replenish the electrons. The effect is a chemical process that creates electrical energy. Once the battery nears a full charge, excess charge current becomes heat. Small at first, the heat begins to accumulate in the mass of the battery side. As the heat accumulates, temperature of the battery begins to rise. Current through the battery begins to double for every degree C, thus more power is dissipated in the battery which means more heat is generated, as a result more current flows which produce more heat. 2 The essence of good charging is to be able to detect when the reconstitution of the active chemicals is complete and to stop the charging process before any damage is done while at all times maintaining the cell temperature within its safe limits. Detecting this cut off point and terminating the charge is critical in preserving battery life. In the simplest of chargers this is when a predetermined upper voltage limit, often called the termination voltage has been reached. This is particularly important with fast chargers where the danger of overcharging is greater. The charger has ability to turn of when the battery is fully charged, this is due to voltage drop at resistor 10ohm. Its then drive the transistor PNP and finally energize the 12V relay to cut off the circuit. The charging voltage can be varied using 1K ohm potentiometer to maximum voltage 6.67V. Here I use PIC 16F877A to read the temperature from thermistor and display the temperature on LCD. In order to maintain the battery’s temperature, 12V cooling fan is use. The cooling fan is set to start rotate when the temperatures reach 31 degree Celsius. 3 1.2 Objectives The main objective of the project is: i. To charge four units at 1.25V NiCd cell from no charge condition to full charge. The charge is determined by connect the battery to the load such as 12V motor, if the motor is not running or slow, then the battery is said to have low charge or no charge as well and otherwise. ii. To display the temperature of the batteries being charge on the LCD. iii. To turn on the 12V cooling fan when temperature of the battery reach 31ºC and above (the value can be adjusted due to ambient room temperature). The important part of this project is to drive the 12V cooling fan when battery’s temperatures reach 31 ºC. Here driver circuit is implemented in order to drive the fan. 1.3 Scope of project The scope of the project is to develop the power supply circuit that reduce the 240V AC to 9V AC and then convert to DC using bridge rectifier. Secondly is to charging the 4 unit NiCd AA cells from no charge condition to full charge. And the third part is to measure the temperature of the battery and display on LCD. The last part is to drive the cooling fan when temperatures of the battery reach 31 ºC and above. 4 1.4 Problem Statement This project is about developing the fast charging NiCd charger that boosts high current into the battery. High current that enter into the battery reduce the charging time, the charger only require 5 to 6 hours to completely charging from no charge to fully charge. The temperature start increase rapidly when the cell is almost achieve full charge as shown in Figure 1.1. Thus it is important for fast charging charger to maintain the battery temperature within 10 degree C to 40 ºC, and the ideal temperature is 25 ºC for optimal charging. The main problem of fast charging is heat that produce in the battery due to power dissipated. The increasing in heat effect the increasing of battery resistance, as the result the charging process became less efficiency due to voltage drop before inserting into the battery. It is important to maintain the battery temperature to make sure the fast charging is affianced and less power or voltage loss. Figure 1.1: NiCd charging rate versus temperature 5 1.5 Thesis Organization This thesis consists of five chapters including this chapter. The contents of each chapter are outlined as follows; First chapter is the introduction of the thesis which contains the overview, objectives, scopes and problem statements of the project. Chapter 2 contains the detail description each part of the project. It will explain about the NiCd cells, charging circuit, thermistor, PIC and driver circuit of the cooling fan. Chapter 3 includes the project methodology. This will explain how the project is organized and the flow of the process in completing this project. Chapter 4 presents the expected result and analysis of the charging rate and charging rate with the increasing in temperature. Finally the conclusion and recommendation is presented in chapter 5. The conclusion part is to conclude the project in detail and recommendation is the suggestion in order to upgrade the project so that it can be more effective and can be commercialized. 6 CHAPTER 2 LITERATURE REVIEW 2.1 NiCd Cells 2.1.1 Introduction of NiCd cells The nickel-cadmium battery (commonly abbreviated NiCd) is a type of rechargeable battery using nickel oxide hydroxide and metallic cadmium as electrodes. [1] The abbreviation NiCad is a registered trademark of SAFT Corporation and should not be used to refer generically to nickel-cadmium batteries, although this brandname is commonly used to describe all nickel-cadmium batteries. On the other hand, the abbreviation NiCd is derived from the chemical symbols of nickel (Ni) and cadmium (Cd), though it is not to be confused with a chemical formula. [1] 7 2.1.2 Advantages The principal advantages of NiCd over other rechargeable types is lower weight for a given quantity of stored energy, good charging efficiency, small variation in terminal voltage during discharge, low internal resistance, and non-critical charging conditions. They can be used in place of regular (lead-acid) batteries in most applications. They have a much higher tolerance for extremes in heat and cold, whereas standard lead-acid batteries suffer shorter life expectancy at higher temperatures and reduced output capacity at lower temperatures. [1] [8] 2.1.3 Voltages Nickel-cadmium cells have a nominal cell potential of 1.25 V. This is lower than the 1.5 V of many popular primary cells, and consequently they are not appropriate as a replacement in all applications. Unlike common primary cells, a NiCd cell's terminal voltage only changes a little as it discharges. Because many electronic devices are designed to work with primary cells that may discharge to as low as 0.90 to 1.0 V per cell, the relatively steady 1.25 V of a NiCd is enough to allow operation. Some would consider the near constant voltage a drawback as it makes it difficult to detect when the battery charge is low. [1] NiCd batteries used to replace nominally 9-V "transistor radio" batteries usually only have six cells, for a terminal voltage of 7.2 volts. While most pocket radios will operate satisfactorily at this voltage, some manufacturers such as Varta made 8.4 volt batteries with seven cells, for more critical applications. [1] 8 2.1.4 Charging NiCd batteries can charge at several different rates, depending on how the cell was manufactured. The charge rate is measured based on the percentage of the amp-hour capacity the battery is fed as a steady current over the duration of the charge. Regardless of the charge speed, more energy must be supplied to the battery than its actual capacity, to account for energy loss during charging, with faster charges being more efficient. For example, the typical "overnight" charge, called a C/10 charge, is accomplished by applying 10% of the batteries total capacity for a period of 14 hours; that is, a 100 mAh battery takes 140 mAh of energy to charge at this rate. At the "fast charge" rate, done at 100% of the rated capacity, the battery holds roughly 80% of the charge, so a 100 mAh battery takes 120 mAh of energy to charge (that is, approximately 1 hour and fifteen minutes) The downside to faster charging is the higher risk of overcharging, which can damage the battery. [1] The safe temperature range for a NiCd battery in use is between −20 °C and 45 °C. During charging, the battery temperature typically stays low, around 0°C (the charging reaction absorbs heat), but as the battery nears full charge the temperature will rise to 45–50 °C. Some battery chargers detect this temperature increase to cut off charging and prevent over-charging. [1] When not under load or charge, a NiCd battery will self-discharge approximately 10% per month at 20 °C, ranging up to 20% per month at higher temperatures. It is possible to perform a "trickle charge" at current levels just high enough to offset this discharge rate; to keep a battery fully charged. However, if the battery is going to be stored unused for a long period of time, it should be discharged down to at most 40% of capacity (some manufacturers recommend fully discharging, or even short-circuiting), and stored in a cool, dry environment. [1] 9 2.1.5 Charging Method A NiCd battery requires a charger with a slightly different voltage charge level than a lead-acid battery, especially if the NiCd has 11 or 12 cells. In addition, the charger requires a more intelligent charge termination method if a fast charger is used. Often NiCd battery packs have a thermal cut-off inside that feeds back to the charger telling it to stop the charging once the battery has heated up and/or a voltage peaking sensing circuit. At room temperature during normal charge conditions the cell voltage increases from an initial 1.2 V to an end-point of about 1.45 V. The rate of rise increases markedly as the cell approaches full charge. The end-point voltage decreases slightly with increasing temperature. [1] 2.1.6 Overcharging Overcharging must be considered in the design of most rechargeable batteries. In the case of NiCds, there are two possible results of overcharging: If the anode is overcharged, hydrogen gas is produced If the cathode is overcharged, oxygen gas is produced. For this reason, the anode is always designed for a higher capacity than the cathode, to avoid releasing hydrogen gas. There is still the problem of eliminating oxygen gas, to avoid rupture of the cell casing. NiCd cells are vented, with seals that fail at high internal gas pressures. The sealing mechanism must allow gas to escape from 10 inside the cell, and seal again properly when the gas is expelled. This complex mechanism, unnecessary in alkaline batteries, contributes to their higher cost. NiCd cells dealt with in this article are of the sealed type (see also vented type). Cells of this type consist of a pressure vessel that is supposed to contain any generation of oxygen and hydrogen gasses until they can recombine back to water. Such generation typically occurs during rapid charge and discharge and exceedingly at overcharge condition. If the pressure exceeds the limit of the safety valve, water in the form of gas is lost. Since the vessel is designed to contain an exact amount of electrolyte this loss will rapidly affect the capacity of the cell and its ability to receive and deliver current. To detect all conditions of overcharge demands great sophistication from the charging circuit and a cheap charger will eventually damage even the best quality cells. [1] 2.2 Thermistor 2.2.1 Introduction Thermistor is temperature sensing device base on resistance, which means is there are any change in temperature then the resistance of the device will change. [6] 11 2.2.2 Advantages The main advantage of thermistor is due its low cost compare to other temperature sensor available on market today. It’s also easy to use, since it’s come with 2 pin connected and have no polarities. [6] 2.2.3 Disadvantages Thermistor is temperature sensing that actually function as a switch in analog circuit. It’s not suitable for measuring temperature since its variable in resistance, compare to other temperature sensing which variable in voltage (analog) or output in digital. [6] 2.3 PIC Microcontroller PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Programmable Interface 12 Controller”, but shortly thereafter was renamed "Programmable Intelligent Computer". [2] PICs are popular with developers due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability. Figure 2.1 shows PIC 16F877A that has been use in the project. [2][5] Figure 2.1: 40 pin PIC 16F877A 13 2.3.1 History The original PIC was built to be used with General Instruments' new 16-bit CPU, the CP1600. While generally a good CPU, the CP1600 had poor I/O performance, and the 8-bit PIC was developed in 1975 to improve performance of the overall system by offloading I/O tasks from the CPU. The PIC used simple microcode stored in ROM to perform its tasks, and although the term wasn't used at the time. [2] In 1985 General Instruments spun off their microelectronics division, and the new ownership cancelled almost everything — which by this time was mostly out-ofdate. The PIC, however, was upgraded with EPROM to produce a programmable channel controller, and today a huge variety of PICs are available with various on-board peripherals (serial communication modules, UARTs, motor control kernels, etc.) and program memory from 512 words to 64k words and more (a "word" is one assembly language instruction, varying from 12, 14 or 16 bits depending on the specific PIC micro family). [2] Microchip Technology does not use PIC as an acronym in fact the brand name is PICmicro. It is generally regarded that PIC stands for Peripheral Interface Controller, although General Instruments' original acronym for the initial PIC1640 and PIC1650 devices was "Programmable Interface Controller".[2] The acronym was quickly replaced with "Programmable Intelligent Computer"[2]