ELECTRICAL AND INTERFACE DISPLAY ON ELECTRIC MOTORCYCLE
By
Muhammad Randa Ichramputera 11501037
BACHELOR’S DEGREE in
MECHANICAL ENGINEERING – MECHATRONICS CONCENTRATION FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY
SWISS GERMAN UNIVERSITY The Prominence Tower
Jalan Jalur Sutera Barat No. 15, Alam Sutera Tangerang, Banten 15143 - Indonesia
January 2021
Revision After Thesis Defense on 20 January 2021
STATEMENT BY THE AUTHOR
I hereby declare that this submission is my own work and to the best of my knowledge, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at any educational institution, except where due acknowledgement is made in the thesis.
Muhammad Randa Ichramputera
_____________________________________________
Student Date
Approved by:
Leonard P. Rusli, BS, MS, PhD
_____________________________________________
Thesis Advisor Date
Dr. Maulahikmah, S.Kom., M.Sc.
_____________________________________________
Dean Date
ABSTRACT
ELECTRICAL AND INTERFACE DISPLAY ON ELECTRIC MOTORCYCLE
By
Muhammad Randa Ichramputera Leonard P. Rusli, BS, MS, Ph.D
SWISS GERMAN UNIVERSITY
The purpose of this thesis is to make an interface display for electric motorcycle. The display will consist of real-time speedometer, tachometer, odometer, and battery capacity. The display will then be used to observe the battery level of the vehicle, the top speed of the vehicle, the maximum RPM that the vehicle can reach, the travelling distance, and more importantly, the maximum range of the vehicle based on the remaining battery capacity. There will also be a power display consist of voltage and amperage indicator. Those indicators are used to determine the amount of power that the electric motor is drawing, the amount of voltage the battery pack has, and amperage that the motor draws.
This project uses 18650 battery pack as the main power source for the electrical components installed in the motorcycle in which all the electrical components are powered by DC power source (Battery pack). Microcontroller (Arduino MEGA2560) is programmed to control, maintain and process analog and digital values from integrated sensors and display the results of the calculations to the interface display. Several sensors will be used such as: temperature sensors, hall effect sensor, inductive proximity sensor, shunt resistors, and voltage divider method to determine the voltage in the battery pack.
Keywords: Interface Display, Battery Pack, Microcontroller, Sensors, Program, Voltage Divider, Electrical Components.
© Copyright 2021
by Muhammad Randa Ichramputera All rights reserved
DEDICATION
I dedicate this works to ALLAH SWT that always provide me a way to finish this thesis that no human being ever could, to my family who always supporte me through the process of making this thesis, my friends who always bring up positive energy to boost my mentality, to
my one and only advisor, Mr. Leonard P. Rusli, BS, MS, PhD. for always putting trust on me the whole time and keep pushing me forward, and for the future development of electric
vehicle in Indonesia.
ACKNOWLEDGEMENTS
I would like to thank ALLAH SWT for His kindness, blessings, and for lending me strength during the process, and my family who always give motivations and support throughout the whole process.
I would like to thank my advisor, Mr. Leonard P. Rusli, BS, MS, PhD. for trust he has put in my ability, his patience on every mistake I have made, his understanding on student’s behaviour during the process, his guidance and his advices throughout the process.
My colleagues and friends, especially Kevin Ocnald Ridwan, Triandra Wira Tama, Samuel Christofle, Muhammad Nur Pamungkas, Bianca Allysa, Alicia Saphira Nasution, Savira Aliftha Rifanti, Rahmat Farhan Aditya, Muhammad Ichsan Effendi, Martin Setiawan, Firman Nugroho, Gregorius Yoseph Radityo Agni Pradipta, Arvin Enditya, Alwan Raihan, Albert Iskandar, Jeffry Ngasinur, Alfian Wildany, Jeremy Reynard, Larry Widjaja, Marchellino Ignasius Kwasasi, Mikael Kevin, Shannon Wijaya, Muhammad Hanif Handoko Putra, Haitsam Rasyid, and to all fellow mechatronics students of 2015 Batch.
To Sarah Nadia Larasati Hadi, Muhammad Kahfi, Richard Fererra Arista, Utama Budi Prasetyo, Yurry Sergius, Said Ghifari Razdiq, Fadlan Ardinda, Daffa Rayhan Assjady, Yuda Desela Putra Marsyaf, Farizan Shidqi, Rheza Faisal Aristyawan, Raka Angga Prawira, Ilham Nurcahyanto, Raka Wiraatmaja, Rafael Khalidya Rizki, Farhan Ramadhan Anwar, Muhammad Fathillah Daulay, Galy Rizq Prima, Erlangga Ibrahim who always motivate and support me to finish my degree as soon as possible.
Last but not least, all lecturers of mechatronics that have given me opportunities to fail, and try again. Also, to Swiss German University for all the opportunities to experience local and abroad internship, and opportunities to acquire as many useful skills for the near future.
Table of Contents
STATEMENT BY THE AUTHOR ... 2
ABSTRACT... 3
DEDICATION ... 5
ACKNOWLEDGEMEN TS ... 6
Table of Contents ... 7
CHAPTER 1 – INTRODUCTION ... 14
1.1 ... Background ... 14
1.2 Objectives ... 15
1.3 Research Questions ... 15
1.4 Thesis Scope... 15
1.5 Thesis Limitation... 15
1.6 Hypothesis ... 15
CHAPTER 2 – LITERATURE REVIEW ... 16
2.1 Electric Motorcycle... 16
2.2 Display Interface ... 17
2.2.1 Serial Peripheral Interface (SPI) ... 17
2.2.2 Inter- integrated Circuit (I2C) ... 18
2.2.3 Red Green Blue (RGB) ... 19
2.2.4 Low- voltage Differential Signalling (LVDS) ... 19
2.2.5 Mobile Industry Processor Interface (MIPI) ... 19
2.3 Internet of Things (IoT)... 19
2.4 Human-Machine Interface (HMI) ... 23
2.5 Graphical User Interface (GUI)... 25
2.6 Microcontroller Unit ... 26
2.6.1 Teensy 4.1 ... 28
2.6.2 Launchpad MSP430 ... 28
2.6.3 Netduino N3 Wi-Fi ... 29
2.6.4 Particle Photon ... 30
2.6.5 SparkFun Thing Plus... 30
2.6.6 Adafruit Feather Huzzah ... 31
2.6.7 BeagleBoard PocketBeagle... 32
2.6.8 SparkFun RedBoard Artemis ... 32
2.6.9 STM32F3 Discovery... 33
2.6.10 Silicon Labs Wonder Gecko ... 34
2.6.11 Arduino MEGA2560 ... 34
2.7 Application Programming Interface (API)... 35
2.7.1 Public APIs and API integration... 36
2.7.2 Web services and APIs ... 37
2.7.3 Rest APIs ... 37
2.8 Programming Language ... 38
2.8.1 High- level Programming Language ... 38
2.9 Sensors ... 38
2.9.1 Temperature Sensor ... 39
2.9.2 Proximity Sensor ... 40
2.9.3 Ultrasonic Sensor ... 40
2.9.4 Infrared Sensor (IR) ... 41
2.9.5 Hall- Effect Sensor ... 42
2.9.6 Liquid Crystal Display (LCD) ... 42
2.10 Resistors ... 43
2.10.1 Fixed Resistors ... 44
2.10.2 Variable Resistors ... 48
2.10.3 Photoresistor ... 50
2.10.4 Thermistor... 50
2.10.5 Varistor ... 51
2.11 Operational Amplifiers (Op-Amp)... 51
2.11.1 Open-loop Amplifier ... 52
2.11.2 Closed- loop Amplifier ... 53
2.11.3 Ideal Op-Amp ... 53
2.11.4 Real Op-Amp ... 54
2.11.5 Differential Amplifier ... 56
2.12 Voltage Buck Converter ... 56
2.13 Breadboard ... 57
CHAPTER 3 – RESEARCH METHODS ... 59
3.1 Design Justification ... 59
3.2 Electrical Components ... 59
3.2.1 Arduino MEGA2560 ... 59
3.2.2 Nextion Enhanced Series ... 60
3.2.3 Breadboard... 60
3.2.4 Printed Circuit Board (PCB)... 60
3.2.5 DHT22 Temperature and Humidity Sensor... 61
3.2.6 LM35 Temperature Sensor ... 62
3.2.7 LM324N Quad-Operational Amplifier ... 62
3.2.8 NJK-5002C Hall-Effect Sensor ... 63
3.2.9 LJ12A3-4-Z/BX Metal Proximity Sensor ... 64
3.2.10 50A 75mV Shunt Resistor ... 64
3.2.11 200A 75mV Shunt Resistor ... 65
3.2.12 DC-DC Buck Converter 50V-12V ... 65
3.2.13 Resistors... 66
3.2.14 4-Pin Socket ... 66
3.2.15 3-Pin Socket ... 66
3.2.16 2-Pin Socket ... 67
3.2.17 Wire ... 67
3.2.18 18650 Lithium- ion Battery ... 67
3.2.19 Battery Pack ... 68
3.2.20 Battery Charger... 69
3.2.21 Battery Management System (BMS) ... 70
3.3 Mechanical Components ... 71
3.3.1 Screen Back Frame Support ... 71
3.3.2 Back Frame Elbow Bracket ... 71
3.3.3 Metal Proximity Sensor Bracket... 72
3.3.4 Hall- Effect Sensor Bracket ... 72
3.3.5 Headlight Support ... 72
3.3.6 Microcontroller Case ... 73
3.3.7 Buck Converter Case ... 73
3.4 Software ... 73
3.4.1 Visual Studio Code ... 73
3.4.2 Arduino IDE ... 74
3.4.3 Nextion Editor Software ... 75
3.4.4 Adobe Illustrator ... 75
3.4.5 easyEDA ... 75
3.5 Experimental Procedure ... 76
3.5.1 Human-Machine Interface Display Flowchart ... 76
3.5.2 Human-Machine Interface Display Diagram... 77
3.5.3 Electrical Diagram ... 78
3.5.4 Procedure Explanation ... 79
3.6 Calculation ... 80
3.6.1 Battery Capacity ... 80
3.6.2 Frequency ... 83
3.6.3 Speed... 85
3.6.4 Distance ... 86
3.6.5 Charging Time ... 87
3.6.6 Temperature Reading... 88
3.6.7 Battery Duration & Distance Remaining ... 89
3.6.8 Battery Pack ... 90
CHAPTER 4 – RESULT AND DISCUSSION ... 91
4.1 The accuracy of the RPM showed on the display ... 91
4.2 The accuracy of the Speed showed on the display ... 92
4.3 The accuracy of temperature and humidity sensors ... 94
4.4 Cruising Mode Discharge Battery Simulation ... 94
4.5 Comparison between Lithium-Ion and Lead-Acid Battery... 96
CHAPTER 5 – CONCLUSION AND FUTURE WORKS ... 99
5.1 Conclusion... 99
5.2 Future Works ... 99
REFERENCES ... 100
APPENDICES ... 101
APPENDIX 1 Coding Arduino ... 101
APPENDIX 2 Technical Drawing ... 112
APPENDIX 3 Wiring Diagram... 116
Equation 1 Voltage Divider Formula. ... 81
Equation 2 Vout Result Based on Formula. ... 81
Equation 3 Bit Correction Factor. ... 82
Equation 4 Analog Input Value Conversion. ... 82
Equation 5 Conversion of Formula in Arduino IDE. ... 82
Equation 6 Remapping Analog Input Value. ... 82
Equation 7 Bit Min. Threshold Formula. ... 83
Equation 8 Min. and Max. Threshold Differential Formula. ... 83
Equation 9 Frequency Formula... 83
Equation 10 Pulse Measurement History to a New Variable Declaration. ... 84
Equation 11 Microsecond as Pulse Measurement History Declaration. ... 84
Equation 12 Period Value Averaging. ... 84
Equation 13 Formula to Obtain Wheel's Revolution Per Minute. ... 85
Equation 14 Speed Formula. ... 85
Equation 15 Pulse Measurement History to a New Variable Declaration (2). ... 85
Equation 16 Period Value Averaging. ... 86
Equation 17 Formula to Obtain Speed. ... 86
Equation 18 Distance Formula... 86
Equation 19 Arduino IDE Distance Formulation. ... 87
Equation 20 Battery Capacity Formula. ... 87
Equation 21 Analog Read Smoothing. ... 87
Equation 22 Remapping Voltage Analog Value to Battery Pack Capacity. ... 88
Equation 23 Temperature Read in Arduino IDE Formulation... 88
Equation 24 Temperature Read Accuracy Formula. ... 88
Equation 25 Temperature Read Arduino IDE Formulation. ... 89
Equation 26 Temperature and Humidity Sensor Function Call Based on IDE Library. ... 89
Equation 27 Distance Remaining Formula. ... 90
Equation 28 Charging Time Formula. ... 90
Equation 29 Charging Time Calculation Result. ... 90
Figure 1 Electric Motorcycle illustration. ... 16
Figure 2 An example of a helicopter Display Interface. ... 17
Figure 3 An example of SPI implementation. ... 18
Figure 4 An example of I2C diagram. ... 18
Figure 5 Collection of HMI Display. ... 24
Figure 6 Windows GUI... 26
Figure 7 Teensy 4.1... 28
Figure 8 Launchpad MSP430. ... 28
Figure 9 Netduino N3 Wi-Fi. ... 29
Figure 10 Particle Photon... 30
Figure 11 SparkFun Thing Plus. ... 30
Figure 12 Adafruit Feather Huzzah. ... 31
Figure 13 BeagleBoard PocketBeagle. ... 32
Figure 14 SparkFun RedBoard Artemis. ... 32
Figure 15 STM32-F3 Discovery. ... 33
Figure 16 Silicon Labs Wonder Gecko... 34
Figure 17 Arduino MEGA2560. ... 34
Figure 18 An example of API Diagram. ... 36
Figure 19 DS-1820 Temperature Sensor. ... 39
Figure 20 ZD-1906 Proximity Sensor... 40
Figure 21 HC-SR04 Ultrasonic Distance Sensor. ... 41
Figure 22 IR Sensor. ... 41
Figure 23 SS49E Linear Hall- Effect Sensor. ... 42
Figure 24 2x16 Liquid Crystal Display. ... 43
Figure 25 Carbon Composition Resistor. ... 45
Figure 26 Carbon Film Resistor... 45
Figure 27 Metal Oxide Film Resistor. ... 46
Figure 28 Metal Film Resistor. ... 46
Figure 29 Wire Wound Resistor. ... 47
Figure 30 Surface Mount Resistor. ... 48
Figure 31 Carbon Composition Potentiometer. ... 49
Figure 32 Cermet Potentiometer. ... 49
Figure 33 Conductive Plastic Potentiometer. ... 49
Figure 34 Wire Wound Potentiometer. ... 50
Figure 35 Photoresistor. ... 50
Figure 36 Thermistor. ... 51
Figure 37 Varistor/Movistor. ... 51
Figure 38 Op-Amp Circuit. ... 52
Figure 39 Buck-converter Circuit. ... 57
Figure 40 Breadboard... 58
Figure 41 Lithium- ion Battery. ... Error! Bookmark not defined. Figure 42 How a battery performs charge and discharge. ... Error! Bookmark not defined. Figure 43 Battery Serial Connection. ... Error! Bookmark not defined. Figure 44 Battery Series Connection with a defective battery. Error! Bookmark not defined. Figure 45 Battery Parallel Connection... Error! Bookmark not defined. Figure 46 Battery Parallel Connection with a defective battery. ... Error! Bookmark not defined. Figure 47 Electrode movement when charge and discharge. ... Error! Bookmark not defined. Figure 48 Rate Discharge Characteristic graph. ... Error! Bookmark not defined. Figure 49 Arduino MEGA2560. ... 59
Figure 50 Nextion HMI Display. ... 60
Figure 51 PCB... 61
Figure 52 DHT22 Temperature & Humidity Sensor. ... 61
Figure 53 LM35 Temperature Sensor. ... 62
Figure 54 LM324N Pinout Diagram. ... 63
Figure 55 NJK-5002C Hall- Effect Sensor. ... 63
Figure 56 LJ12A3-4-Z/BX Metal Proximity Sensor. ... 64
Figure 57 Illustration of Shunt Resistor. ... 65
Figure 58 Buck Converter Module. ... 66
Figure 59 Lithium- ion Battery. ... 67
Figure 60 A Battery pack. ... 68