University of Portland School of Engineering 5000 N. Willamette Blvd. Portland, OR 97203-5798 Phone 503 943 7314 Fax 503 943 7316 Final Report Project Molalla: MicroprocessorBased Charge Controller Contributors: Andrew Melton Antoinette Realica John Turner Approvals Name Dr. Lu Date Name Date Dr. Lillevik Insert checkmark (√) next to name when approved. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. NAME . . . . . Revision History . . Rev. Date. 0.9 04/12/2006. FINAL REPORT PROJECT MOLALLA 0.95 1.0 04/18/2006 04/19/2006 UNIVERSITY OF PORTLAND REV. 1.0 UP-EE-TR-06-06 PAGE II Author A. Melton A. Melton A. Melton Reason for Changes Initial draft Suggestions from advisor Suggestions from approval mtg SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . . Acknowledgements . We would like.to express our gratitude to: . - Dr. Lu, . our Faculty Advisor, and Mr. Hui, our Industry Representative, for the FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 PAGE III guidance and support they have given us through this project. - Ms. Sandy Ressel, our Electronics Technician, for providing us with parts and soldering services - Mr. Gary Carlson for helping us formulate the idea for the project - The University of Portland Multnomah School of Engineering for funding the project - The Electrical Engineering faculty for lending to us their wisdom through the advice and insight they gave us - Family and friends for the encouragement and patience they showed us during the Senior Design process UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . . Table of Contents . . Summary....................................................................................................................... 1 . . Introduction .................................................................................................................. 2 FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 PAGE IV Background .................................................................................................................. 3 Methodology ................................................................................................................ 4 Results .......................................................................................................................... 5 Technical..................................................................................................................................................5 Intermediate Battery .........................................................................................................................5 Vehicle Battery Pack ........................................................................................................................5 PIC Microprocessor .........................................................................................................................6 Voltage Sensors ...............................................................................................................................6 Boost Converter ...............................................................................................................................6 Relay .................................................................................................................................................7 Process ....................................................................................................................................................8 Assumptions .....................................................................................................................................8 Milestones.........................................................................................................................................8 Risks .................................................................................................................................................8 Resources ........................................................................................................................................9 Contingencies ................................................................................................................................ 10 Change Control Board (CCB) ...................................................................................................... 11 Final Outcome ............................................................................................................................... 11 Conclusions ...............................................................................................................12 Appendices.................................................................................................................13 Appendix A .................................................................................................................14 Appendix B .................................................................................................................15 Appendix C .................................................................................................................17 UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . Appendix D ................................................................................................................. 18 . . . . List of Figures. FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 PAGE V Figure 1 Molalla Product ................................................................................................................................3 Figure 2 Molalla System Block Diagram .......................................................................................................5 Figure 3 Boost converter and LM3488..........................................................................................................7 Figure 4 Molalla Schedule .......................................................................................................................... 18 UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA Chapter 1 . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 1 Summary Project Molalla is a microprocessor based charge controller that will supplement the preexisting charging power control unit of a hybrid vehicle with an additional solar charging source. In designing our project we followed standard engineering procedures in a top down design method with bottom up implementation. We specified major inputs and outputs, divided one main block into several small functional units, then researched and designed each block. There are two key components that comprise Project Molalla: the boost converter and the microprocessor. The boost converter steps the voltage from the intermediate battery (24V) to the desired level (150V) to charge the vehicle battery. The microprocessor monitors whether or not the vehicle battery needs charging and selects an available charging source, where the pre-existing power control unit is the default source. After assessing our resources, we went forth with the design that was the best solution given our budget and time constraints. Other boosting methods would have required transformers or specific inductors, the production of which would need special design and manufacturing. This would have called for more time and money than we were available to us. At the time of our prototype release, we were able to demonstrate a successful product. Our boost converter block was capable of boosting from 24V to 150V and has successfully charged batteries with 0.5A constant current, and our microprocessor block was able to monitor input voltages and control relays accordingly. In encasing our product, we encountered problems that we did not predict or expect and remedied them as best we could. Thus incorporating the product into a single case would lend itself well to future development. The remainder of this document will further introduce our project, give greater detail about our design and implementation methodology, and finally explain the results of our work. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . . . . . . FINAL REPORT PROJECT MOLALLA Chapter 2 REV. 1.0 UP-EE-TR-06-06 PAGE 2 Introduction This document describes how product Molalla, the microprocessor-based charge controller, was constructed and the end results of the product. The methodology section provides a description of design and build process. The results detail the performance of the product, and the conclusions include future developments and improvement suggestions to the product. The rest of the document is laid out as followed: Methodology Results o Technical o Process Conclusions Appendices UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA Chapter 3 . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 3 Background As prices for crude oil continue to rise to historic levels, it is evident that reliance on fossil fuels will be an unaffordable peril to future generations. Scarcity and cost of these fuels combined with their emission of greenhouse gases make a powerful case for the development of non-fossil fuel based methods of transportation. Project Molalla seeks to increase the technology base for alternative energy based cars by providing an upgradeable power mediator that will increase fuel efficiency. There exist several categories and schemes of battery chargers. In general, our scheme falls under “opportunity charging” as it incorporates power whenever it is available. This is an apt description for an onboard charger in a hybrid vehicle as power sources (such as regenerative braking, alternators, and solar panels) are not constant. Project Molalla must choose from available power sources. The first available source is the pre-existing power control system in the hybrid that mediates charging between regenerative braking and a gasoline powered generator. The second source will be an intermediate battery charged by a solar panel (see Figure 1). Project Molalla will act as a smart switch between these sources, allowing the intermediate battery to charge the vehicle batteries when the existing power unit is not available. Molalla Product Figure 1 Molalla Product It is important to note that actual sources and loads such as working car alternators, regenerative braking systems, multiple car batteries, and solar panels are costly and difficult to obtain. This introduces a possible limitation on the ability to test the device, requiring accurate source and load modeling. A final limitation on Project Molalla’s design is in its ruggedness. Adequate research and implementation of a rugged device capable of extreme operation over hundreds of thousands of miles and several years is a project in itself. For this reason, the product will be theoretical rather than actually mounted inside of a vehicle. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . . . . . . FINAL REPORT PROJECT MOLALLA Chapter 4 REV. 1.0 UP-EE-TR-06-06 PAGE 4 Methodology In designing our overall product, we began with a hierarchical approach. Our goal was top down design and bottom up implementation. We defined how we wanted our project to function, and then divided it into several functional blocks. Each block was then independently designed and finally integrated. Before doing any design however, we had to perform significant research to resolve various problems unique to our project. Before performing any design work, we also made assumptions, assessed various risks, created contingency plans, and created a detailed schedule with important milestones. In addition, we listed all resources that we would need, assigned necessary tasks to specific group members, and created a budget that encompassed the entire project. After design began, our work was organized as follows: - Drew schematics - Selected and ordered parts - Building - - o Boost converter – first on bread board, then designed PCB o Programmed PIC using MPLAB ICD2 Unit testing o PIC monitoring – completely debugged PIC control and relay switching separate from boost circuit o Operated boost converter and analyzed various waveforms. Replaced key parts to achieve stability. Integration o Made all appropriate connections to use PIC to monitor and control the boost converter and relays. o Encased finished product. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA Chapter 5 . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 5 Results Technical As shown in Figure 2, the Molalla Product consists of a PIC microprocessor, a boost converter, voltage sensors, and relays. The PIC microprocessor monitors the output of the pre-existing power unit of the hybrid vehicle and the intermediate battery through the voltage sensors. When there is no output from the pre-existing power unit, the PIC checks if there is enough charge in the intermediate battery to charge the vehicle battery, and if there is a sufficient amount of charge, it switches the relays so that the intermediate battery is charging the vehicle battery. The intermediate battery is able to provide the necessary voltage/current needed for charging through the boost converter. Whenever output appears from the pre-existing power unit, the PIC switches the relays so that the pre-existing power unit is charging the vehicle battery (default mode). The overall Molalla schematic can be found in Appendix A. Figure 2 Molalla System Block Diagram Intermediate Battery - Modeled as two 12V Yuasa lead acid batteries Vehicle Battery Pack - Modeled as eleven 12V Yuasa lead acid batteries UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . PIC Microprocessor . . - PIC18F452 . . - Enables/disables boost converter based on the status of the voltage sensors. . FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 PAGE 6 - Contains an A/D Converter used to verify charge from the pre-existing power unit and from the intermediate battery - Output pins send out a logic 1 (approximately 5V) or 0 (0V) - o Controls relays. o MOSFETS for voltage sampling PIC Program Flow Diagram – see Appendix C Voltage Sensors - Sense the battery voltages and provide inputs to the PIC as feedback. - Consists of two resistors that provide a voltage divider scheme - Chosen to output a small current (μA range) for small i2R loss o For intermediate battery: 43.5 kΩ and 5.1 kΩ resistor combination o For vehicle battery: 1.5 MΩ and 27 kΩ resistor combination Boost Converter - Steps the intermediate battery voltage from 24V to 150V and charges the vehicle battery pack with a constant 0.5A of current. - Consists of n-channel MOSFET, N-Channel IC Controller (LM3488) which maintains constant current for battery charging, an inductor, capacitors, and a diode rectifier as shown in Figure 3. Refer to Appendix A and Appendix B for actual part values. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . . . . . . FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 PAGE 7 Figure 3 Boost converter and LM3488 Relay - Acts like a DC transfer switch, switching between two power sources: the intermediate battery and the pre-existing power unit of the hybrid vehicle o o - Consists of one normally open relay connecting the intermediate battery to the vehicle battery and one normally closed relay connecting the pre-existing power unit of the hybrid vehicle to the vehicle battery Magnecraft 199BX-11 Power Relay Crydom Solid State Relay D2D07 In case the product fails, the normal operation of the hybrid vehicle is not hindered (connection between pre-existing power unit of the hybrid vehicle and the vehicle battery remains intact) Controlled by the PIC. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA Process Assumptions . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 8 In this project we assumed that: Batteries can provide at least 12.5 amps continuous current. Parts needed are available and affordable. Our assumptions were adequate. We were able to draw enough current from the batteries and found and acquired the parts needed. Milestones Our milestones were: Number 1 2 3 4 Description Product Approval Plan Approval Design Release Boost Converter Built (added Original Previous Present 10/28/05 03/02/06 04/13/06 10/07/05 11/11/05 12/09/05 N/A 10/07/05 11/11/05 12/09/05 12/15/05 10/05/05 11/11/05 12/09/05 12/15/05 01/27/06 02/24/06 03/03/06 04/07/06 04/11/06 04/13/06 03/24/06 02/24/06 03/30/05 04/03/06 04/11/06 04/13/06 03/24/06 02/24/06 03/30/06 04/05/06 04/11/06 04/13/06 12/08) 5 6 7 8 9 10 Parts Received TOP’s Approval PIC Program 0.95 Prototype Release Founder’s Day Final Report Dropped Milestones Boost Converter Stage 1 Built Voltage and Current Sensor Built Boost Converter Stage 2 Built 12/15/05 02/10/06 N/A N/A N/A N/A 03/03/05 N/A N/A We were able to meet most of our milestones on time. Some we accomplished before the expected deadline. A few we had to postpone, but we adjusted the schedule accordingly. Risks We assessed and experienced the following risks: UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . Boost converter failure – high risk. . . o Since the boost converter is an important component to Project Molalla. It . the core functionality of the product by creating the boosted voltage provides . used to charge the vehicle batteries. Hence its failure will affect our project signal . severely. FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 o PAGE 9 We experienced: o Stability issues – bread board vs. PCB o Extensive debugging o High voltages and current resulting in high parts fatality. We had to reorder parts and use overnight shipping on several occasions. Part availability – medium risk. o Special parts required for the completion of the product may not be available to the typical consumer. This will restrict the choices available when designing the product. o We experienced: o Difficulty in finding DC relay to fit the task. o Difficulty in finding the proper gate driver to drive the MOSFET that would provide the proper on-voltage Late arrival of parts – medium risk. o Delays the progress of Project Molalla. Resources These resources were available to us: Personnel o Andrew Melton. Team leader for Spring 2006. Design, implement, and test PIC program. o Antoinette Realica. Recording Secretary. Design, implement, and test relays and voltage sensing portion. Webmaster. o John Turner. Team leader for Fall 2005. Design, implement, and test boost converter. o Dr. Wayne Lu: Project advisor. o Mr. Andrew Hui: Industry representative. o Sandy Ressel: Electronics technician UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . o Mr. Gary Carlson. Independent contributor . . Equipment . . o Oscilloscope . FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 o Bread board o DC Power Supply o Ammeter o Voltmeter PAGE 10 Facilities o EH 2007 (Electrical Circuits Laboratory) o EGR 312 (Microprocessor Lab) o EH 2001 (Senior Design Laboratory) Time – see Appendix D for schedule We created a schedule, met weekly, and prepared a budget to ensure successful completion of our project. However, we spent more time and money on the project than originally predicted due to unexpected problems that we encountered. Debugging the boost converter and the PIC code took more time than expected. As for our budget, while we were able to incur free samples from companies, our high parts fatality caused us to reorder parts with overnight shipping to keep on schedule. Contingencies Our contingency plans were: Boost Converter Failure: o Increase intermediate battery voltage o Purchase off the shelf 12V DC to 220V AC inverter, then rectify and buck to 150V o Use PIC for PWM in a cascaded boost converter topology Part availability o Find an alternate part or redesign to match parts available Late arrival of parts o Be patient o Order from another supplier UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . Our final product used our main plan, thus no contingencies were fully developed. However, . initial testing of the IC based boost converter gave mixed results so we began developing our . contingency plans. We were able to successfully use the PIC to provide PWM and control in a single stage boost. converter and built a two stage boost converter on a PCB. Unfortunately, we were not able .to successfully debug the circuit due to time constraints. We also purchased . DC to 220V AC inverter and other required parts for our third contingency. an off the shelf 12V FINAL REPORT PROJECT MOLALLA REV. 1.0 UP-EE-TR-06-06 PAGE 11 We did not, however, afford time to developing this contingency because we felt that our time would be spread too thin. Fortunately, continued debugging efforts on the IC based boost proved successful. Change Control Board (CCB) We performed a CCB request on December 6, 2005 to use an IC instead of the PIC to provide PWM and control for the boost converter. We had originally planned to use the PIC for the PWM signal in a dual stage, cascaded boost but later found an IC that simplified the converter significantly by requiring only one stage and eliminating the need for the PIC control. In addition, after talking to professionals in industry, we were informed that it was somewhat unconventional to take a cascaded boost approach. The impact of this CCB was that the role of the PIC in providing PWM and providing current sensing for stability were eliminated since the IC would be able to provide these, but the PIC was still necessary for voltage sensing/source selection. Final Outcome We succeeded in producing all of the individual functions required for a microprocessor based charge controller. At the time of our prototype release, we had a complete, functional system. This included a successful boost circuit and monitoring circuit that was controlled by the microprocessor. Upon integrating the entire product into a single enclosure, we encountered complex problems as a result of mixing high and low power systems. We narrowed them down to ground bouncing, EMI, and a sudden voltage change on the intermediate battery due to large current draw. These problems are worth exploring and would be great for future development of the product. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA Chapter 6 . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 12 Conclusions Project Molalla is a step towards enhancing the current technology for alternative energy based cars by including solar energy to the pre-existing charging scheme. With the rising costs of fuel, it is our hope that the implementation of harnessing solar energy to power hybrid vehicles will increase fuel efficiency in a vehicle. Our boost converter is functional and is based on the LM3488 controller from National Semiconductor. It outputs a constant 0.5A of current to charge the vehicle battery pack in a single stage boost from 24V to 150V. The microprocessor can enable and disable the two relays based on the input and output voltages read from the voltage sensing blocks. We were successful in implementing the individual functional blocks of our design and in integrating them into a final product outside of an enclosure. Full integration of the product into an enclosure was not achieved at the time of this document. Should further development of the Molalla product be undertaken, we would like to recommend analyzing EMI issues, observing ground bounce issues, and finally realizing full integration into an enclosure. Should more time and money become available, we would recommend a fly back or forward converter approach instead of using a boost converter. UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA UNIVERSITY OF PORTLAND . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 13 Appendices SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA UNIVERSITY OF PORTLAND . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 14 Appendix A SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 15 Appendix B Int_Batt - 2 * Yuasa 12V, 7.0Ah lead-acid batteries Veh_Batt - 11 * Yuasa 12V, 7.0Ah lead-acid batteries R1 - 45.3kohm, 1/2W resistor R2 - 5.1kohm, 1/2W resistor R3 - 1.5Mohm, 1/2W resistor R4 - 27kohm, 1/4W resistor R5 - 10kohm, 1/4W resistor R6 - 220ohm, 1/4W resistor R7 - 220ohm, 1/4W resistor R8 - 220ohm, 1/4W resistor Rfb1 - 180kohm, 1/4W resistor Rfb2 - 1.5kohm, 1/4W resistor Rc - 4.7kohm, 1/4W resistor Rfa - 43kohm, 1/4W resistor Rsn - 0.015ohm, 5W resistor C2 - 0.1uF, mylar capacitor C3 - 1uF, mylar capacitor C4 - 0.1uF, mylar capacitor C5 - 1uF, mylar capacitor C6 - 0.1uF, mylar capacitor C7 - 1uF, mylar capacitor Cin - 200uF, 50V electrolytic capacitor Cbyp - 0.01uF, 30V ceramic capacitor Csn - 0.01uF, 30V ceramic capacitor Cc - 22nF, 25V mylar capacitor Cout - 470uF, 200V electrolytic capacitor L1 - 470uH, torroid inductor D1 - PDS3200, Schottky diode, 3A, 200V D2 - NTE580, 6A, 200V rectifier D3 - T1-3/4, LED D4 - T1-3/4, LED D5 - T1-3/4, LED Q1 - NTE2382, 100V MOSFET Q3 - NTE2382, 100V MOSFET Q4 - IRF510, 100V MOSFET U1 - LM3488 analog boost converter controller U2 - PIC18F452 microprocessor U3 - 5V LDO voltage regulator U4 - 10V LDO voltage regulator U5 - 6V LDO voltage regulator U6 - TC4427a dual 1.5A gate driver S1 - Crydom D2D07 Solid State Relay UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON . . . . S2 - Magnecraft 199BX-11 Power Relay . . . . . FINAL REPORT PROJECT MOLALLA UNIVERSITY OF PORTLAND REV. 1.0 UP-EE-TR-06-06 SCHOOL OF ENGINEERING PAGE 16 CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA UNIVERSITY OF PORTLAND . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 17 Appendix C SCHOOL OF ENGINEERING CONTACT: A. MELTON FINAL REPORT PROJECT MOLALLA . . . . . . . . . REV. 1.0 UP-EE-TR-06-06 PAGE 18 Appendix D Figure 4 Molalla Schedule UNIVERSITY OF PORTLAND SCHOOL OF ENGINEERING CONTACT: A. MELTON