Hardware and Software Infrastructure for the Optimisation of Sunswift II
Total Page:16
File Type:pdf, Size:1020Kb
THE UNIVERSITY OF NEW SOUTH WALES, SCHOOL OF ELECTRICAL ENGINEERING & TELECOMMUNICATIONS SCHOOL OF COMPUTER SCIENCE & ENGINEERING Hardware and Software Infrastructure for the Optimisation of Sunswift II A THESIS SUBMITTED FOR THE DEGREE OF BACHELOR OF ENGINEERING David Snowdon, 2234390 November, 2002 Supervisors: Gernot Heiser, Jeff Cotter To Jimmy Smart and James Ascott Abstract Sunswift II is the UNSW entrant in the World Solar Challenge, a solar car race that runs from Darwin to Adelaide. It is a complex amalgamation of mechanical and electrical systems where reliability and efficiency are of the utmost importance. This thesis outlines the design and development of an integrated telemetry and control system for Sunswift II which provides significantly improved reliability, ex- pandability and flexibility compared with the ad-hoc, limited system previously im- plemented. As part of this development, the car’s maximum power point trackers are examined, and the software redesigned in order to solve many issues that were evident during a previous event — a significant reliability improvement is observed. Acknowledgements A number of people, businesses, and organisations have contributed to this work. Firstly, thanks to my supervisors, Gernot Heiser, Jeff Cotter and Adam Wiggins who have spent many hours discussing various aspects of the project. Also, David Johnson, who has given an enormous amount of time training students to solder, exam- ining PCBs, and being generally helpful in a multitude of ways, must be acknowledged. He has also tolerated the Sunswift students’ working in his office for several months. Thanks must go to the U-Committee who provided the funds required to construct the system. David Finn and James Kennedy from Tritium Pty Ltd have provided a huge amount of support in the implementation of software for their motor controller, as well as ef- fecting repairs required following various incidents. The Biel school of engineering have provided tools and information necessary to develop their device further. A large number of Sunswift team members contributed significantly to the project including (but not limited to) Monique Alfris, Lauren Tan, Bonne Eggleston, Kian Chin, Andrew Moran, Kushan Fernando, Owen The, Robyn Hyslop, Robert Reid, Luke Macpherson, Tim Wardrop and Andrew Pratley. The work with the PLEB would not have been possible without the help and guid- ance of Harvey Tuch and Shane Stephens. The members of the Vektor CAN mailing list provided a wealth of valuable infor- mation and advice regarding many of the issues discussed herein. Lastly, thanks to Gernot Heiser, John Snowdon and Robert Reid for feedback on draft documents. Contents 1 Introduction 15 2 Background 17 2.1 Car Description . 17 2.2 Race Optimisation . 19 2.2.1 Strategy . 19 2.2.2 Reliability . 20 2.2.3 Efficiency . 21 2.2.4 Operation and driving . 22 2.3 Problems with Existing Telemetry/Control System . 23 2.4 Previous Solar Car Systems . 24 2.4.1 Sunswift II, 2001 (non-interacting systems) . 24 2.4.2 Aurora, 2001 (non-interacting systems) . 25 2.4.3 Iowa State University, 1999 (embedded network) . 25 2.4.4 Sunshark, 1999 (integrated monolithic) . 26 2.4.5 Solar Motions, 2001 (embedded network, non-interacting) . 27 2.4.6 Miscellaneous devices . 27 2.4.7 General conclusions . 27 3 Design 29 3.1 Requirements . 29 3.2 Macro-Design . 30 3.3 Topology . 31 3.4 Bus Selection . 32 3.4.1 Bus requirements . 32 3.4.2 CAN . 32 3.4.3 RS-485 . 33 3.4.4 Ethernet . 34 3.4.5 I2C . 35 3.4.6 1-Wire . 35 3.4.7 Comparison table . 36 3.4.8 Conclusion . 36 3.5 Higher-Level Protocols . 38 3.5.1 DeviceNet . 39 3.5.2 CANOpen . 39 3.5.3 CanKingdom . 40 3.5.4 Time triggered CAN . 41 3.5.5 Home-grown protocol . 41 9 10 CONTENTS 3.5.6 Conclusions . 42 4 Hardware Infrastructure Development 43 4.1 Overall Car Design . 43 4.2 General Principles . 44 4.3 Bus Design . 44 4.4 Isolation and Protection . 45 4.5 Redundant Busses . 47 4.6 Standard features . 48 4.7 Miscellaneous Design Decisions . 48 4.8 Reference Design . 49 4.8.1 Microcontroller . 49 4.8.2 CAN Controller . 50 4.8.3 Power supplies and isolation . 51 4.8.4 Miscellaneous hardware . 51 4.8.5 PCB layout . 52 4.9 Results . 52 4.10 Externally Specified Systems . 54 4.11 PLEB . 54 5 Software Infrastructure Development 55 5.1 Compilers and Tools . 55 5.2 Abstraction Layer . 56 5.3 Protocol . 57 5.3.1 Requirements and design . 57 5.3.2 Message types and identifiers . 58 5.3.3 Channels . 59 5.3.4 Configuration . 60 5.3.5 Small Scandal . 60 5.4 Wireless Communications . 61 5.5 User Interface Software . 61 5.6 Results and Conclusions . 61 5.6.1 MCP2510 . 61 5.6.2 Conclusions . 63 6 Maximum Power Point Trackers 65 6.1 Background . 66 6.1.1 Maximum power point tracking . 66 6.1.2 Biel MPPT hardware description . 67 6.1.3 Tracking algorithms . 68 6.2 Experiences with the Biel MPPTs during WSC . 70 6.2.1 Analysis . 71 6.3 Sunrace 2002 Improvements . 74 6.3.1 Optimisations . 76 6.3.2 Sunrace errata . 77 6.3.3 Analysis . 77 6.4 November 2002 Improvements . 78 6.4.1 Multiple tracking algorithms . 78 6.4.2 IV curve sweeps . 79 6.4.3 CAN communications . 79 CONTENTS 11 6.4.4 ADC interrupt driven control loop . 81 6.5 Testing . 83 6.5.1 Bench testing . 83 6.5.2 Initial PV testing . 84 6.5.3 In-car testing . 84 6.5.4 Conclusions . 84 6.6 Results and Conclusions . 85 6.6.1 Open-loop algorithm evaluation . 85 6.6.2 Control board deficiencies . 85 6.7 Future Work . 86 6.7.1 Logic re-design . 86 6.7.2 Software improvements . 86 6.7.3 MPPT re-design . 87 7 Motor Controllers 89 7.1 Interfacing . 89 7.2 Tritium Motor Controller . 91 8 Sunswift II Implementation 93 8.1 Devices Designed . 93 8.1.1 DC-DC converter . 93 8.1.2 RS232 card . 94 8.1.3 Current sensor . 94 8.1.4 Driver display . 95 8.1.5 Handlebar Controls . 95 8.1.6 Driver controls interface . 95 8.1.7 Switch card . 95 8.1.8 1-Wire temperature sensors . 96 8.1.9 Palm pilot . 96 8.1.10 PLEB . 96 8.1.11 Miscellaneous devices . 96 8.2 Construction . 97 8.3 Installation . 97 8.4 Testing and Debugging . 98 8.4.1 Testing day 1 . 99 8.4.2 Testing day 2 . 99 8.4.3 Testing day 3 . ..