Thesis Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 98

Smart Electronic Module for DC Fast Chargers

A DISSERTATION SUBMITTED IN PARTIAL FULFILMENT


FOR THE DEGREE OF

Master of Technology
I N T HE
FACULTY O F E NGINEERING

BY

V IBHORE JAIN

G UIDED B Y

P ROF. L U MANAND
M R . G S UDHAKAR

D EPARTMENT OF E LECTRONIC S YSTEMS E NGINEERING


I NDIAN I NSTITUTE O F S CIENCE , BANGALORE

J UNE 2024

C OPYRIGHT © 2024 IIS C


A LL R IGHTS R ESERVED
Contents

Table of Contents iii

List of Figures vii

1 Pre-study 7
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Functional aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Characteristics and performance . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 User aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 Environment aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.7 Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.8 Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.9 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.10 Market Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.11 User Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.12 Wish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2 Study 25
2.1 Functional concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Module study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2.1 Power Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2.2 Sensor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2.3 CAN Transceivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2.4 Human Machine Interface . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2.5 Connectivity interface . . . . . . . . . . . . . . . . . . . . . . . . . . 30

iii
CONTENTS iv

2.2.6 Micro-controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3 Industrial design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3.1 Ergonomics and Aesthetics . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3.2 Sub-module Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3.3 Product Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.4 Target scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.4.1 Target Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3 Design 37
3.1 Module Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2 Stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3 Hardware design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.1 Power Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.2 Interconnects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.3.3 Micro-controller unit (MCU) and I/Os . . . . . . . . . . . . . . . . . . 46
3.3.4 Sensor interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.3.4.1 CC1 node sense circuit . . . . . . . . . . . . . . . . . . . . 49
3.3.4.2 Battery and power converter voltage sense circuit . . . . . . 52
3.3.4.3 Current Sensor . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.3.4.4 Temperature Sensor . . . . . . . . . . . . . . . . . . . . . . 52
3.3.4.5 Input Output relations . . . . . . . . . . . . . . . . . . . . . 53
3.3.5 Interface circuits for digital communication . . . . . . . . . . . . . . . 53
3.4 Software design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.4.1 BEV DC001 firmware . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.4.2 OCPP 1.6 client firmware . . . . . . . . . . . . . . . . . . . . . . . . 57
3.4.3 OCPP 1.6 server firmware . . . . . . . . . . . . . . . . . . . . . . . . 58
3.4.4 User App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.5 Industrial design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.5.1 Top half design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.5.2 Bottom half design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.5.3 Heat sink design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.5.4 Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
v CONTENTS

4 Engineering 65
4.1 Product structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.2 Hardware modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.2.1 Main PCB dimensions and interconnects . . . . . . . . . . . . . . . . 68
4.2.2 Main PCB routing and layout . . . . . . . . . . . . . . . . . . . . . . 70
4.2.3 Bill of Materials (BoM) . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.2.4 Development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.3 Software modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.3.1 TMS570LS0432 firmware . . . . . . . . . . . . . . . . . . . . . . . . 76
4.3.2 ESP32 firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.3.3 Testing Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.4 System integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

5 Concluding remarks 85
5.1 User instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.2 Corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.3 Suggestions for next gen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.4 Future scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Bibliography 88
List of Figures

1.1 Simplified overview of modules involved in DC fast charging . . . . . . . . . . 8


1.2 DC001 Bharat charger (Source : Delta Electronics India) . . . . . . . . . . . . 10

2.1 Block Diagram of BEV DC001 charger . . . . . . . . . . . . . . . . . . . . . 25


2.2 Basic implementation of BEV DC001 compliant fast charger . . . . . . . . . . 27
2.3 Block diagram of Smart Electronic Module for BEV DC001 charger . . . . . . 28
2.4 Digital DC power and energy sensor (Source : Vajravegha Mobility) . . . . . . 29
2.5 3.5 inch LCD display (Source : panelook) . . . . . . . . . . . . . . . . . . . . 30
2.6 Ethernet, WiFi + 4G cellular connectivity module (Source : Vajravegha) . . . . 31
2.7 Example PCB layout for MCU based boards . . . . . . . . . . . . . . . . . . . 33

3.1 24V to 5V DC-DC isolated module in DIP package . . . . . . . . . . . . . . . 44


3.2 Schematic of power distribution for SEM sub-modules . . . . . . . . . . . . . 45
3.3 Ports on the SEM unit for power and signal . . . . . . . . . . . . . . . . . . . 46
3.4 Complimentary components for MCU core . . . . . . . . . . . . . . . . . . . 47
3.5 MCU core with pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.6 Sensor interface circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.7 Digital communication interface circuits . . . . . . . . . . . . . . . . . . . . . 54
3.8 BEV DC001 state transition diagram . . . . . . . . . . . . . . . . . . . . . . . 56
3.9 SPI Transaction format and variable IDs . . . . . . . . . . . . . . . . . . . . . 57
3.10 User app for DC Fast charging demo . . . . . . . . . . . . . . . . . . . . . . . 59
3.11 Perspective view of top shell of SEM . . . . . . . . . . . . . . . . . . . . . . . 61
3.12 Perspective view of bottom shell of SEM . . . . . . . . . . . . . . . . . . . . . 62
3.13 Perspective view of heat sink . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.14 Exploded view of SEM assembly . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.15 Completely assembled smart electronic module . . . . . . . . . . . . . . . . . 64

vii
LIST OF FIGURES viii

4.1 Top view of SEM PCB with sub-modules attached . . . . . . . . . . . . . . . 66


4.2 Top view of SEM PCB without sub-modules . . . . . . . . . . . . . . . . . . . 66
4.3 Interplay of embedded firmware in SEM based fast charging solution . . . . . . 67
4.4 Main PCB dimensions and interconnect positions . . . . . . . . . . . . . . . . 70
4.5 Top layer copper layer of SEM PCB . . . . . . . . . . . . . . . . . . . . . . . 71
4.6 Copper layer beneath the top copper layer of SEM PCB . . . . . . . . . . . . . 71
4.7 Copper layer above the bottom copper layer of SEM PCB . . . . . . . . . . . . 72
4.8 Bottom layer copper layer of SEM PCB . . . . . . . . . . . . . . . . . . . . . 72
4.9 ESP32 debug output on successful boot of SEM . . . . . . . . . . . . . . . . . 81
4.10 Hardware integration of SEM PCB with ESP32 and Ethernet module . . . . . . 82
4.11 Hardware integration of SEM module into DC fast charging EVSE . . . . . . . 84
Synopsis

Electric vehicle (EV) market in India is developing and creating new requirements for associ-
ated charging infra-structure. While slow charging solutions are developed and manufactured
in India, fast charging solutions are still imported either whole or in parts followed by assem-
bly in assembly houses. The reason for this disparity to a large extent can be attributed to
technology requirements of DC fast charging. While AC fast charging requires basic safety
requirements due to lower power levels, fast charging EVs need to impose strict safety con-
straints from both EVs and chargers to prevent incidents. This is possible by intelligent hand
shake and monitoring of the charging process.

Smart Electronic Module (SEM) for DC fast charger; as the name suggests; is designed to
add these safety features and monitoring capabilities to a charger. Along with complementary
power electronics, SEM enables quick development and deployment of DC fast chargers for
EVs. It makes fast charging compliance accessible to OEMs while maintaining modular nature
of the end-product. SEM is trying to bridge the technological gap that prevents a stand alone
power converter to become a DC fast charger.

For proving that hardware prototype is capable of charging EV, many supporting components
both hardware and software are required. Through-out the scope of the document, these mod-
ules are referred and are not in the scope of SEM. The document is a detailed report on SEM
module and not on DC fast charger.

1
LIST OF FIGURES 2
Acronyms

3
LIST OF FIGURES 4
Acknowledgements

I express profound sense of gratitude to my guides, Prof. L Umanand, and Mr. G Sudhakar,
for their efforts, input, and guidance throughout the project. Their expertise and feedback were
vital in executing this project to industry standards. Some excellent design choices in the project
directly resulted from my discussions with Umanand sir. When dealing with industrial aspects,
Sudhakar sir helped me make critical decisions for the project. I am also grateful to Dagale sir
as the project required advanced knowledge in embedded systems which was covered as part
of Embedded Systems Design course.

I also thank Arun, Srinivas, and Supreeth for helping out with the mechanical aspects of the
project and Surendra for prototype PCB fabrication. Their help enabled parallel execution of
the project, which saved a lot of time. Special thanks to Chetan sir and Neuronics lab for
supporting me in some of the complex 3D printing requirements of the project.

I thank all power lab members for the immense support in terms of technical guidance and
resources they shared throughout the project. My heartfelt gratitude, especially to Naresh and
Vaidika, for being supportive and encouraging throughout my M.Tech journey here in IISc.
Lastly, I acknowledge the contributions of Sagarika in the study phase of the project.

5
LIST OF FIGURES 6
Chapter 1

Pre-study

1.1 Background

With electric vehicles (EVs) becoming increasingly popular in Indian markets, there is need for
rapidly ramping up supporting charging infrastructure. Charging stations, battery swap stations
and private charging points will be required for fulfilling the charging/refuelling requirements
of EVs and hybrid electric vehicles (HEVs). Public charging infrastructure is key to make EVs
viable for long distance transportation. It is to be noted that charging stations need to replenish
batteries faster than private charging points because while over-night slow charging at a private
charging point is acceptable, the same is not applicable to a public charging point where EV
users expect a fast battery recharge.

India market is also witnessing rising demands of 3 wheeler EVs as an alternative to internal
combustion (IC) engine based 3 wheeler rickshaws for personal commute as well as goods
transportation. The down time of these EVs caused by battery charging directly translate to op-
portunity cost and hence need to be minimised. Fast chargers are therefore needed to replenish
the batteries of these 3 wheelers especially for EV fleet owners.

Lastly, unlike European markets, India witnessed tremendous growth in 2 wheeler (2W) elec-
tric vehicles. Companies like Aether, OLA and Bajaj offer electric scooters suitable for daily
commutes. While these scooters ship with compatible slow chargers, the 2W EVs themselves
support faster charging speeds which is useful for getting quick recharges at malls and public
parking spaces.

Use cases discussed above are increasing the demand for fast charging equipment. Charging
equipment is broadly classified into two categories[1] based on charging speeds:

7
1.1. Background 8

• AC chargers: These are primarily on-board chargers which take AC input from the grid
and charge the battery of the EV. AC charging is usually slow as power electronics of
on-board chargers need to be kept light-weight and compact which limits the charging
speeds.

• DC chargers: These are primarily off-board chargers with all the power electronics out-
side the EV. These take input power (AC) from the grid and output DC power to charge
the battery of the EV directly. Since power conversion is not done on vehicle, these
chargers can charge EV batteries at high power levels reducing the charging time.

While battery charging at the bare metal level is just transfer of power, automotive compliance
adds a level of sophistication necessary to ensure safety of an EV, its driver and the environ-
ment, especially in the case of high power DC fast charging. DC fast chargers in India need to
follow Bharat EV Charger DC-001 (BEVC DC-001) specifications[2] set by Automotive Re-
search Association of India (ARAI) for charging low voltage EVs (48V/72V), E.g. Mahindra
e2o Plus P8 and e-Verito.
High power levels of DC fast charging demand communication between EV and EVSE for safe
and reliable operation which cannot be achieved by simple power electronic circuits. This ex-
change of information between EV and EVSE can be achieved by using digital smart modules
fitted in the off board DC fast charger and the EV along with its battery management system
(BMS) over CAN [3] to make the charging process compliant to BEVC DC-001. The BMS
is responsible for cell balancing, over-voltage/under-voltage and over current protection while
monitoring state of charge (SoC) of the EV battery. Figure 1.1 gives a high level over view of
such a DC fast charging equipment connected to an EV.

BMS
Communication
Smart Controller
Signals
Electronic
Module
BMS Power Transfer

Power
Converter

Electric Vehicle
DC Fast
Charger

Figure 1.1: Simplified overview of modules involved in DC fast charging


9 1.2. Functional aspects

1.2 Functional aspects

As discussed in sub-section 1.1 smart digital electronics are essential for DC fast chargers to
meet the necessary specifications and standards. EVSEs are automotive equipment and so they
need to comply with ISO 26262 to ensure functional safety. A smart electronic module (SEM)
for DC fast charging of EVs thus needs to provide following core functionalities:

• Establish communication between EV and EVSE.

• Communicate charging parameters like voltage, power, temperature.

• Control power electronics to optimally convert AC power from grid to DC power for
charging EV batteries

• Monitor charging gun parameters like gun temperature.

• Implement fail safe features like over current protection, thermal shut down, surge pro-
tection, ground fault detection etc.

• Emergency stop/off (EMO) switch.

Apart from the functions stated above, there are other auxiliary functions that can be incorpo-
rated in such a smart module listed below:

• Energy metering to keep a track of energy consumed.

• Authorization of charging process.

• Human machine interface (HMI).

• Communication with charger management software (CMS).

• Communication with payment gateways.

While there exists DC chargers that provide above functionalities, they are mostly out sourced
from Chinese manufacturers as BEVDC-001 specification is similar to the Chinese GB/T spec-
ification. One example of such DC fast charger is Bharat Charger DC from Delta Electronics
as shown in Figure 1.2. Hence there is scope for indigenous rugged DC fast chargers that can
sustain harsh environment as well as electrical surges. Locally developed fast chargers would
also drive down costs for maintenance and servicing.
1.2. Functional aspects 10

Figure 1.2: DC001 Bharat charger (Source : Delta Electronics India)

The end equipment that gets installed in a charging station would be a DC fast charging unit,
however it would comprise of sub-systems as shown earlier in Figure 1.1. The smart electronic
module (SEM) responsible for communication between DC fast charger and EV is not available
in market for purchase as a separate unit but is integrated in the DC fast charger itself. Devel-
oping this smart electronic module would decouple the power electronics section of the charger
from the communication section making the fast charger modular, easy to maintain/upgrade.

The SEM itself has to comply with the following standards and protocols to qualify for pro-
duction and use in Indian markets:

• IS 17017-23 : D.C. Electric Vehicle Supply Equipment [4]

• IS 17017-24 : Digital Communication between a DC Electric Vehicle Supply Equipment


and an Electric Vehicle for Control of DC Charging

• ISO 26262 : Road vehicles - Functional safety

• AIS 138-2 : Electric Vehicle Conductive DC Charging System [2]


11 1.3. Characteristics and performance

1.3 Characteristics and performance

SEM being a sub-system does not have a direct metric that can be used for evaluating its
performance and efficiency. It has to derive its performance metric from top level specifications
of the DC fast charger and other sub modules present in the charger. Parameters and interfaces
that SEM is concerned with are listed below:

• Power monitoring/Energy metering: The cost of charging an EV is calculated based on


the energy consumed from the grid. This interface is responsible for energy monitoring
to calculate the energy usage and charge the user accordingly.

• EV communication interface: This interface is required to communicate with the BMS


controller in the EV and monitor the EV and EVSE connection continuously. This inter-
face is responsible for fault detection so that appropriate safety measures can be taken.

• Power converter control interface: This interface is responsible for controlling output
voltage/current (depending on charging to be constant current or constant voltage mode)
and output power of the power converter. This interface can can be implemented using
PWM, analog control voltage or even digital data packets.

• Human Machine Interface: HMI is required to interact with the DC fast charger. It
is commonly implemented using LCD display. The interface can also support an RFID
module for authentication.

• Communication Interface: The DC fast charger unit needs to communicate with charger
management software (CMS) for authorization and billing purposes in the form of Eth-
ernet/WiFi/Cellular connection.

There are no numerically quantifiable performance specifications as such for the SEM sub-
system as it is a functional module. The performance requirement can thus be objectively de-
fined as - Under all conditions, the SEM sub-system should adhere to applicable protocols for
DC fast charging and comply with functional safety standards. In case of any fault or anomaly,
SEM should trigger appropriate fail safe response from the EVSE. This performance has to be
met across all environmental variables like temperature, humidity, nominal variations in grid
voltage etc. The input-output signals need to be within recommended operating conditions of
the relevant semiconductors used in SEM and will be finalized after study phase.
1.4. User aspects 12

1.4 User aspects

The users of DC fast chargers are EV owners and charging station employees. The SEM sub-
system is however to be used by original equipment manufacturers (OEMs) to make these
fast chargers. Hence OEM technicians, charging station employees and EV owners can all be
classified as users of SEM. The nature of interaction of SEM is different for each user.

• A technician in an OEM would need to understand various interfaces of SEM, their in-
terconnection and installation in the EVSE. They should be able to assemble, test and
diagnose the EVSE.

• A charging station employee should be able to interact with the EVSE and facilitate
the charging process by appropriate authentication. They also need to understand error
codes/warnings/fault conditions and resolve them appropriately.

• EV users on the other hand need to be able to interact with the HMI, the charging gun
and the EV itself to charge it by following a hassle free process.

It should be possible to train OEM technicians and charging station employees to reasonable
competence so that they can carry out relevant tasks skillfully. The same cannot be expected
from EV users as EVs are not mainstream in India compared to their IC engine based counter-
parts. Hence the charging process has to feel as close to refuelling a conventional IC engine
based vehicle with minimum inputs required from the user. This would bring down the mini-
mum knowledge bar required to successfully plug an EV to an EVSE and start charging thereby
making adoption of these EVSEs easier (especially for 3 wheeler drivers).

To facilitate easy operation, end user would require a simple step by step graphical guide to
use the EVSE. The employees of the charging station would require a complete manual of the
EVSE to understand the software, error codes, fault conditions and their resolution. The tech-
nicians of the OEMs would require a technical reference manual of the SEM itself to facilitate
its integration with other sub-systems present in the OEM’s EVSE.

Fast charging at 15kW power levels can still take over 1 hour to top-up batteries of 3 wheelers.
It implies that EV users and dedicated EVSE operators may not be available to monitor the
charging process continuously. Thus user interaction with EVSE would generally be intermit-
tent. The frequency of user interaction with the EVSE also varies depending on the user. While
technicians would be interacting with the EVSE and SEM sub-system during installation and
maintenance (mostly on annual basis), EV owners and charging station employees would be
interacting with the EVSE multiple times in a day.
13 1.5. Environment aspects

1.5 Environment aspects

DC fast chargers are installed outdoors and need to with stand harsh environments. All com-
mercial electronic products need to withstand the environmental stress and at the same time not
affect the environment negatively that they are installed in. MIL-STD-810 defines the testing
methods and levels for military and commercial electronic equipment appropriate to their work-
ing environment. The BEVDC-001 specification quantifies the actual environment in terms of
measures namely temperature, humidity and pressure. These measures are summarised below:

• Environment conditions : Outdoors

• Ambient temperature range : 0◦ C to 55◦ C

• Ambient Humidity : 5% to 95%

• Ambient Pressure : 86kPa to 106kPa

• Storage temperature : 0◦ C to 60◦ C

The end product also needs certain mechanical ratings in terms of resistance to water, dust and
vibrations. Resistance to water and dust is determined by the products ingress protection rat-
ing (IP rating) as defined by IEC 60529. The BEVDC-001 specification requires fast charging
EVSE to be IP54 rated. An IP54 rating means that the EVSE will be protected against contam-
ination from limited amounts of dust and other particles. Additionally, it has to be protected
from water sprays from all directions. The EVSE should also be immune to mechanical vibra-
tions and impact as per section 11.11.2 of IEC 61851-1. The EVSE body shall not be damaged
by mechanical impact of energy 20J (5kg at 0.4m).

Apart from constraints on physical and mechanical aspects of the EVSE due to environment,
electrical constraints are also imposed by the environment to keep a check on undesired effects
of the EVSE on other electronics and vice versa. Electrical compliance tests that are applicable
to EVSE are listed below:

• Immunity to electromagnetic (EM) disturbances: Safety functions and metering should


pass criterion A when subjected to EM radiations as per EMC test conditions. Criterion
A requires the product to operate as intended without any loss of function or degradation
in performance.

• Immunity to electrostatic discharge (ESD): The EVSE shall withstand electrostatic dis-
charge pulses as per IEC 61000-4-2 [5] and pass criterion B with minimum levels of
1.5. Environment aspects 14

8kV air discharge or 4kV contact discharge. Criterion B requires the product to operate
as intended without any loss of function or degradation in performance after the test is
completed.

• Immunity to low frequency conducted disturbances:

i Supply voltage harmonics: The EVSE, powered by the AC supply network (mains),
shall withstand the voltage harmonics of the main supply, in the frequency range 50
Hz - 2 kHz, generally caused by other non-linear loads connected to the AC supply
network. Minimum requirement: compatibility levels of IEC 61000-2-2 multiplied
by a factor of 1.7 and performance criteria A for charging functions.
ii Supply voltage dips and interruptions: The EVSE, powered by the AC supply net-
work (mains), shall withstand the voltage dips and interruptions of the AC supply,
generally caused by faults on the AC supply network. The performance criterion
for various supply dips are summarised in Table 1.1

S No. Supply Dip Duration Performance Criterion


1 30% 10 ms B (Charging function)
2 50% 100 ms B (Charging function)
3 100% 5s B (Charging function)

Table 1.1: Performance criterion for supply Dip tests on EVSE

Compliance is checked by simulating the above conditions as per IEC 61000-4-11.


iii Immunity to voltage unbalance: The EVSE, powered by a three-phase AC supply
(mains), shall withstand voltage unbalance of the AC supply. Minimum immunity
requirement and corresponding Performance criteria are still under consideration
and are expected to be updated in AIS 138 part 2 section 11.12.5.2.
iv DC component: The EVSE, powered by the AC supply network (mains), shall
withstand the DC components, generally caused by asymmetrical loads. Minimum
immunity requirement and corresponding Performance criteria are still under con-
sideration and are expected to be updated in AIS 138 part 2 section 11.12.5.2.

• Immunity to high-frequency conducted disturbances:

i Fast transient bursts: The EVSE, powered by the AC supply network (mains), shall
withstand common-mode conducted disturbances as per IEC 61000-4-4. Minimal
15 1.5. Environment aspects

requirement: 2 kV, for a time greater than 1 min and a repetition rate of the impulses
of 5kHz. Performance criterion: B for charging functions.
ii Voltage surges: The EVSE, powered by the AC supply network (mains), shall with-
stand voltage surges, generally caused by switching phenomena in the AC power
supply network, faults or lightning strokes (indirect strokes). Minimal requirement:
1, 2/50 µS surges, 2 kV in common mode, 1 kV in differential mode. Performance
criteria: C for charging functions. Compliance is checked by tests according to IEC
61000-4-5.

• Immunity to radiated electromagnetic disturbances: The EVSE shall withstand radiated


electromagnetic disturbances. Minimal requirement (IEC 61000-4-3) are as follows:

i Performance criterion A for EM disturbance levels up to 3 V/m in the frequency


range 80 MHz to 1000 MHz
ii Performance criterion B for EM disturbance levels up to 10 V/m in the frequency
range 80 MHz to 1000 MHz.

• Low frequency conducted disturbances: Input current distortion of the EVSE shall not
be excessive and the harmonic limits for the input current of the EVSE, with no load
connected, shall be in accordance with IEC 61000-3-2.

• High frequency conducted disturbances:

i AC input terminal: Conducted disturbances emitted at the input of the EVSE, with a
resistive load at its rated output power, shall be less than the amplitude of the levels
defined in Table 1.2. Compliance is checked according to CISPR 22.

Frequency Range Limits dB (µV)


(MHz) Quasi Peak Average
0.15-0.5 66-56 56-46
0.5-5 56 46
5-30 60 50

Table 1.2: Limit levels of conducted Interference AC supply Network

ii Signal I/0 and control terminals: Conducted disturbances emitted at signal I/0 and
control terminals, if any, shall be less than the amplitude of the level defined in
Table 1.3, using a quasi-peak detector.
1.5. Environment aspects 16

Frequency Range Limits dB (µV)


(MHz) Quasi Peak Average
0.15-0.5 40-30 30-20
0.5-30 30 20

Table 1.3: Limit levels of interference from I/Os and control signals

The limits decrease linearly with the logarithm of the frequency in the range 0.15
MHz to 0.5 MHz. Compliance is checked according to CISPR 22.

• Radiated electromagnetic disturbances:

i Electrical field (30 MHz- 1000 MHz): Radiated disturbances by the EVSE at 10
m, operating with a resistive load at its rated output power, shall not exceed the
limits given in Table 1.4, using a quasi-peak detector and compliance is checked
according to CISPR 22.

Frequency Range
Limits (dBuV/m)
(MHz)
30-230 30
230-1000 37

Table 1.4: Limit Levels of radiated emissions - (measuring distance - 10m)

ii Magnetic field (150 kHz- 30 MHz) : The acceptable limit of magnetic radiation
are still under consideration and expected to be updated in AIS 138 part 2 section
11.12.5.3.

• Electromagnetic compatibility (EMC) tests: The EMC requirements for DC EV charging


stations are defined in IEC 61851-21-2.2 titled Electric vehicle requirements for conduc-
tive connection to an AC/DC supply - EMC requirements for off board electric vehicle
charging systems.

While above requirements are to be met by the EVSE on top level, the SEM as a sub-system
should ideally meet the same for ease of integration and certification. Hence it would be desired
to make the SEM sub-system compliant to these top level environmental conditions. Any
compliance that cannot be translated to the SEM sub-system need to be tested by the OEM
with the SEM sub-system installed in the DC fast charger unit.
17 1.6. Power supply

1.6 Power supply

BEVDC-001 requires EVSE to be powered from 3-phase AC supply derived from the grid. The
specifications as per BEVDC-001 are summarised in Table 1.5:

S No. Parameter Description


1 AC Input to EVSE 3-phase, 5 wire (3 Phases + Neutral + Earth)
2 Nominal Input range 415 V (+6% to -10% as per IS12360)
3 Input Frequency 50 ± 1.5 Hz
Minimum 1 hour battery backup to
4 Input Supply Failure backup
support control systems and billing unit

Table 1.5: Power supply requirements for BEVDC-001 EVSE

SEM sub-system being a control system does not consume high power and thus deriving a low
voltage DC supply from the mains input using low power AC-DC converter should be feasible.
However, it needs to be powered from an uninterruptible power supply (UPS) to support control
functions in case of power outage without temporary loss of function. The specifics of the
UPS/battery backup is not defined by the standard and is left to the OEM.

1.7 Safety

BEVDC-001 requires the EVSE to be compliant for outdoor installation (indoor installation is
possible provided ventilation requirements are satisfied) and be powered with 3 phase mains
AC. The line to earth voltage can be as high as 253 V (RMS) and hence safety measures to
prevent electrical shock are essential. Thus the EVSE would be classified as class I appliance
according to IEC 61140 as apparent from AIS-138 part 2 section 7.2.1 :
Protection against direct contact shall consist of one or more provisions that under normal
conditions prevent contact with hazardous live parts. For systems or equipment’s on board
the vehicle, the requirements are defined in ISO 6469-3. Protective bonding shall consist of
connection of all exposed conductive parts to the EV earth terminal.

When connected to mains supply, there should not be any hazardous part of the EVSE accessi-
ble even with the removal of parts that do not require a tool for removal. Compliance is checked
by inspection and according to the requirements of IEC 60529. Thus if the SEM sub-system
exposes conducting parts to the user, provision for earth connection would be mandatory.
1.8. Reliability 18

1.8 Reliability

There exists commercial DC fast chargers which are complaint to BEVDC-001 specifications
and offer warranty period of 1 to 2 years. Hence to keep up with the warranty period require-
ments of the OEM, the SEM sub-system should also provide a warranty of at least 2 years. In
case of product breakdown before the warranty period, free repairs/replacement of the SEM
unit should be supported provided the damage did not happen outside standard operating con-
ditions of SEM.

Since SEM is a functional sub-system without kinetic parts, there should be minimal degra-
dation in mechanical reliability due to wear and tear. Electronics inside the sub-system can
have different life spans before they need to be replaced. Using automotive grade parts could
potentially make the SEM module last over 10 years provided the electrical stress that the SEM
sub-system experiences is within the limits of reliability test conditions for which the electron-
ics are tested.

There exists OEMs that offer no maintenance EVSE and hence it should be possible to design
the SEM for zero failures within its life span. In case of a random failure however, it should be
possible for OEM technicians to swap the SEM sub-system with a new unit within 1-2 hours of
failure to minimize down-time. Faulty units should be shipped back by the OEM for analysis,
repaired and be sent back to the OEM for re-installation.

1.9 Literature Survey

The SEM sub-system addresses the following gaps in the market of BEVDC-001 compliant
chargers:

• Provide stand alone sub-system that implements communication between EVSE and EV
as per AIS-138.

• Decouple power electronics from functional control and safety requirements.

• Foresee issues with charging stations installed in highways or rural area.

• Have a strong locally developed and manufactured charging station.

• Possibly lower production cost and more importantly provide local service of EVSE.
19 1.10. Market Survey

1.10 Market Survey

DC fast chargers compliant to BEVDC-001 specifications are available in market as ready to


install units however smart electronic module is not available as a separate product or sub-
system. Thus for comparison, EVSEs offered by two OEMs (SNAK4EV and CharzNet) are
compared in Table 1.6.

Technical CharzNet SNAK4EV


Specifications
DC Output Voltage 50-500 Vdc 150-1000 Vdc
Output Current 100 A Max 100 A Max
Power Output Power Rating 30-150kW 30kW
Connector CHAdeMO/GB/T CCS2
CCS2/Type 2
Number of Connectors 1 or 2 1
Efficiency ≥ 95% ≥ 95%
Input Voltage 3-phase 415V±10% 3-phase 400V±15%
5 wire supply 5 wire supply
Power Input Input Frequency 50 Hz ± 5Hz 50/60 Hz
THD ≤ 5% nominal ≤ 5%
Power Factor ≥ 0.99 (Full Load) ≥ 0.98
Over Current Over Current
Over Voltage Over Voltage
Protection Safety Parameters Under Voltage Under Voltage
and Safety Surge Protection Surge Protection
Short Circuit Short Circuit
Over Temperature Over Temperature
Display 7 or 10 inch LCD 4.3 inch LCD
User Interface Support Language English English
and Control Push Button Emergency Stop Emergency Stop
Visual Indication Error indicator No
Input Supply
State of charge
User Authentication ISO/IEC 14443A RFID, App based
RFID/QR Code
1.10. Market Survey 20

Communication Between Charger CAN PLC (CCS2)


and EV (CHAdeMO/GB/T)
PLC(CCS2)
Charger and OCPP V1.6 or 2.0 OCPP V1.6
Central Server WiFi, Ethernet Ethernet/Wifi
GSM/GPS/GPRS
Bluetooth
Ingress Protection IP54 IP54
Mechanical Cooling Forced Air Cooling NA
Charging Cable Length 5 Meters/Customizable 5 Meters
Operating Temperature -20◦ C to 75◦ C -30◦ C to 55◦
Environmental Humidity 0-95% 5%-95%
Storage Temperature -20◦ C to 80◦ C -40◦ C to 75◦
Altitude upto 3000 meters upto 2000 meters

Table 1.6: Specification comparison of SEM DC fast chargers with existing DC EVSE

It is to be noted that SEM is a sub-system and thus all top-level specifications applicable for
EVSEs may not be applicable to SEM. The specifications relevant to the SEM sub-system are
summarised in Table 1.7.
21 1.11. User Survey

Technical Specifications SEM Module


Input Voltage DC 24 V
Power Input Input Frequency 50 Hz ± 10%
Over Current, Over Voltage
Protection Safety Parameters Under Voltage, Surge Protection
and Safety Short Circuit, Over Temperature
Communication Between Charger and EV CAN bus
Charger and OCPP V1.6
Central Server WiFi, Ethernet
Ingress Protection IP54
Mechanical Operating Temperature -20◦ C to 75◦ C
Environmental Humidity 0-95%
Storage Temperature -20◦ C to 80◦ C
Altitude upto 3000 meters

Table 1.7: Specification of SEM sub-system

1.11 User Survey

As highlighted briefly in Section 1.4 there are three users of the SEM sub-system interacting
on different levels with it:

• A technician in an OEM using the SEM sub-system in their EVSE.

• A charging station employee using the EVSE in a charging station.

• EV users using the EVSE to charge their EVs.

Since there are few OEMs in India that are developing BEVDC-001 compliant fast chargers,
data could not be gathered from perspective of OEM technicians and charging station employ-
ees. EV user data was however collected and studied in a user survey[6] the findings of the
same are summarised below:

• Women, students, salesmen as well as people using public transports have strong prefer-
ence for EVs.
1.12. Wish 22

• Given the limited range of current EVs and lack of charging infrastructure, the early
adopters as well as prospective consumers prefer it for travelling for short distance.

• For public transport, it has been observed that most of the e-rickshaw drivers are from low
income economic and hence affordability of high performance EVSE is a major hurdle.

• AC slow charging is dominant mode of charging among Indian consumers.

• Private charging points are the most widely adopted top-up method for EV charging.

• Both 2 wheeler and 4 wheeler users feel the need of fast charging for daily commute.

• Cost and accessibility of fast chargers are hurdles in migrating to DC fast chargers.

• To facilitate adoption of fast charging, EV manufacturers need to provide and spread


awareness among EV customers about fast charging.

• Innovation in fast chargers to reduce costs incurred by end users can help adoption of fast
charging so that cost to performance ratio is justified when compared with slow chargers.

1.12 Wish

Literature survey, market survey and user survey along with industry requirements from Amber-
root Systems dictate the wish specifications of the smart electronic module and are summarised
in Table 1.8.
23 1.12. Wish

Parameter Description Wish Specification


Power Input Input power to SEM module Mains connected DC 24V UPS
With EV 2 x CAN bus 250 kbps
With CMS Ethernet/WiFi/2G/3G
Communication
With Power converter CAN bus
With central server OCPP 1.6
Metering For Billing Voltage and Current sensors
User interface Human Machine Interface LEDs and 7 inch LCD display
Ambient Temperature -20◦ C to 55◦ C
Environmental Ambient Humidity 5 to 95%
Requirements Ambient Pressure 86 kpa to 106 kpa
Storage Temperature -20◦ C to 80◦ C
Ingress Protection IP 55 or higher
Mechanical
Mechanical Stability Section 11.11.2 of IEC 61851-1
Requirements
Mechanical Impact Section 11.11.3 of IEC 61851-1
Over current, under voltage,
over voltage, surge protection,
Safety Parameters
short circuit, emergency shut-down,
over temperature

Table 1.8: Wish Specification of Smart Electronic Module for BEVDC-001 EV chargers
1.12. Wish 24
Chapter 2

Study

2.1 Functional concept

The interaction of SEM sub-system with other sub-systems in BEVDC-001 compliant EVSE
is shown in Figure 2.1 where solid arrows represent power transfer and line arrows represent
information transfer/communication.

WiFi/2G/3G
Ethernet

C1
Smart Electronic
Module
C2

HMI
(LCD, Indicators)

UPS
Voltage & Current Sensors

OP1 OP2

3 phase
Power Converter
AC

Figure 2.1: Block Diagram of BEV DC001 charger

25
2.1. Functional concept 26

The interface ports accessible for interface with other sub-systems are summarised below:

• Power port : This port allows the SEM unit to be powered. Since BEVDC-001 requires
control, safety and billing functions to be active even in the case of mains power failure, a
UPS of 24V DC rating is optimum for powering the SEM module. BEVDC-001 requires
the EVSE to provide 12/24V DC output to power LED panel lights of canopy and hence
24V 5 Amp DC UPS would be suitable.

• HMI port : This port allows connection of input/output medium like LCD displays, LED
indicators, push buttons, emergency stop etc. The information signals on this interface
allow controlling the EVSE and hence this is a bi-directional low voltage (1.8-5V) high
speed (>100kbps) interface.

• Sensor port : This port is responsible for reading voltage and current supplied to the
outputs for charging EVs. Current and voltage is required to be sensed for each output
channel to facilitate separate billing. Sensor port can take analog or digital inputs subject
to if the sensors provide analog wave forms or digital data-stream. This is low bandwidth
input port with information signals only.

• Communication port to CMS : SEM unit needs to communicate with CMS as well as
central server over communication interfaces like Ethernet, WiFi, cellular networks etc.
for billing and charger management. Depending on the interface, the communication
channel can either be twisted pair or free space.

• Communication ports to EV : Since BEVDC-001 EVSE have two charging port and can
charge two EVs simultaneously, two CAN buses may be required for communicating
with the EVs however only 1 connector is defined (as of July 2023) for one of the two
charging points.

• Communication port to Power converter : The power converter responsible for AC to DC


conversion and charging the EV with the DC supply needs control signals. Amberroot’s
power converter requires the control signals to be digital and sent as data packets over
CAN bus.

CAN bus communication interfaces need to be compliant with CAN 2.0B protocol and CAN
2.0 physical layer requirements in terms of voltage levels, rise fall times, line impedance and
line termination. Dedicated CAN bus transceivers will be used to drive these lines.
27 2.2. Module study

2.2 Module study

A basic implementation of BEV DC001 compliant fast charger is documented in AIS 138 part-
2 Annex B. The same is presented in Figure 2.2. The red dashed line in the figure separated
the EV circuit and signals from the EVSE signals. It is worth noting that commercial DC fast
chargers have additional features which are not shown in Figure 2.2. For example, the GB/T
charging guns come with two temperature sensors for monitoring the terminal temperature
of DC+ and DC- terminals. This is required as bad electrical contacts in high current charging
scenario can create power dissipation and increase the terminal temperature which if unchecked
can lead to melt down of the connectors. There are also interlock sensing switch that sense the
state of electro-mechanical interlock to provide feedback if the interlock was actuated correctly
or not.

Electrical
K7 R6 Interlock
Isolated DC+ DC+
AC-DC K1 K5
Battery
Power Pack
K0 K2 DC- DC- K6
Converter
Insulation
Monitoring
Device
Functional
PE PE Ground

S+ S+
Auxiliary DC Charger
Power Control Unit S- S-
S
R1 R4
CC1 R2 Vehicle
Detect Node 1 Control
CC2 R5 Unit
R3
Detect
K3 A+ A+ Node 2

K4 A- A-

Figure 2.2: Basic implementation of BEV DC001 compliant fast charger

The basic implementation was studied and functions were bifurcated based on whether they
fit in the scope of SEM or not. The functions that are not in the scope of SEM are realised
separately as independent modules where as those that fall in scope of SEM are assigned to
sub-modules within SEM as shown in Figure 2.3 and discussed in following subsections.
2.2. Module study 28

Block Legends
Power Sensor
Management Interface Optional
Mandatory

CAN
Ethernet
Transceiver 1

Micro-controller

CAN
WiFi
Transceiver 2

CAN
Transceiver
HMI
for Power
Converter

Figure 2.3: Block diagram of Smart Electronic Module for BEV DC001 charger

2.2.1 Power Management

This sub-module is responsible for deriving relevant supplies from input of 24V DC and provide
it to all the sub-modules. Following features and specifications are expected out of this module:

• Reverse polarity protection

• Over voltage protection

• Supply rails

– 5V for CAN transceivers (Isolated)


– 5V for Human Machine Interface (HMI)
– 3.3V for I/O supply of micro-controller
– 1.2V for micro-controller core
– 12V for connection detection

2.2.2 Sensor Interface

There are multiple ways of power measurement to facilitate billing. Analog sensors can be
used to measure current and voltage from each EV connector channel but they require analog
29 2.2. Module study

pre-processing circuits. Digital voltage and current sensor modules like VVM301 (as shown in
Figure 2.4) can provide electrical measurements in digital form to SEM. To limit the scope of
SEM sub-system, digital sensor modules are selected over analog sensors.

Figure 2.4: Digital DC power and energy sensor (Source : Vajravegha Mobility)

2.2.3 CAN Transceivers

CAN transceivers are required to translate signals from CAN controller of the micro-controller
into signals compatible to physical layer of CAN bus. These transceivers facilitate communica-
tion with the EV connected to the EVSE as well as for internal communication between power
converter and SEM sub-system. BEVDC-001 specification requires the DC power outputs to
be isolated from one another. In case the isolation clause applies even to CAN bus, isolated
CAN transceivers will be required. A suitable automotive grade isolated CAN transceiver
is the ISO1042 by Texas Instruments. If isolation of CAN bus grounds is not mandatory,
TCAN1044V is a suitable CAN transceiver.

2.2.4 Human Machine Interface

Human machine interface as specified in BEVDC-001 requires the EVSE to have a at least 3.5
inch display with touch screen or keypad support for input. The LCD needs to be bright to be
visible in outdoor lighting. Generic 3.5 inch SPI LCDs like TTX035SVI-02 for simple HMI
functions as shown in Figure 2.5 are suitable for these operations.
2.2. Module study 30

Figure 2.5: 3.5 inch LCD display (Source : panelook)

2.2.5 Connectivity interface

Connectivity to communicate with CMS and central server can be provided using Ethernet,
WiFi or cellular communication modules. There exists connectivity solutions which provide
Ethernet and WiFi connectivity separately however Espressif’s ESP32 modules combine both
into a single easy to use module. One such module is ESP32 WROOM 32UE which along with
a suitable Ethernet Physical layer driver adds internet connectivity to the SEM sub-system.
With modules like A7670C cellular connectivity can be added easily to the SEM module. One
such connectivity solution utilising ESP32 and A7672 by Vajravegha is shown in Figure 2.6
31 2.2. Module study

Figure 2.6: Ethernet, WiFi + 4G cellular connectivity module (Source : Vajravegha)

2.2.6 Micro-controller

Since SEM sub-systems is categorised as automotive equipment, it needs to follow certain


safety standards, most importantly ISO-26262. This standard provides a framework for risk
assessment of failure/faults, their classification and suitable response strategies. This risk clas-
sification scheme is defined as Automotive Safety Integrity Level in ISO 26262. There are four
ASILs identified by the standard: ASIL A, ASIL B, ASIL C, ASIL D. ASIL D dictates the
highest integrity requirements on the product and ASIL A the lowest. Components used in
SEM should have ASIL levels according to the risk assessments of functional faults that they
can run into. Since the micro-controller unit (MCU) is the heart of the SEM sub-system and
is responsible for controlling the power electronics, ASIL D (highest risk assessment rating)
would be preferable. Table 2.1 compares various micro-controllers by different manufacturers
based on metrics relevant to SEM.

Based on the comparison it can be concluded that Texas Instruments Hercules series of micro-
controllers provide good price to performance ratio. Given that TMS570LS0432 comes with
ASIL D ratings and lock step cortex R4 processor at a highly competitive price, it is a suitable
candidate for the smart electronic module.

Note: Since the SEM module may require up to three CAN buses for communicating with the
EVs as well as the power converter, an external CAN controller would be required along side
TMS570LS0432[7].
Manuf- ST Micro- Texas Texas Texas Texas
32

NXP NXP Infenion Infenion


acturer electronics Instruments Instruments Instruments Instruments
STM8A TC212 TMS320 TMS320 TMS570 TMS570
Device S32K14x S32K34x CY8C4248
F52A9 L8F133 F2800157 F28075 LS0432 LS1227
CPU STM8A Cortex M4F Cortex M7 Cortex M0 AURIX C28x C28x Cortex R4 Cortex R4F
Lockstep No No Yes No Yes Yes No Yes Yes
Max
Clock
24 80 160 48 133 120 120 80 160
Rate
(MHz)
Flash
Memory 128 512 1024 256 512 256 512 384 1280
(KB)
RAM
6 64 256 32 56 36 100 32 192
(KB)
CAN 1 2 4 2 3 2 2 2 3
ADC 10 bit x 1 12 bit x 2 12 bit x 2 12 bit x 1 12 bit x 2 12 bit x 2 12 bit x 2 12 bit x 1 12 bit x 2
GPIO 68 58 143 96 59 52 41 45 58
ASIL
B B D B D B B D D
Class
2.2. Module study

Retail
Price 694.54 1333.49 2244 1039.74 3208.84 NA 1536.02 770.86 2160.36
(INR)
Table 2.1: Comparison of micro-controllers for use in SEM sub-system
33 2.3. Industrial design

2.3 Industrial design

2.3.1 Ergonomics and Aesthetics

Since SEM sub-system is required to be installed inside the EVSE, its visual aspects are not as
crucial. The module should however be easy to integrate and secure mechanically inside the
EVSE frame. Mounting holes need to be provided at suitable locations for fastening the SEM
unit. The enclosure should also be rated for IP-54 ingress protection. If the EVSE frame is
constructed in standard rack mount configuration, the SEM unit can be housed in a 1U rack
enclosure with all external interface ports breaking out at the back of the SEM module and
all internal connectors breaking at the front side of the module. This would make ports like
Ethernet be easily accessible when the module is installed in the EVSE.

2.3.2 Sub-module Layout

All the sub-modules of SEM would be populated on a PCB and their exact layout would be
dictated by the choice of components, PCB stack-up and heat-sink requirements if any. Gen-
eral design guidelines however dictate the Input-Output ports to be present at the edge of the
PCB for easy accessibility outside the module casing and MCU to be populated at the center
surrounding which all sub-modules are present. An example of such arrangement is shown in
Figure 2.7

Figure 2.7: Example PCB layout for MCU based boards


2.4. Target scope 34

2.3.3 Product Structure

The SEM unit should be box like to facilitate assembly and installation in rack-frame or in-
dustrial cabinets neatly. If Wi-Fi and cellular antennas are external, the SEM enclosure can be
made of metal for durability and also help in reducing electromagnetic interference (conducted
and radiated emissions). Sheet metal may be employed to fabricate such metallic housing. Ap-
propriate sealants may be required to achieve desired IP ratings. If WiFi and GSM antenna are
internal to the module, the module has to have non-metallic enclosure to prevent blocking RF
signals. Injection moulding or vacuum forming process can be employed for making enclo-
sures depending on the required quantity as injection moulding is fairly expensive compared to
vacuum forming for low production volumes.

Threaded inserts can be used for securing the SEM module PCB in its enclosure. Mounting
holes with rubber dampeners can be used for securing the SEM enclosure with the EVSE frame.
The exact mounting orientation is left to the OEM so long that mounting position does not com-
promises the working environmental specifications of the sub-system. The recurring cost the
product would include, PCB fabrication cost, Semiconductor and electronics (BoM), enclo-
sure cost and maintenance. Non-recurring cost would include engineering costs, compliance
certification costs and hardware infrastructure cost necessary for manufacturing.

2.4 Target scope

Given the wide expanse of functionalities, specifications and compliance that SEM sub-system
is required to meet, scope of SEM needs to be limited to support core functions stated below:

• Digital communication between SEM-EV and SEM-power converter over CAN bus.

• Functional safety sub-routines for fault handling as per ASIL levels.

• Hardware ports/placeholders to support Ethernet and WiFi.

• Hardware ports/placeholders to support cellular connectivity.

• Hardware port/placeholder for basic HMI.

• Hardware port/placeholder for digital metering.


35 2.4. Target scope

2.4.1 Target Specifications

Parameter Description Minimum Nominal Maximum Unit


Input Supply Mains connected UPS 22 24 26 Vdc
Input Current 500 mA
To EV CAN 2B -
CAN version
To Power Converter CAN 2A -
I/O voltage levels -0.3 3.6 V
I/O currents High current I/Os -8/-2 8/2 mA
Low current I/Os 4 -4 mA
HMI Datarate Basic SPI display 1 Mbps
WiFi band 2.4 GHz
Ethernet Datarate 10 100 Mbps
Ambient temperature -20 55 ◦C

Environmental Ambient humidity 5 95 %


Requirements Ambient pressure 86 106 kPa
Storage temperature -20 80 ◦C

Mechanical
Ingress Protection IP54 -
Requirements

Table 2.2: Target Specifications for SEM sub-system


2.4. Target scope 36
Chapter 3

Design

The module level break down of SEM is presented in Figure 2.3. These hardware sub-modules
need to be integrated in order to realise SEM for DC fast charger along with supplementary
software to control the hardware. The hardware blocks can be categorised on the basis of
functionality.

• Power blocks : These blocks are responsible for providing power to other blocks in
the DC EVSE as well as to the EV traction battery. They consist of isolated DC-DC
converters to provide isolation from the main supply as well as regulated DC supply for
all other blocks.

• Control block : This block is responsible for controlling other blocks to facilitate EV
charging in compliance with BEV DC001 specification. In present implementation, a
micro-controller is used to execute control sub-routines for controlling and monitoring
the charging process.

• Sensing blocks : These are responsible for sensing electrical or physical parameters like
current, temperature, charging gun state etc. There are two voltage sensors, one current
sensor, two temperature sensors, one detect node and several switch inputs that interface
with the SEM. Sensing blocks interface with these sensors and switches and translate
them to signals which are compatible with the control block micro-controller.

• Communication blocks : These blocks are responsible for communication of the DC


fast charger with external world (HMI or Internet), EV and blocks internal to the DC
fast charger. These blocks receive stimuli from the user and EV to control the charging
process while also updating the user on the status of charging process.

37
38

Above blocks are required to realise the SEM however a DC fast charger needs several sup-
porting modules around the SEM to be able to deliver power to EV. These modules and their
functionality are listed below:

• Relay driver : The signals from smart electronic module are low current TTL signals
and depending on the relay/contactor type, these signals are to be translated to the relay/-
contactor compatible power signals. This translation is done by the relay driver module.
Relay driver module is designed separately and not as a part of the SEM itself as any
failure in relay drive circuit (which is significantly lower cost compared to SEM) does
not warrant replacing the SEM itself. Also, depending on the choice of relay the output
signal specifications for driving the relay can change.

• Power converter : Ideally a high power, high efficiency, digitally controlled AC-DC
power converter should be used for DC fast charging EVs. However for demo purposes,
a low power (24V 1kW) AC-DC power supply was used along with a boost converter
(1.5kW) to realise the wide output voltage range of 36V to 84V. The boost converter was
modified to add digital control over CAN bus by using a TIVA board.

• Back-up supply : The SEM should be able to work even in case of power outage so that
partial charging is still billed to the customer and charging is stopped gracefully. The
backup supply is based on a 6S lithium ion battery pack which gets charged when power
is available from the grid and supplies power to all essential blocks of the DC fast charger
in case of power outage.

• Charging gun : BEV-DC001 standard is based on the Chinese DC fast charging standard
GB/T-27820 and hence the GB/T gun and sockets are required by the DC fast charger
and EV respectively to support fast charging. The gun and socket includes necessary
electronics for charger-vehicle hand-shake and safety interlocks for DC fast charging.

• Battery, BMS and EV control unit : The EV should provide circuital and firmware
counter part of the charger circuit to enable DC fast charging the traction battery. The
EV control unit is responsible for communication and handshake with the SEM present
in the DC fast charger. BMS provides information like state of charge (SoC), over volt-
age/under voltage protection and most importantly cell balancing. The EV control unit
and BMS may be implemented as a single sub system.
39 3.1. Module Partitioning

3.1 Module Partitioning

• Hardware :

– Micro-controller unit: The smart electronic module contains Texas Instruments


Hercules™ TMS570LS0432 automotive compliant ASIL class-D micro-controller
for all executing the algorithms as per BEV DC001 standard. The choice of micro-
controller is discussed in Table 2.1.
– Internet connectivity: For connecting to the internet, Espressif’s ESP32 based TTGO
SIM7600E-H development module was used. This module runs the Open Charg-
ing Point Protocol (OCPP) client firmware and provides connectivity option to the
OCPP server over internet using WiFi and 4G cellular networking. For wired com-
munication the TTGO board interfaces with ENC28J60 SPI-Ethernet module.
– Connectivity to EV and power converter: CAN2.0B communication protocol is
used for communication of SEM and the EV as well as the power converter respon-
sible for delivering power to the EV. Texas Instruments’ ISO1042V isolated CAN
transceivers were used for providing physical layer interface to CAN1 and CAN2
modules present in TMS570LS0432.
– Voltage sensors: TMS570LS0432 comes with 16 channel 12-bit ADC which con-
verts analog input voltage in the range 0-3.3V into a digital code-word between
0-4095. The voltages to be measured from AC-DC power supply and the traction
battery however range between 25V and 84V. Using resistor divider is not recom-
mended as SEM has to be isolated from all power signals. Thus Texas Instruments’
AMC3311Q isolation amplifier is used for down-scaling the voltage signal while
also providing isolation.
– Current sensor: Since the SEM also takes care of energy metering, a DC current
sensor is required to measure the current and calculate power and energy. Given the
power levels and scalability constraints, WCS1500 hall effect current sensor was
chosen. The sensor inherently provided isolation from the high power signal while
providing flexible sensitivity as other sensors in the family are drop-in replacements
for lower current ratings.
– Detect Node voltage sensor: A detect node is provided to both DC fast charger and
EV for detecting interconnection of the socket and plug. The node voltage of this
detect node changes depending on the state of connection. For sensing this voltage
3.1. Module Partitioning 40

with respect to protective earth while maintaining isolation, a custom op-amp circuit
with opto-coupled feedback is utilised.
– Temperature Sensor: The GB/T gun is equipped with two PT1000 temperature sen-
sors that sense the temperatures of DC+ and DC- terminals. These temperature
sensors are essentially positive temperature coefficient resistors. The resistors form
a voltage divider with precision resistors. The voltage thus generated at the junction
is passed through gain and offset stage implemented using op amps before feeding
to the ADC pins of TMS570LS0432.
– I/O signals: The SEM provides open drain low current drive outputs using opto-
coupler PC-817 to actuate relays and contactors as they are cost-effective and robust
solution for isolation. They are also used in reverse direction for sensing binary
inputs like emergency off button, insulation monitoring device output, GB/T gun
interlock switch etc.
– Human machine interface (HMI): A 6 pin port is provided in SEM to connect RS-
485 HMI display (like DWIN DMG80480F070 7 inch HMI). The display com-
municates with TMS570LS0432 using UART communication. Since high speed
data transmission over long cables is required, full duplex RS-485 interface IC
SN65LBC179 is used owing to its differential signalling scheme and immunity to
common mode noise.

• Embedded Firmware :

– TMS570LS0432 firmware (SEM): The core of SEM TMS570LS0432 is responsible


for implementing control logic for the DC fast charging in accordance with BEV
DC001 specification. The firmware is written in C and compiled using default
compiler in code composer studio provided by Texas Instruments.
– TMS570LS0432 firmware (EV): The EV control unit needs to support BEV-DC001
specification to enable DC fast charging. The same hardware circuit used for SEM
is used to realise this EV control unit. The firmware however is the counterpart of
the SEM firmware so that all communication from SEM is handled appropriately.
– ESP32 firmware: The ESP32 is responsible for implementing OCPP 1.6 client be-
haviour so that the charger can be connected to different charger management soft-
ware (CMS) back-ends. This allows the charger to be CMS independent and easy to
adopt for charging station owners. The firmware includes necessary software stack
to communicate over WiFi but can use Ethernet and 4G network as well.
41 3.2. Stimuli

• Server and App :

– Server implementation : A mock up OCPP server was implemented using web-


socket and python libraries to demonstrate communication of SEM in the DC fast
charger with OCPP compliant server. There exists paid services which allow man-
agement of charging stations but they do not provide full control and debug log of
the OCPP communication messages.
– Mobile application : Commercial EV charging solutions offer a companion app to
the EV users which can be installed on their smartphones. This provides hassle
free management of user for the service provider and smooth user experience by
enabling notifications about charging status, nearest charge point and billing rates.
Although not included in the scope of the project, a mock-up app for android de-
vices was developed using MIT app inventor for demonstration purposes.

3.2 Stimuli

The following section is a comprehensive list of all the stimuli that SEM and supporting hard-
ware and software components are subjected to in an EV charge cycle. While SEM is the
centre piece of the DC fast charger, understanding external stimuli from OCPP server/user etc
are equally important to understand the design choices in firmware which will be discussed in
subsequent sections.

• SEM unit : The SEM unit integrated in DC fast charger is subjected to stimuli from
following sources:

– Detect node voltage: Connection confirmation 1 (CC1) terminal of the GB/T fast
charging gun provides three voltage levels at 12V, 6V and 4V with respect to the
protective earth (PE) terminal. This voltage tells the DC fast charger about the status
of physical mating of the GB/T socket and gun.
– Vehicle CAN bus: This is a digital stimuli from vehicle control unit to the SEM and
is responsible for communication as per BEV DC001 specification between EVSE
and the EV.
– Current sense: The SEM is required to monitor charging current through out the
charging process for safety and billing purposes and hence a current sensor is re-
quired to provide the necessary input to the SEM.
3.2. Stimuli 42

– Lock sense: The GB/T charging gun has a electro-mechanical interlock to secure
the gun into the socket so that during charging process the electrical contact cannot
be broken. To ensure the interlock is engaged, a sense switch is provided built into
the gun that reflect the status of interlock.
– Temperature sense: Two temperature sensors (PT1000) are used to provide temper-
ature information of the GB/T charging gun contacts DC+ and DC- to the SEM.
– Voltage sense: The battery voltage and power converter output voltage needs to be
sensed and matched before starting the process of charging. Hence these voltages
are required as inputs to the SEM to prevent hot contact switching of the relays.
They are also used in handshake phase with EV for performing isolation test be-
tween DC+ and DC- terminals.
– Emergency off: An emergency-off signal is provided to SEM which can trigger
emergency shut-down of the EVSE in case a user/charging station staff notices ab-
normal behavior or in case any emergency situation arises.
– IMD signal: An insulation monitoring device is required to monitor insulation be-
tween protective earth and DC+/DC- power rails. This signal is a stimuli to the
SEM unit so that an emergency off can be triggered in case insulation failure is
detected.
– HMI signals: A human machine interface (HMI) is required to control the DC fast
charger which in this case is realised using a 7 inch LCD touch screen. The screen
sends digital messages to the SEM in case any touch stimuli is detected.
– Server messages: The OCPP 1.6 client present in SEM can connect to OCPP 1.6
server after which server can control the charge point remotely. These messages
can be received over the internet using WiFi, Ethernet or cellular connection.

• Relay driver: The relay driver sub module interfaces with SEM and relays/contactors for
making and breaking circuital connections according to BEV-DC001 specification. The
following input signals are expected by the relay drive sub module from the SEM:

– K1-K2 relay: Relays K1-K2 (refer Figure 2.2) are responsible for connecting the
power converter with the charging gun and are controlled by the SEM.
– K7 relay: Relay K7 is responsible for pre-charging the capacitors of the power
converter before turning on K1-K2 to prevent surge currents. SEM takes care of
timing the relays K7, K1 and K2.
43 3.3. Hardware design

– K3-K4 relay: These relays are responsible for powering the EV control unit in case
the traction batteries are completely dead and BMS cuts power to the EV control
unit. These relays are actuated by the SEM after detection of EV.
– Electrical interlock: The GB/T DC charging gun has a solenoid based locking
mechanism which needs to be actuated by the SEM as and when the gun has to
be locked into the EV charging socket.

• : A basic digitally controllable AC to DC power converter is required for demonstrating


the charging process for a wide variety of battery voltages ranging from 48V to 84V. The
power converter used in this implementation uses a single phase 230V AC to 24V DC
power supply in combination with a programmable boost converter.

• The OCPP server, though not a part of the smart electronic module receives messages
from both the SEM and user app. User app can prompt the OCPP server to start/stop
charging process by sending commands over web-socket connection.

3.3 Hardware design

3.3.1 Power Supplies

SEM requires multiple voltage rails for different sub modules like the MCU core and sensor
interfaces and some of these require isolation as well. The power distribution and power budget
calculation is very crucial to avoid brown-outs, cross-talks and EMI issues in the final product.
The following power rails are required to be derived from main 24V DC input.

• +5V DC for digital core: This supply rail is used by ESP32, Ethernet module and HMI
display. It is also used to derive other supplies. Due to large current requirements and
need for isolation from main +24V supply, 10W isolated DC DC converter module by
CUI (shown in Figure 3.1 was used. The HMI consumes 800mA and the ESP32 con-
sumes up to 500mA of current.

• +3.3V and +1.2V for MCU I/O supply: This supply is derived by using an LDO on the
+5V supply rail discussed above. The generated supply is then used for IO supply of the
MCU and also another LDO to generate 1.2V supply for MCU core. The total current
budget allocated is 300mA combined for +3.3V and +1.2V rails.
3.3. Hardware design 44

• +12V supply for CC1 sense: This isolated supply is used to power the CC1 node voltage
detect circuits. Since the current requirements are low, SIP module of current rating
80mA are used.

• +5V for CAN transceivers: The CAN transceivers need isolated supply for electrical
isolation between MCU core and CAN physical interface. 5V 200mA SIP modules are
utilised for this purpose.

The power supply and distribution circuit is shown in Figure 3.2 and current requirements from
each of these supplies are tabulated in Table 3.1.

Figure 3.1: 24V to 5V DC-DC isolated module in DIP package

S No. Supply Name Nominal Voltage Current consumption


1 Core Supply 5.0V 1.6 A
2 MCU IO Supply 3.3V 150mA
3 MCU digital Supply 1.2V 150mA
4 CC1 Sense Supply 12.0V 80mA
5 CAN1/2 Supply 5.0V 200mA

Table 3.1: Current budgeting for different supply rails of SEM

The 5V isolated DC-DC converter module that was chosen was rated for 2A but the output
current rating de-rated very quickly with temperature. For this reason, extra heat sink was
required for keeping the temperature of the module in check. Since the heat-sink was an after
thought and thermal information about the package were not provided in the data-sheet. The
heat sink was designed by enclosure constraints and not actual thermal calculations.
1 2 3 4 5 6
45

TestPoint
+24V C54
+24V 5Amps U1 TP14
1u
B2405S-1WR3
DC UPS VCAN1
TestPoint 24->5V DC DC for CAN
+ - C20
TP15 C28 transceiver resoponsible for
4.7u

GND
Vin+
0V
Vout
10u R35 vehicle to charger communication.
A A

1
2
3
4
DNI place holders for isolated
0 GND to Earth impedance incase
VCAN1
GND3 GND1

1
2
GND3 +24V GND1 Conn_01x02_Pin GND1 EMI requirements are not satisifed.
J12
TestPoint
+24V U2 TP16
C55
B2405S-1WR3
VCAN2 1u
24->5V DC DC for CAN
transceiver resoponsible for Power
C21 TestPoint C29
converter to SEM communication.

GND
Vin+
0V
Vout
4.7u TP17 10u
R36 DNI place holders for isolated

1
2
3
4
VCAN2
GND to Earth impedance incase
0

1
2
Conn_01x02_Pin GND2 EMI requirements are not satisifed.
GND3 +24V GND2 GND2
GND3 J14
TestPoint
C56
+ - + - + - + - PS1 TP18
1u
+24V J16 PDQE10-Q24-S5-D
+24V to +5V +24V to +5V +24V to +5V +24V to +12V +24V 5V_DIG
24->5V DC DC for CAN

2
1
Isolated Isolated Isolated Isolated 3 2
+VOUT VIN transceiver resoponsible for Power
5 1 GND3 C33
DC DC DC DC DC DC DC DC 0V GND R5 converter to SEM communication.
B C32 6 10u B
+ - + - + - + - CTRL DNI place holders for HMI, Main
4.7u
TP19 0 MCU, Voltage sensing isolation

5V_DIG
MCU_VCC_EN TestPoint GNDD amplifiers. DNI place holders for
GNDD

GNDD
DC Control MCU Proximity Function MCU_VCC_EN GND3 isolated GND to Earth impedance

1
2
CAN Interface Ch1 HMI and V Sense GND3 Conn_01x02_Pin incase EMI requirements are not
CAN Interface Ch2 C57
J18 satisifed.
+24V 1u
TestPoint
24->12V DC DC for CC1 signal
TP20 VCC_PF
+ - U8 B2412S-1WR3 handshake between charger and
C30 R6
vehicle. DNI place holders for HMI,
3.3V and 1.2V C31
4.7u TestPoint
Main MCU, Voltage sensing
Using LDOs 10u isolation amplifiers. DNI place

GND
Vin+
0V
Vout
TP21 0
holders for isolated GND to Earth

1
2
3
4
GNDA
VCC_PF impedance incase EMI

1
2
GND3 Conn_01x02_Pin GNDA requirements are not satisifed.
Power supply to the smart electronic GND3 +24V GNDA J20
module is derieved from 24V DC as the
BEV DC001 specification requires the DC GNDD GNDD GNDD
+3V3

VCAN1
VCAN2
5V_DIG
VCC_PF

C IC14 C
fast charger to provide 24V DC UPS for TPS78533QKVURQ1 IC13
C61
C58 TLV70012QDDCRQ1 C60
digital function and shed lights. The supply 1 3 1u
10u EN GND 1u D11 D14 D15 D16 D17
2 1 4
hoever is isolated so that no sub-system 5V_DIG IN IN NC LED LED LED LED LED
4 2 5 2
J8 OUT GND OUT J10
of the SEM module shares common ground 5 3 1
Conn_01x02_Pin NC EN +1V2 R7 R8 R9 R10 R11
1
Conn_01x02_Pin 2.2k 2.2k 2.2k 12k 1k
with the UPS DC supply. Additionally, the 2 GNDD
+3V3
voltage sense, proximity function signal C59 TestPoint TestPoint
10u TP22 TP23 GND1 GND2 GNDD GNDA GNDD
and all other IOs from/to the SEM are also
isolated. All supplies can be connected/
GNDD
disconnected using jumpers to facilitate +3V3 +1V2

Figure 3.2: Schematic of power distribution for SEM sub-modules


current measurements.
Indian Institute of Science, Bangalore
Sheet: /Power_SM/
D File: power_sm.kicad_sch D

Title: Smart Electronic Module


Size: A4 Date: 2023-12-28 Rev: 1.0
KiCad E.D.A. 8.0.2 Id: 2/8
1 2 3 4 5 6
3.3. Hardware design
3.3. Hardware design 46

3.3.2 Interconnects
1 2 3 4 5 6

The SEM connects to other modules for controlling the EVSE behavior. It also derives power
and supplies power through some of these ports. For easy assembly, phoenix connectors were
used for all signal and power connections. The connector schematic is shown in Figure 3.3. A

J3 J4 J7 J13 J11 J9 J25


Conn_01x03_Socket Conn_01x02_Socket Conn_01x03_Socket Conn_01x02_Socket Conn_01x02_Socket Conn_01x02_Socket Conn_01x02_Socket
3 1 3 1 1 1 1
IsenseA DC+ CANH_A IMDA+ K3_K4A- K1_K2A- K7A-
2 2 2 2 2 2 2
GNDD DC- GND1 IMDA- K3_K4A+ K1_K2A+ K7A+
1 1
5V_DIG CANL_A

Current Sense Cable Voltage Sense BMS CAN bus connector IMD Inputs K3_K4 control K1_K2 control K7 control

J17 J19 J21 J22 J24


Conn_01x03_Socket
Conn_01x02_Socket Conn_01x02_Socket Conn_01x02_Socket Conn_01x06_Socket Conn_01x02_Socket
1 1 1 3
LOCK_A- LOCK_A_PWR- CC1A 1 1 PT_DC+_A
2 2 2 5V_DIG EMO+ 2
LOCK_A+ LOCK_A_PWR+ GNDA 2 2 J15 GNDD
Y EMO- 1
3 PT_DC-_A
Z EMO
4 B
B
5
A Conn_01x02_Socket
6 1
GNDD J5 PCDC+
2
PCDC-
Interlock Feedback Interlock power control Protective Earth & CC1 HMI connector Power Converter Voltage Sense Gun Temperature Sensor

D2 J28
J6 J29
J2 SS34 Conn_01x03_Socket
1 Conn_01x02_Socket 3 Conn_01x02_Socket
1 CANH_PC 1
2 +24V 2
GND3 2 GND2 2
3 GND3 1
CANL_PC

Barrel_Jack_Switch_Pin3Ring
DC Barrel Jack for main supply Main supply (Phoenix connector) Power converter CAN bus connector Earth Connector

All I/Os to theFigure


module3.3:
usePorts on the
phoenix SEM unit
terminals. The for power
barrel Jackand signal
input is only for
C
powering the SEM module while bench testing. All I/O ports will be populated with
ESD diodes close to the terminal points for EMC.

3.3.3 Micro-controller unit (MCU) and I/Os

The MCU core include all electronics which is essential for making the MCU boot up and be
ready to receive programs from an external JTAG programmer. Texas Instruments provided the
Indian Institute of Science, Bangalore
Sheet: /Ports/
schematic and layout files of a supported launchpad which were
File: used as base design. The MCU
connectivity.kicad_sch D

Title: Smart Electronic Module


uses a 16MHz external crystal oscillator and features two resets for power
Size: A4
KiCad E.D.A. 8.0.2
Date: on reset and digital
2023-12-28 Rev: 1.0
Id: 7/8
1 2 3 4 5 6
core reset which need to be biased appropriately. It is to be noted that power on reset and MCU
reset have to be sequenced correctly i.e. MCU reset should be de-asserted after POR.

The GPIO interactions in SEM and not straight forward as isolation of input output signals is
very important. Opto-couplers are used to ensure that all digital input-outputs are electrically
isolated from the MCU core. These complimentary parts (shown in Figure 3.4) and the MCU
core (shown in Figure 3.5) are responsible for all digital signaling interactions of SEM with
outside world. Other circuital components like analog sensors are connected to the ADC pins
of the MCU suitably. Digital communication ports like CAN and UART are also connected
to corresponding transceivers. All unused pins of the MCU are connected to test points. This
allows the unused GPIOs to be used for debugging or adding additional functionalities.
1 2 3 4 5 6
47

+1V2 +3V3
JP32
1 2
GNDD
C1 C2

+3V3

2
K_GND
22pF 22pF

OSC_IN
OSC_OUT
NERROR
Y1 Crystal_GND24
1 3 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19
OSC_IN OSC_OUT
1k 100n 100n 100n 100n 100n 100n 100n 4.7u 100n 100n 100n 100n 100n 4.7u
A R2 A

4
JP33 JP30
1 2 SolderJumper_2_Open
GNDD 1 2
TEST GNDD D1 RED
GNDD GNDD
+3V3
J1
R20 10k
EMU0 Conn_02x07_Odd_Even DE-coupling Caps for MCU core Vcc (1.2V) and VCCIO (3.3V)
R16 10k 1 2
EMU1 TMS nTRST
3 4
R17 10k TDI GNDD
TMS 5 6
+3V3
R18 10k 7 8 GNDD GNDD
TDI TDO JTAG_SEL
9 10
R19 10k RTCK GNDD IMDA+ +3V3
RTCK 11 12
TCK GNDD
R21 10k 13 14
TCK EMU0 EMU1 R43 R46
R37
R38 10k 10k
1k
10k R44 U6 R45 U7
MCURST PORRST +3V3 +3V3 +3V3 U4

IMDA_MCU
K3_K4A+
K1_K2A+

1k EL817 1k EL817

K3_K4_AMCU
EL817 K1_K2_AMCU
1 4 1 4
1 4
10k 10k 2.2k
D6

100
100

R25
R26
R22 R23 R24 2 3 2 3

JTAG_SEL
MCURST
PORRST
B D 2 3 B

4
3
3
4
C3 C4 C5
IMDA- GNDD GNDD

SW1
SW2
GNDD
K3_K4A-
K1_K2A-

100n 1uF 1uF

1
2
2
1

SW_MEC_5E
SW_MEC_5E
GNDD GNDD GNDD
GNDD Insulation Monitoring Relay K3 K4 activation Relay K1 K2 activation
Device Input open drain output open drain output
MCU JTAG, XTAL and Resets

GNDD
GNDD
+3V3
+3V3 5V_DIG
5V_DIG
R90 R80
R83
10k R84 10k
R39 1k
R40 R89 U21 10k R79 U17
1k U19
K7A+

10k 1k EL817 LOCK_A+ 1k EL817

LOCK_PWR_AMCU
LOCKA_MCU
K7_AMCU

U5 EL817
C EMO+ 1 4 1 4 C

EMO_MCU
EL817 LOCK_A_PWR+ 1 4
LOCK_A-
1 4
EMO- 2 3 2 3
LOCK_A_PWR- 2 3
2 3
GNDD GNDD GNDD
K7A-

GNDD
GNDD GNDD

Emergency Off Device Input Electro-Mechanical Lock Electro-Mechanical Lock Relay K7 activation
Note : EMO switch should be normally closed type
open drain actuating output Feedback Input open drain output

Figure 3.4: Complimentary components for MCU core


FB5
All complimentary parts to provide I/O to FerriteBead
+3V3
MCU including programming headers, AD_REF
decoupling caps, XTAL. C63 C64
4.7u 100n
Sheet: /MCU_comp/
D File: mcu_comp.kicad_sch D

Title:
ADC_Ref GNDD
Size: A4 Date: Rev:
KiCad E.D.A. 8.0.2 Id: 8/8
1 2 3 4 5 6
3.3. Hardware design
1 2 3 4 5 6

Core MCU controls the Vehicle-Charger


communication according to GB/T

TP47
TP48
TP50
TP51
TP52
TP53
TP54

TP41
TP67
TP5
TP6
TP7
TP42
TP43
TP44
TP45
TP46
+1V2
+3V3
GNDD
requirements. All the unsused pins will be

CAN1RX
CAN1TX
I_ADC_A

GNDD

TMS
broken out into headers for allowing easy
A access incase functionality expansion is A

R29
R30
required. All IO pins are provided with solder

50
50
jumper pads and test points for easy

1
JP19
disconnection and post fabrication flexibility.

JP11
3.3. Hardware design

2
IC1

75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
TMS5700432BPZQQ1
JP18
2 1 76 50
nTRST NTRST ADIN[10] TP55

TMS
JP20
2 1 77 49

ADEVT
TDI ADIN[1] TP56

VSS_7
VSS_6
TDI

VCC_5
JP21
2 1 78 48

CAN1TX
ADIN[8]
ADIN[6]
ADIN[5]
ADIN[4]
ADIN[3]
ADIN[2]

CAN1RX
VCCIO_3

SPI2CLK
TDO TDO ADIN[9] TP57

ADIN[11]

N2HET[8]
SPI2SIMO
SPI2SOMI
JP22
2 1 79 47
TCK TCK VSSAD/ADREFLO GNDD

MIBSPI1CLK
N2HET[024]
JP23
2 1 80 46

MIBSPI1SOMI
MIBSPI1SIMO

MIBSPI1NENA
RTCK RTCK VCCAD/ADREFHI AD_REF

MIBSPI1NCS[0]
JP24
2 1 81 45 JP13
1 2
MCURST NRST ADIN[21] MCU_TDC+_A
JP25
2 1 82 44 JP12
1 2
NERROR NERROR ADIN[20] CC1A_MCU
83 43 JP81 2
TP77 N2HET[10] ADIN[7] MCU_TDC-_A
JP26
2 1 84 42 JP31 2
ECLK ECLK ADIN[0] DC_Sense
B 85 41 JP21 2 B
+3V3 VCCIO_4 ADIN[17] PCDC_Sense
86 40
GNDD VSS_8 ADIN[16] TP24
87 39
VSS_9 MIBSPI1NCS[3] TP58
88 38 2 JP31
1
+1V2 VCC_6 SPI3NCS[0] SPI2CS
89 37
TP75 N2HET[12] SPI3NENA TP4
90 36 2 JP27
1
TP76 N2HET[14] SPI3CLK SPI2CLK
50 91 35 2 JP35
1
CAN2TX R27 CAN2TX SPI3SIMO SPI2MOSI
50 92 34 1 2
CAN2RX R28 CAN2RX SPI3SOMI SPI2MISO
93 33
TP74 MIBSPI1NCS[1] VSS_5 GNDD
JP16
1 2 94 32
HMI_RX LINRX VCC_4 +1V2
JP15
1 2 95 31 JP14
1 2
HMI_TX LINTX NPORRST PORRST
96 30
+3V3 VCCP VCC_3 +1V2
97 29
TP73 N2HET[16] VSS_4 GNDD
98 28
TP72 N2HET[18] VCCIO_2 +3V3
99 27
+1V2 VCC_7 MIBSPI1NCS[2] TP64
100 26
GNDD VSS_10 N2HET[6] TP65

GIOA[0]
GIOA[1]
FLTP1
FLTP2
GIOA[2]
VCCIO_1
VSS_1
GIOA[3]
GIOA[4]
GIOA[5]
N2HET[022]
GIOA[6]
VCC_1
OSCIN
KELVIN_GND
OSCOUT
VSS_2
GIOA[7]
N2HET[0]
VSS_3
VCC_2
N2HET[2]
SPI2NCS[0]
TEST
N2HET[4]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
C C

2
2

Figure 3.5: MCU core with pin assignments


JP17

JP51
2
1

2
2
2
2
JP11

1
JP10

JP41
JP91
JP61
JP71
TEST

+3V3
+1V2
+1V2

K_GND

GNDD
GNDD
GNDD

OSC_IN
TP8
TP3

TP68
TP69
TP70
TP66

OSC_OUT

K7_AMCU
EMO_MCU

IMDA_MCU
LOCKA_MCU

K3_K4_AMCU
K1_K2_AMCU
LOCK_PWR_AMCU

Indian Institute of Science, Bangalore


Sheet: /MCU_core/
D File: mcu_core.kicad_sch D

Title: Smart Electronic Module


Size: A4 Date: 2023-12-28 Rev: 1.0
KiCad E.D.A. 8.0.2 Id: 3/8
1 2 3 4 5 6
48
49 3.3. Hardware design

The supply lines of +3.3V and +1.2V need to be filtered with plenty of decoupling capacitors.
Similarly the analog to digital converter (ADC) in the MCU requires a stable reference voltage
to be provided on the ADREFH pin. This is achieved by using a ferrite bead and decoupling
capacitor on the pin. Lastly, to facilitate customisation, all the signal pins are connected to
solder jumpers. This allows signals to be connected/disconnected or even be blue wired later.
All the values of resistors and capacitors are as per the recommendation of the data sheet.

The opto-couplers have a current transfer ratio (CTR) of 0.5 worst case. To achieve more than
500µA of current transfer from input to output when the opto-coupler with forward voltage Vf
is powered with GPIO voltage Vio , current limiting resistor required is given by

(Vio −V f )
R= ×CT R
If
(3.3 − 1.4)
R= × 0.5
0.5 × 10−3
R = 1.9kΩ

To ensure that the output current is greater than 500µA, 1kΩ resistor was chosen. Additionally,
10k pull down was added to prevent floating output condition when the MCU is in reset mode.
Protection diode is provided for reverse polarity protection on insulation monitoring device
input using diode.

3.3.4 Sensor interfaces

SEM requires to read electrical and physical parameters from a variety of sensors which are
already summarised in Section 3.2. The schematic of circuits that are responsible for interfacing
the transducers with MCU core are shown in Figure 3.6.

3.3.4.1 CC1 node sense circuit

CC1 node is essentially a voltage sense node which has three valid levels - 12V, 6V and 4V
depending on the connection status of the charging gun with the socket. Since the voltage levels
are out of working range of the MCU adc (0-3.3V), a level translation is required along with
ground isolation. This is achieved by using two opto-couplers in feedback path of an op-amp
based unity gain amplifier.
1 2 3 4 5 6

U10D
VCC_PF
LM2902 100k R58
C40 C38
GNDA R49 IC3
5V_DIG 12 R59
1k + 1k R60 AMC3311QDWERQ1
4 1 14 U10A 330k 1u 1n 5V_DIG
3.3k
13 LM2902 3 1 16 100n C24 GNDD 47k
R48 - + CC1A DCDC_OUT DCDC_IN
3 2 1 2 15
DCDC_HGND DCDC_GND TP1 R34

5V_DIG
R47 2 100n C42 3 14
A C36 1n - HLDO_IN DIAG A
R82 EL817 DC+ 4 13 TestPoint
C34 R57 330k 100n NC LDO_OUT
1k U9 D9 100n C41 5 12
100n HLDO_OUT VDD
10k R62 6 11

1k
CC1A_MCU 2V7z IN OUTP DC_OUTP C25 C37

R54
1 4 C39 100k C43 1n 7 10

VCC_PF
100k R56 HGND_1 OUTN DC_OUTN
D3 8 9
GNDD HGND_2 GND 1n 1u
2 3 D8 GNDA FB1 GNDD
3V3 R52 TP10 GNDD
FerriteBead
3.3. Hardware design

5Vz 150k TestPoint


GNDA U13 EL817 2.2k 100k R66
100n C35
GNDD

U10E
DC_OUTN

LM2902
10k R51 TP9
GNDA 4 11 R78 R64 100k
GNDA VCC_PF V+ V- 10k TestPoint IC5

GNDA
R55
OPA388QDBVRQ1

+3V3
R53
CC1 Sense (Isolated) FerriteBead
150k 1 4
FB2 GNDD OUT -IN
DC_Sense 2 5
R76 V- V+
3
I_ADC_A IC4 R61 +IN
Hall Effect sensor 100k R63
2.2k OPA388QDBVRQ1 100k

5V_DIG
GNDD DC_OUTP
WCS1500 output DC-
1 4 R33 100k

R75

3.3k
OUT -IN
2 5 buffered before
GNDD V- V+
B 3 B
IsenseA +IN C23 C44
GNDD feeding to the MCU IC10
TestPoint TP13 AMC3311QDWERQ1
ADC 1u 1n 5V_DIG
DC Current Sense buffer 1 16 100n C48 GNDD 47k
DCDC_OUT DCDC_IN
2 15
DCDC_HGND DCDC_GND TP2 R77
5V_DIG

100n C45 3 14
HLDO_IN DIAG
PCDC+ 4 13 TestPoint
2.2k 330k R104 NC LDO_OUT
100n C46 5 12
HLDO_OUT VDD
U10B R65 6 11
R41 R102 100k IN OUTP PCDC_OUTP C49 C50
LM2902 5 100k C47 1n 7 10

3.3k
IC9 + HGND_1 OUTN

R105
PCDC_OUTN
7 8 9

2.2k
OPA388QDBVRQ1 HGND_2 GND 1n 1u

R106

+3V3
FB3

GNDA
6
- R67 TP11 GNDD
1 4 +3V3 FerriteBead GNDD

MCU_TDC-_A
GNDD OUT -IN 150k TestPoint
2 5 2.2k 100k R73
V- V+ U10C
3 PCDC_OUTN
+3V3 +IN LM2902 10 R70

GNDD
+ TP12 R91 R72 100k
8 10k TestPoint

1k
IC11

1n
GNDD 330k R101

R103
GNDA
9
- OPA388QDBVRQ1
+3V3

PT_DC-_A R68
FerriteBead
R100 100k 150k PCDC_Sense 1 4
C FB4 GNDD OUT -IN C

C65
2 5
V- V+
GNDD D- temperature Sense Unused Op-amps 3
R69 +IN

Figure 3.6: Sensor interface circuits


100k R74
100k
GNDD PCDC_OUTP
PCDC-
R71 100k
+3V3 GNDD
2.2k 330k R94
100n C67

R81 R93 100k


Power Converter and Vehicle side isolated voltage sensing

R97
3.3k
IC8

R98

2.2k
OPA388QDBVRQ1

+3V3
1 4

MCU_TDC+_A
GNDD OUT -IN +3V3
2 5
V- V+
3
+IN

GNDD

1k
R99
GNDD 330k R96
PT_DC+_A
+3V3
Indian Institute of Science, Bangalore
R95 100k

1n
Sheet: /Sensors/
D File: sensors.kicad_sch D

Title: Smart Electronic Module

C66
D+ temperature Sense Size: A4 Date: 2023-12-28 Rev: 1.0
GNDD
KiCad E.D.A. 8.0.2 Id: 4/8
1 2 3 4 5 6
50
51 3.3. Hardware design

The offset that has to be removed from the CC1 node is ideally 4V as that is the lowest voltage
the node can go in normal operating conditions. However to include margin of error in biasing,
3V is suitable to be subtracted from CC1 voltage. 2.7V zeners are readily available and hence
utilised to generate the required offset∗ . The resulting voltage is then to be scaled so that 1.3V
to 9.3V is scaled to 0-3.3V. A gain of 0.3 scales the input voltage from 9.3V to 2.79V.

According to the data sheet of zener diode, the forward diode drop of 2.7V is achieved at a
breakdown current of 2.5mA. The required breakdown resistance is given by

(Vcc −Vd )
R=
Ir
(12 − 2.7)
R=
2.5 × 10−3
R = 3.72kΩ

To ensure breakdown, 3.3k resistor was used in series with the 2.7V zener. A difference ampli-
fier can then be used for subtraction of this offset from CC1 node voltage and scaling it down
to ADC range at the same time. It is to be noted that the difference amplifier has a finite input
impedance and this can load the input voltages. While using an instrumentation amplifier can
solve this problem, it is not a cost conscious design choice. Instead the feedback resistors of the
difference amplifier are kept at least two orders higher than the input impedance. The feedback
resistors are thus chosen to be 330k and 100k. The final input-output relation reduces to

R = 0.33 ∗ (VCC1 − 2.7)

Above expression when evaluated for 12V and 4V input generated output of 3.069V and 0.43V
respectively. Thus the ADC range is fully utilised while leaving margin for errors in the biasing
of the CC1 node. The output is taken from secondary opto-coupler. The voltage is clamped to
3.3V at the output using another zener diode for protection of the ADC pin. This turned out
to be a bad design choice as zener diodes can consume significant current even when not in
breakdown and was eventually removed in final hardware.

* In hind-sight, zener diodes are not good for generating reference voltages when operating
at low break down currents or for low power applications. Using dedicated voltage reference
generation ICs provide more stable reference voltages and even eliminate reference deviations
cause due to temperature variations.
3.3. Hardware design 52

3.3.4.2 Battery and power converter voltage sense circuit

The voltage of battery and power converter responsible for battery charging are to be monitored
by SEM continuously and hence a fast and clean voltage sense circuit is required to interface
the ADC of MCU with these voltages while maintaining electrical isolation. Isolation amplifier
AMC3311 was used for sensing these voltages. The input range of the isolation amplifier is
0-2V. For this a resistor divider is employed which down scales the input voltage by a factor of
0.0196 for measuring voltages up to 102V.

The sub-circuit design is according to the recommendations of the data sheet of AMC3311.
The output signals are differential required a difference amplifier to get a single ended output.
OPA388 is chosen as it is a single supply(works with 3.3V) rail to rail op-amp and hence
suitable for interfacing directly with MCU.

3.3.4.3 Current Sensor

WCS1500 is a hall effect based bi-directional current sensor. When supplied with 5V supply
voltage, it can measure up to 200 Amperes at a sensitivity of the sensor is 11mV/A. Since the
ADC of MCU cannot read 5V, the output of the current sensor is buffered and attenuated. The
required attenuation factor is given by
Vadc 3.3
α= = = 0.66
Vout 5

This attenuation can be achieved by resistor divider with resistor ratio 3:2. In the design, 2.2k
and 3.3k resistors were used. The advantage of such analog front end is that current sensors of
same family offering different sensitivity and range making it possible to swap out sensors and
updating the MCU firmware without having to change any component in hardware.

3.3.4.4 Temperature Sensor

The GB/T gun contains two temperature sensors (PT1000) which are positive temperature coef-
ficient resistors. The nominal resistance of these resistors is 1kΩ and have first order coefficient
of 3.9×10−3 /◦ C. A voltage divider with fixed value 1k resistor is used to convert resistance of
PT1000 into a voltage. The voltage is then passed through a difference amplifier. For Indian
scenario, a lower limit on temperature range of 0◦ C is sufficient. Thus about 2V offset intro-
duced by the voltage divider can be subtracted without loss of working range. To achieve this,
a difference amplifier is used. The result is also amplified by a factor of 3.3 so that the ADC
53 3.3. Hardware design

range of 0V to 3.3V represents a temperature range of -85◦ C to 128◦ C. Industrial semiconduc-


tor components are normally rated for temperature range of -40◦ C to 125◦ C. The difference
amplifier has high value resistances to minimize loading the circuit as the offset and tempera-
ture sense resistor divider have finite impedance.

3.3.4.5 Input Output relations

All physical and electrical inputs that are analog in nature pass through the ADC of the MCU
for digitisation and further processing. Consequently every quantity in real world has a resolu-
tion in the digital domain-a bit equivalent quanta of the quantity that was sampled by the ADC.
The ADC is a 12-bit SAR ADC. Using the gain and offset information for down converting
all the physical/electrical parameters into voltage signals in the ADC range, it is possible to
compute the resolution of that quantity along with the maximum and minimum values that can
be measured from above circuits. These parameters and their digital resolution are summa-
rized in Table 3.2. It must be noted that these sensitivity values are linearised over the entire
range however some sensors like the temperature sensor have some non-linearity associated
with them which become significant at the minimum and maximum values. The measurement
algorithm and conversion takes care of the same in software. Also, the analysis is ideal in terms
for calculations as noise analysis of the signal chain can reduce the effective number of bits for
each of these parameters thus impacting the over-all sensitivity of the parameter.

S No. Parameter Name Minimum Value Maximum Value Unit Resolution


1 CC1 node voltage 2.7 12.7 V 2.44 mV/bit
2 Battery voltage 0 102 V 24.91 mV/bit
3 Charging current 0 200 A 48.84 mA/bit
4 Temperature Sensor -85 128 C 0.05 C/bit

Table 3.2: Theoretical resolution of physical/electrical parameters measured by SEM

3.3.5 Interface circuits for digital communication

SEM uses two CAN buses to communicate with the vehicle and the power converter used for
charging the traction battery of the vehicle and UART interface for communication with HMI.
It needs compatible transceivers for both the interfaces. There is WiFi and Ethernet support
because of the on-board ESP32 TTGO module but since long wires are not needed and inter-
connects are fairly small, a basic SPI communication is sufficient without the need of any
3.3. Hardware design 54

transceiver. The CAN and UART modules in the MCU however need these transceivers along
with protection and filter circuits for EMI compliance.

The HMI connection between SEM and HMI module uses full-duplex RS-485 communication
as it is robust to common mode noise and simple to interface. TVS diodes are used on the bus
lines to prevent damage due to electro-static discharges (ESD). Differential termination and
load capacitor is also placed optionally to limit the slew rate. These hooks can be exercised
for lowering radiated emissions during data transfer. Since the transceiver was only compliant
with 5V supply, a level shifter was used to convert 5V logic levels from transceiver to 3.3V
logic level for MCU and vice versa.

The CAN interface needs to be isolated from the main MCU core and hence ISO1042V iso-
lated CAN transceivers were used. Unlike the HMI, these provided dedicated VIO pin which
eliminated the need for a level shifter. Since CAN interface uses differential signalling without
the need of common ground, common mode noise and surges need to be suppressed effectively.
Common mode choke filters are thus used along with TVS diodes to protect the transceivers
from surges and ESD events. The interface circuits realised using above design consideration
are show-cased in Figure 3.7.
1 2 3 4 5 6

GND1 GND2
GND1 GND2

C27 C51
2

100p 100p
A D4 CANH_A D7 CANH_PC A
IC2 IC12
VCAN1

VCAN2

SMBJ30CA SMBJ30CA
+3V3 ISO1042QDWVRQ1 +3V3 ISO1042QDWVRQ1
R31 R3
FL2 FL1
1 8 60 1 8 60
VCC1 VCC2 VCC1 VCC2
1

GND2
2 7 1 4 2 7 1 4
GND1

CAN1TX TXD CANH 1 4 0.1u CAN2TX TXD CANH 1 4 0.1u


3 6 2 3 3 6 2 3
CAN1RX RXD CANL 2 3 C22 CAN2RX RXD CANL 2 3 C53
4 5 4 5
GND1 GND2 GND1 GND2
1

R32 R4
ACT45C-110-2P-TL000 ACT45C-110-2P-TL000
60 60
GNDD VCAN1 GND1 GNDD VCAN2 GND2
D5 D10
SMBJ30CA CANL_A SMBJ30CA CANL_PC
C68

C69
0.1u

0.1u

+3V3 +3V3
C26 C52
C72

C70
0.1u

0.1u
2

100p 100p
GNDD GNDD
GND1 GND2

GND1 GND1 GND2 GND2

CAN interface for communication with EV CAN interface for communication with Power Converter
B B

CAN bus for vehicle and power


A

JP29
SolderJumper_2_Open
1 2 5V_DIG converter are isolated from
IC7 TXU0202QDCURQ1 JP28
SolderJumper_2_Open
IC6 SN65LBC179QDR R50
120
C62
50p
D12 824022 MCU DC supply. HMI uses the
1 8 1 2 1 8 1 3
B

GNDD
2
B2
GND
B1Y
VCCB
7 2
VCC
R
A
B
7 2
I/O_1
I/O_2
GND
same supply (5V DC) as MCU.
3 6 5V_DIG 3 6
+3V3 VCCA OE D Z D13 824022 GNDD
4 5 4 5
HMI_RX A2Y A1 HMI_TX GND Y 1 3
Z

I/O_1 GND
2
I/O_2
+3V3 5V_DIG 5V_DIG
GNDD GNDD
Y
C73

C74

C71
0.1u

0.1u

0.1u

GNDD GNDD GNDD


RS-485 interface for communication with HMI

C C

Figure 3.7: Digital communication interface circuits

Indian Institute of Science, Bangalore


Sheet: /Interface/
D File: Interface.kicad_sch D

Title: Smart Electronic Module


Size: A4 Date: 2023-12-28 Rev: 1.0
KiCad E.D.A. 8.0.2 Id: 5/8
1 2 3 4 5 6
55 3.4. Software design

3.4 Software design

SEM requires implementation of BEVDC-001 protocol for communication with EV and OCPP
1.6 or greater for communication with CMS. While this arrangement looks sufficient, it is still
incomplete without a client application that can be used to start/stop charging. Thus software
has 4 major components to facilitate DC fast charging an EV-

• BEVDC001 compliant embedded firmware running on TMS570LS0432 micro-controller.

• OCPP 1.6 client running on ESP32.

• OCPP 1.6 server script (python implementation in this case) running on any server ma-
chine.

• Charging app client running on any Android smart phone.

3.4.1 BEV DC001 firmware

This firmware is responsible for ensuring that entire process of charging is compliant to BEVDC001
standard. It defines the states of EVSE and EV, secures and monitors state of charging gun when
placed in socket, negotiates charging voltage and current levels with the EV control unit and
also calculates the energy consumed in the charging transaction. Since the MCU used comes
with floating point hardware support, all real life variables can be manipulated and stored di-
rectly as float numbers without any impact on execution time. The firmware accepts and ex-
poses input and output signals which can be digital, analog or communication signals from
external world. These signals are discussed below:

• Digital signals: These are binary signals that are read by IO pins as ’0’ or ’1’. Lock sense,
Lock PWR, Emergency Off, and relay control signals fall in this category. The firmware
routinely samples these signals if they are input and updates the output whenever the
state machine of the algorithm instructs it to. Safety critical signals like emergency off
(EMO) and insulation monitoring device (IMD) signals use interrupt so that all tasks are
dropped in-case a failure is detected or EMO button is actuated.

• Analog signals: All analog inputs are sampled at 500Hz by the built in 12-bit ADC of the
MCU. The conversion is triggered by a timer to ensure periodic sampling. This allows
fail-safe routines to be triggered within 2ms after a fault condition has occurred. It also
3.4. Software design 56

reduces the integration error for energy calculation compared to slow sampling digital
energy meters.

• Communication signals: The two CAN modules on TMS570LS0432 are used for com-
municating with EV control unit on the EV and power converter in the EVSE. Since
these communication packets are low frequency transactions (100Hz is the fastest CAN
message re-transmission rate), these are serviced in the main-loop of the firmware. The
HMI utilises UART peripheral at a fairly low baud-rate and real-time responses is not a
constraint for HMI, hence the read-writes are blocking in nature and are done as a part
of the main loop. SPI communication with ESP32 however needs to be real-time so that
OCPP client and server share the same information about the charging state. SPI works
at high clock rates and the buffer needs to be filled all the time to avoid data miss. For
this reason, SPI transactions use interrupts to exchange information between ESP32 and
MCU running the BEVDC001 firmware.

The firmware executes the state machine shown in Figure 3.8 to facilitate BEV DC001 compli-
ant charging process.

System
Gun placed Reset
Gun fully out back in EVSE
of EV socket Server sends Unlock
message
State 21 State 0
Interlock
disengaged
State 20
State 1
Open K3-K4
Interlock Gun partly Pre-charge
disengaged out of EV complete State 2 Charging gun
socket
Battery relay removed
State 18 State 19 closed
Open State 10 State 9
K3-K4 reduce charging
Charging State 3
current to 0 parameters State 8
configured Isolation Test
State 17 Passed Charging gun partly
State 11
State 15 State 14 plugged in EV
K1-K2 close
Open K1-K2 begin CC State 7 State 4
Terminate
K5-K6 charging charging
command EV-EVSE State 5 Gun completely
Handshake
Close EV
State 16 State 13 State 12 plugged in EV
Complete
communication State 6
switch to Interlock Engaged
CV charging K3-K4 closed

Figure 3.8: BEV DC001 state transition diagram


57 3.4. Software design

3.4.2 OCPP 1.6 client firmware

The OCPP 1.6 client firmware is realised by using MicroOCPP library for ESP32 device which
in-turn uses web socket for sending and receiving messages from the OCPP server. Since
the library is functions are complete implementation of OCPP, they are not discussed in this
document. The interaction of OCPP client with BEV-DC001 firmware over SPI however is
discussed here. The ESP32 uses a 10 byte long buffer to read and write data to TMS570LS0432
over SPI. ESP32 acts as the leader and TMS570 as the follower for all SPI transactions. The
data variables are read in a round-robin fashion. First byte of the transaction is either a read
command (0x0F) or a write command (0xF0). Second byte identifies the variable to read/write.
Lastly data of length 8 bytes is transferred to allow data types upto 8 byte be transferred in
single SPI transaction. Data format of the SPI transaction and the IDs of all available variables
is shown in Figure 3.9. The OCPP client executes the state machine whose state transition table
is shown in Table 3.3 for communicating with OCPP server and BEV-DC001 firmware.

Byte 0 Byte 1 Data Byte 0


... Data Byte 7

Command Byte ID byte 8 bytes of User Data

0x0F - Read Command 0x01 EVSE Status 1 bit Boolean


0xF0 - Write Command 0x02 EV Status 1 bit Boolean
0x03 Plug Status 1 bit Boolean
0x04 Power 4 byte float Watt (W)
0x05 Output Voltage 4 byte float Volts (V)
0x06 Output Current 4 byte float Ampere (A)
0x07 Energy units 4 byte integer Watt-hour (Wh)
0x08 State of Charge 4 byte float (%)
0x09 Time 4 byte integer Seconds (S)
0x0A Date 4 byte integer
0x0B Month 4 byte integer
0x0C Year 4 byte integer
0x0D Notification 1 byte character
0x0E Unplug trigger 1 bit trigger

Figure 3.9: SPI Transaction format and variable IDs


3.4. Software design 58

A P C S1 S2 F R U F
Available (A) ✓ ✓ ✓ ✓ ✓ ✓ ✓
Preparing (P) ✓ ✓ ✓ ✓ ✓
Charging (C) ✓ ✓ ✓ ✓ ✓ ✓
SuspendedEV (S1) ✓ ✓ ✓ ✓ ✓ ✓
SuspendedEVSE (S2) ✓ ✓ ✓ ✓ ✓ ✓
Finishing (F) ✓ ✓ ✓ ✓
Reserved (R) ✓ ✓ ✓ ✓
Unavailable (U) ✓ ✓ ✓ ✓ ✓ ✓
Faulted (F) ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓

Table 3.3: State transition table of OCPP client

3.4.3 OCPP 1.6 server firmware

The OCPP1.6 server firmware is responsible for connecting the end user to the EVSE. A num-
ber of service providers provide platforms for connecting OCPP compliant chargers to their
servers and use their services to manage and monitor EVSEs. The implementation discussed
here however uses OCPP library in python to run OCPP 1.6 server over web socket. It provides
complete control and debug access to the messages and transactions between EVSE, OCPP
server and user app. The messages and state transition summary are well documented and
openly shared by Open Charge Alliance.
59 3.4. Software design

3.4.4 User App

(a) Scan QR code (b) App landing screen (c) App connected to server

(d) Enter Charge time (e) Charging Initited (f) Charging complete

Figure 3.10: User app for DC Fast charging demo


3.5. Industrial design 60

The user app is an essential touch point that allows end user to use their smart phones for
starting and ending a charging transaction. The present application is a basic implementation
that demonstrated communication with back end server and charging control. The over-all
charging process from a user point of view who is using the app is shown in Figure 3.10.

3.5 Industrial design

The SEM PCB is packaged in a custom designed enclosure which is fabricated by 3D printing
polyactic acid (PLA) material. The design was done in bottom up manner where 3D model of
the SEM PCB with all the components was exported to FreeCAD (open source CAD software)
and the enclosure was designed around it. The enclosure consists of two halves - top and
bottom. Top half is responsible for securing the heat sink on the DC DC power converter where
as bottom half is responsible for securing the PCB and Ethernet module firmly. SEM main
PCB is secured between the top and bottom shells to ensure any physical impact on the module
is completely borne by the enclosure and not the electronics. The design of these individual
halves and their assembly are discussed in following sub-sections:

3.5.1 Top half design

SEM module uses Ethernet and WiFi modules for internet connectivity which are not part of
the main PCB. This modular design increases the overall size in terms of the height of the
enclosure. The top half accommodates the ESP32 module and also provides support to heat
sink that is mounted on DC DC converter for heat dissipation. The side walls on the top shell
has cut outs for all the input output ports. The tolerance of these cut-outs are minimum so that
rubber sealant can be used for creating dust and water resistant seals when the top and bottom
halves mate.

M4 holes are provided on top shell that match the PCB hole cutouts for securing the PCB and
bottom shell with common set of stand-off connectors. The top shell also features a DESE logo
inset in which 3D printed DESE with orange PLA can be inserted as shown in Figure 3.11. As
SEM is not a visible directly to the customer, the enclosure design is kept simple and robust
without using additional paints/vinyls or design detailing to keep the product cost competitive.
Minimum standard size nut and bolts are used to facilitate easy access to internals of the module
for debug/repair with general tools.
61 3.5. Industrial design

Figure 3.11: Perspective view of top shell of SEM

3.5.2 Bottom half design

Bottom half is responsible for securing the Ethernet module connected to the SEM PCB with
M2 screw and nuts. Using washers is recommended for securing the Ethernet module with
the bottom shell. A window is provided for the Ethernet port to be accessible outside. It also
provides insets for M4 screws that secure the PCB in place. Stand-offs are also easy to connect
through these holes.
3.5. Industrial design 62

Figure 3.12: Perspective view of bottom shell of SEM

3.5.3 Heat sink design

The heat sink is fabricated by CNC milling a solid aluminium block. The design is constrained
by the dimensions of the PCB and enclosure. Figure 3.13 is a 3D rendering of the designed
heat sink. The heat sink is secured between the top shell and the DC-DC converter. Thermal
silica gel sheet is used to make thermal contact between the DC-DC converter package and the
heat-sink. Special indents are provided at the periphery of the heat sink window in the top shell
to secure the heat sink firmly without any room for movement.
63 3.5. Industrial design

Figure 3.13: Perspective view of heat sink

3.5.4 Assembly

SEM consists of six parts namely bottom shell, Ethernet module, Main PCB, ESP32 module,
heat sink and top shell which need to be assembled in bottom up approach. The exploded view
of the entire assembly is shown in Figure 3.14 and completely assembled SEM is shown in
Figure 3.15. A total of four M4 nuts and four M3 nuts with matching bolts are required to
assemble the module mechanically. For dust and water proofing, suitable bonding compounds
like B-7000 adhesive glue is used at the seems of top and bottom shell during the process
of assembly. Once dry, the adhesive creates water and dust resistant seal and protects the
electronic components from environment.
3.5. Industrial design 64

Figure 3.14: Exploded view of SEM assembly

Figure 3.15: Completely assembled smart electronic module


Chapter 4

Engineering

Assembling smart electronic module is a multi-step process. The electronic assembly and
packaging is followed by mechanical assembly. The module is then utilised in EVSE along
with complementary modules to facilitate DC fast charging. Following sub-sections discuss
the details of fabrication and engineering details of hardware and software modules present in
SEM.

4.1 Product structure

Upon opening the SEM module, the PCB is accessible to the user/technician as shown in Fig-
ure 4.2. Since there are sub-modules namely ESP32 board and Ethernet board, these can be
removed and tested separately if required. The main PCB of SEM is shown in figure 4.1.
The assembly of PCB involves soldering surface mount devices (SMD) and through hole tech-
nology (THT) components in the same order. Jumpers J8, J10, J12, J16 and J14 can be left
unconnected in first power up. All the supply rail voltage levels can be measured before sup-
plying the same to all the circuits. Any manufacturing defects in PCB or solder bridges in
power supply circuit can be detected early and corrective actions can be taken.

65
4.1. Product structure 66

Figure 4.1: Top view of SEM PCB with sub-modules attached

Figure 4.2: Top view of SEM PCB without sub-modules


67 4.1. Product structure

The MCU runs BEV-DC001 firmware where as the ESP32 runs OCPP 1.6 client firmware. The
two processors thus run different firmware independently and only communicate over SPI for
sharing data and providing stimuli. TMS570LS0432 also communicates with power converter
over can and the HMI over RS-485 which is running its the user interface (UI) firmware. The
interplay of these firmware with each other and the external world is concisely depicted in
Figure 4.3.

User app Websocket


on smart-
OCPP 1.6
phone Server CMS

Websocket

BEV-DC001 SPI OCPP 1.6 Client


CAN bus
Firmware Firmware
BEV-DC001 Processor: Processor:
compliant BMS TMS570LS0432 ESP32

SEM Module

HMI display
EV CAN bus
RS-485 running UI
application

Power converter

DC fast Charging EVSE

Figure 4.3: Interplay of embedded firmware in SEM based fast charging solution
4.2. Hardware modules 68

4.2 Hardware modules

Following sub-sections provides necessary drawing files and hardware details of each hardware
component of SEM.

4.2.1 Main PCB dimensions and interconnects

Figure 4.4 shows the dimensions as well as mounting details of the main PCB of SEM. The
different connectors available on the main PCB are summarised in Table 4.1.

Table 4.1: Summary of connectors present on SEM PCB

S No. Designator Description Functionality


Used for programming TMS570
1 J1 14 pin JTAG connector target device using external JTAG
programmer
Supplying DC 24V power supply to
2 J2 Barrel jack connector
Smart Electronic Module
Pin-1 Vcc (+5V)
Current sensor
3 J3 Pin-2 GND
phoenix connector
Pin-3 Sensor out
Pin-1 DC+ Terminal from DC charging gun
4 J4 Battery voltage sense
Pin-2 DC- Terminal from DC charging gun
Power Converter Pin-1 DC+ Terminal from power converter
5 J5
voltage sense Pin-2 DC- Terminal from power converter
DC supply phoenix Pin-1 +24V
6 J6
connector Pin-2 GND of input supply
Pin-1 CANL from GB/T gun
Vehicle CAN bus
7 J7 Pin-2 Shield from GB/T gun
phoenix connector
Pin-3 CANH from GB/T gun
Short to connect 3.3V LDO to 3.3V power
8 J8 Two pin short for 3.3V
plane
K1-K2 relay control Pin-1 Open collector output for K1-K2 relay
9 J9
phoenix connector Pin-2 Open emitter output for K1-K2 relay
69 4.2. Hardware modules

Short to connect 1.2V LDO to 1.2V power


10 J10 Two pin short for 1.2V
plane
K3-K4 relay control Pin-1 Open collector output for K3-K4 relay
11 J11
phoenix connector Pin-2 Open emitter output for K3-K4 relay
Two pin short for Short to connect DC-DC converter output to
12 J12
Vehicle CAN supply Vehicle CAN supply power plane
Insulation Monitoring Device Pin-1 IMD output signal
13 J13
phoenix connector Pin-2 IMD ground
Two pin short for Short to connect DC-DC converter output to
14 J14
Power converter CAN supply power converter CAN supply power plane
Pin-1 DC- temperature sensor output
GB/T gun temperature
15 J15 Pin-2 Common ground for sensors
sensor phoenix connector
Pin-3 DC- temperature sensor output
Two pin short for Short to connect DC-DC converter output to
16 J16
5V supply +5V digital supply power plane
Lock signal switch Pin-1 Interlock switch pole
17 J17
phoenix connector Pin-2 Interlock switch throw
Two pin short for Short to power down the DC DC converter
18 J18
5V supply disable responsible for generating main 5V supply
Lock signal switch Pin-1 Open collector output for lock signal
19 J19
phoenix connector Pin-2 Open emitter output for lock signal
Two pin short for Short to connect DC-DC converter output to
20 J20
Power converter CC1 supply +12V supply power plane of CC1 circuit
CC1 signal phoenix Pin-1 CC1 signal from GB/T gun
21 J21
connector Pin-2 Protective earth connection
Pin-1 +5V supply pin to power HMI
HMI interface Pin-2-3 Y and Z RS-485 output pins
22 J22
phoenix connector Pin-4-5 B and A RS-485 input pins
Pin-6 Ground of HMI module
EMO signal Pin-1 Emergency Off pole terminal
23 J24
phoenix connector Pin-2 Emergency Off throw terminal
K7 relay control Pin-1 Open collector output for K7 relay
24 J25
phoenix connector Pin-2 Open emitter output for K7 relay
4.2. Hardware modules 70

Pin-1 CANL from power converter


Power Converter CAN bus
25 J28 Pin-2 Shield from power converter
phoenix connector
Pin-3 CANH from power converter
Protective Earth Pin-1 Protective earth connection
26 J29
phoenix connector Pin-2 Protective earth connection

Figure 4.4: Main PCB dimensions and interconnect positions

4.2.2 Main PCB routing and layout

The PCB for SEM is a four layer solution. The copper area and routing of signals from top
to bottom are shown in Figure 4.5 through Figure 4.8. The design rule for routing power and
signal traces are summarised in Table 4.2.
1 2 3 4 5 6 7 8

71 4.2. Hardware modules

1 2 3 4 5 6 7 8

E
A Figure 4.5: Top layer copper layer of SEM PCB

Department of Electronic Systems Engineering, IISc


Sheet:
File: SmartElectronicModule_2.kicad_pcb
Title: Smart Electronic Module for DC fast charging
Size: A3 Date: 2024-03-16 R
KiCad E.D.A. kicad 7.0.5-7.0.5~ubuntu22.04.1 Id
F
B 1 2 3 4 5 6 7 8

E
Figure 4.6: Copper layer beneath the top copper layer of SEM PCB

Department of Electronic Systems Engineering, IISc


Sheet:
File: SmartElectronicModule_2.kicad_pcb
Title: Smart Electronic Module for DC fast charging
Size: A3 Date: 2024-03-16 R
KiCad E.D.A. kicad 7.0.5-7.0.5~ubuntu22.04.1 Id
F
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8

A A

4.2. Hardware modules 72

B B

C C

D D

1 2 3 4 5 6 7 8

E
A Figure 4.7: Copper layer above the bottom copper layer of SEM PCB E
A

Department of Electronic Systems Engineering, IISc


Sheet:
File: SmartElectronicModule_2.kicad_pcb
Title: Smart Electronic Module for DC fast charging
Size: A3 Date: 2024-03-16 Rev: 1.0
KiCad E.D.A. kicad 7.0.5-7.0.5~ubuntu22.04.1 Id: 1/1
F F
B 1 2 3 4 5 6 7 8 B

C C

D D

E
Figure 4.8: Bottom layer copper layer of SEM PCB E

Department of Electronic Systems Engineering, IISc


Sheet:
File: SmartElectronicModule_2.kicad_pcb
Title: Smart Electronic Module for DC fast charging
Size: A3 Date: 2024-03-16 Rev: 1.0
KiCad E.D.A. kicad 7.0.5-7.0.5~ubuntu22.04.1 Id: 1/1
F F
1 2 3 4 5 6 7 8
73 4.2. Hardware modules

S No. Trace Type Description Routing parameters


+24V power Deliver +24V to various Minimum width - 80 mils
1
traces DC-DC converters in SEM Minimum clearance - 40 mils
Minimum clearance between
All power planes (+5V, +3.3V,
2 Power planes copper planes - 20 mils
+1.2V, isolated 5V and 12V)
Signal clearance - 10 mils
Minimum clearance between
All analog and digital
3 Signal traces copper planes - 20 mils
signal traces
Signal clearance - 10 mils
Battery and power
HV sense Minimum clearance between
4 converter voltage sense
power planes copper planes - 220 mils
power planes
Minimum width - 15 mils
Opto-coupler Isolated input output signals
5 Minimum clearance - 40 mils
signals routed from/to opto-couplers
Minimum creepage - 150 mils

Table 4.2: Routing parameters for signals, power rails and copper pours

4.2.3 Bill of Materials (BoM)

Table 4.3: BoM and cost of components for 3 SEM units

Price
S No. Value Cmp name Quantity Price
per unit
1 120 R 10 1.41 14.1
2 12k R 10 1.49 14.9
3 100 R 10 1.58 15.8
4 150k R 15 1.41 21.15
5 47k R 10 2.74 27.4
6 330k R 20 1.49 29.8
7 50p C 10 3.49 34.9
8 100p C 15 2.41 36.15
9 0 R 15 2.74 41.1
10 50 R 15 2.74 41.1
11 5Vz D Zener 3 17.43 52.29
4.2. Hardware modules 74

12 1k R 50 1.08 54
13 Conn 01x15 Pin Conn 01x15 Pin 6 9.3 55.8
14 3V3 D Zener 3 20.75 62.25
15 3.3k R 15 4.4 66
16 D D 3 22.58 67.74
17 SW MEC 5E SW MEC 5E 6 12.2 73.2
18 2V7z D Zener 3 25.73 77.19
19 FerriteBead FerriteBead 15 5.23 78.45
20 60 R 15 5.81 87.15
21 10k R 60 1.66 99.6
22 22pF C 10 10.38 103.8
23 1n C 30 3.49 104.7
24 2.2k R 35 3.57 124.95
25 SS34 D 3 43.99 131.97
26 100k R 60 2.74 164.4
27 Barrel Jack Barrel Jack 3 62.25 186.75
28 1uF C 25 7.89 197.25
29 LM2902 LM2902 5 39.84 199.2
30 TPS78533Q1 LDO 3.3V 3 91 273
31 1u C 15 18.34 275.1
32 Conn 02x07 14 pin header 3 103.75 311.25
33 4.7u C 25 12.78 319.5
34 824022 824022 6 56.44 338.64
35 TLV70012Q1 LDO 1.2V 5 68.89 344.45
36 Crystal GND24 Crystal GND24 5 72.21 361.05
37 10u C 20 20.09 401.8
38 TXU0202Q1 Level shifter 5 82.17 410.85
39 100n C 100 4.23 423
40 Conn 01x02 1x2 Connector 40 12.62 504.8
41 B2412S-1WR3 B2412S-1WR3 3 214.14 642.42
42 EL817 EL817 30 24.57 737.1
43 ISO1042Q1 Isolated CAN 3 329.51 988.53
44 SN65LBC179 SN65LBC179QDR 4 255.64 1022.56
75 4.2. Hardware modules

45 B2405S-1WR3 B2405S-1WR3 5 207.5 1037.5


46 TMS5700432Q1 TI MCU 3 756.13 2268.39
47 PDQE10-Q24-S5-D PDQE10-Q24-S5-D 2 1305.59 2611.18
48 OPA388QQ1 OPA388QDBVRQ1 15 211.65 3174.75
49 AMC3311Q1 Isolated Amplifier 4 896.4 3585.6
50 SEM PCBs SEM PCBs 3 410.7.58 12322.74
Grand Total (INR) 34617.3

The components used in fabricating SEM module were sourced from many online services
which are listed below:

• Electronic components : Digikey and Mouser

• Hardware components and pre-made modules : robu.in

• GB/T gun and DC contactors : Sugi electronics LLP

• PCB fabrication : pcbpower.com

• Enclosure fabrication : Neuronics lab and Power Electronics Lab, DESE.

4.2.4 Development tools

Many tools were used at different stages of development and testing of smart electronic module.
These tools, both software and hardware along with their use in development cycle of SEM are
listed below:

• LTSpice : Free to use spice software used for verification of circuits used in SEM (Main-
tained by Linear Technologies).

• KiCAD 8.0 : Free to use Electronic Design Automation (EDA) software used for schematic
entry, layout and fabrication file generation of SEM. It also provided 3D renders and
models of the final PCB with all the components populated.

• EasyEDA : Free to use web based EDA software. It was used for creating quick prototype
PCBs for testing circuits.
4.3. Software modules 76

• FreeCAD : Free to use CAD software used for modelling and enclosure design of SEM.
Also used for heat sink design and render real-life images of SEM.

• Ultimaker Cura : Free to use slicer used for slicing STL files of the enclosure designed
in FreeCAD.

• Fluke 17B+ multi meter : Used for calibration and testing of the SEM sub modules.

4.3 Software modules

For development of embedded firmware and software modules, following tools were utilised:

• Python 3.10 : Powerful and free to use scripting language. It is used for running test
OCPP servers over web socket that SEM can connect to. [8]

• ESP-IDF : An integrated and free to use framework for firmware development on ESP-
32. It provides support for essential libraries like web socket, WPA enterprise login,
Mongoose.

• Code Composer Studio : Free to use IDE by Texas Instruments used for developing and
debugging firmware for TMS570LS0432 target device.

• XDS 100V2 JTAG probe : This JTAG probe allows programming and rudimentary de-
bugging capabilities for TMS570LS0432.

• Halcogen : Free to use GUI based source code generator for Hercules family of micro-
controllers provided by Texas Instruments. [9]

• MIT App inventor 2: A simple and free to use UI based online Android app development
tool. [10]

• OCPP simulator : Free and open source tool for testing OCPP 1.6 and OCPP 2.0 com-
patible backend server systems.

4.3.1 TMS570LS0432 firmware

The firmware on TMS570LS0432 implements BEV DC001 charging schema. It realises the
state machine shown in Figure 3.8. This is achieved by combination of interrupts and polling
77 4.3. Software modules

methods for servicing various input outputs that the MCU receives. The firmware components
and their functionality are discussed below:

• Main Loop : The infinite main-loop keeps checking for change in state parameters and
updates present and next state variables. These variables are structures that store all
information that can trigger a state change. It also initiates and services SPI transactions.
The main loop function is shown in listing 4.3.1.
1 void main(void)
2 {
3

4 init_all_peripherals(); //Initialise all peripherals


5 init_var(); //Initialise all global variables
6 DWIN_init(); //Initialise HMI library
7 unlock_plug(); //Disengage charging gun interlock
8 lock_plug(); //Engage charging plug interlock
9 rtiStartCounter(rtiCOUNTER_BLOCK0); //Enable realtime counter
10 adcStartConversion(adcREG1,adcGROUP1); //Start ADC conversions
11 spiDAT1_t spi3_conf ; // SPI transaction data configuration
12 int ret_val; // return value of state transition
functions
13 // SPE transaction config settings to use for comunnication with
ESP32
14 spi3_conf.CS_HOLD = 0;
15 spi3_conf.WDEL = 0;
16 spi3_conf.DFSEL = SPI_FMT_0;
17 spi3_conf.CSNR = 0;
18

19 _enable_IRQ(); //Enable interrupts


20

21 while(1)
22 {
23

24 if(update_flag == 1) // Check if state variables updated


25 {
26 // Re-calculate all parameter values from ADC conversion
results
27 var.v_batt = voltage_to_parameter(adc_to_voltage(
adc_result[0].value),m_0,c_0);
28 var.i_pc = voltage_to_parameter(adc_to_voltage(
adc_result[1].value),m_1,c_1);
29 T_NEG = 0.05*voltage_to_temperature(adc_to_voltage(
4.3. Software modules 78

adc_result[2].value),1.03)+0.95*T_NEG;
30 var.v_pc = voltage_to_parameter(adc_to_voltage(
adc_result[3].value),m_3,c_3);
31 var.vnode = voltage_to_parameter(adc_to_voltage(
adc_result[4].value),m_4,c_4);
32 T_POS = 0.05*voltage_to_temperature(adc_to_voltage(
adc_result[5].value),1.03)+0.95*T_POS;
33 // Update relevant state variables in case external stimuli
was detected
34 update_state_vars();
35 // if new_state is same as present state, re-compute new state
36 if(new_state == present_state)
37 new_state = update_state(var,present_state);
38 else // execute state transition actions
39 {
40 ret_val = (*func_ptr[present_state])();
41 if(ret_val == 0) //update present state if state
transition actions were successful
42 present_state = new_state;
43 }
44

45 update_flag = 0; //reset update flag


46 }
47 //Check if SPI peripheral is ready for fresh transaction
48 if(SpiRxStatus(spiREG3) == SPI_COMPLETED || SpiRxStatus(
spiREG3) == SPI_READY)
49 {
50 //Process SPI buffer data if previous transaction is error
free
51 if (invalid_spi_flag == 0)
52 processSpiData();
53 else //Previous transaction was invalid, donot process bad
data
54 invalid_spi_flag = 0;
55 // Trigger a fresh SPI transaction
56 spiSendAndGetData(spiREG3, &spi3_conf, spi_buff_size,
spi_tx_buf, spi_rx_buf);
57

58 }
59 }
60 }

Listing 4.1: TMS570LS0432 Main loop code


79 4.3. Software modules

• RTI module and interrupt : RTI module is responsible for producing 2ms ticks and trigger
ADC conversion for sampling all analog signals. It does so by using compare 0 regis-
ter. Upon comparison, ADC start of conversion signal is triggered and compare match
interrupt is also called to update execution time variables.

• ADC interrupt : The ADC interrupt copies ADC conversion result buffer into user vari-
ables and sets an update flag to indicate main loop that fresh set of values are available to
be processed. It also polls the inter-lock switch gpio to get the status of interlock in the
charging gun as shown in listing 4.3.1
1 void adcNotification(adcBASE_t *adc, uint32 group)
2 {
3 adcGetData(adc, group ,adc_result); //Get ADC conversion reult
4 // Read mechanical interlock state
5 var.lock_state = (˜gioGetBit(LOCK_GIO_PORT,LOCK_GIO_PIN))&0x01;
6 // Update flag set to indicate conversion complete to main loop
7 update_flag = 1;
8 }

Listing 4.2: TMS570LS0432 ADC Interrupt service routine (ISR) code

• Helper functions : Helper sub-routines are responsible for simple input output actions
like changing state of interlock, processing SPI buffers, executing actions on state transi-
tion etc. For brevity, these are presented separately as code listings.

4.3.2 ESP32 firmware

ESP32 is responsible for implementing OCPP 1.6 protocol and communicating with OCPP
back end server. It also translates messages received from OCPP server into actions for BEV
DC001 firmware and vice versa. The ESP32 in essence provides a uniform interface for back
end without exposing the implementation details of BEV DC001 firmware. Important parts of
the firmware running on ESP32 are discussed below:

• MicroOCPP instance: MicroOCPP is a library that implements JSON version of OCPP


1.6 in C++ for embedded devices like Arduino and ESP32. It implements all transactions
as dictated by Open Charge Alliance[11]. Input output functions defined by the library
are used to trigger actions and get state of the library state variables by user code. For
brevity, complete main.c code is listed separately.
4.3. Software modules 80

• ESP-IDF: The IDF framework provides high level API functions for interacting with
hardware modules and RTOS running on the ESP32. It also provides networking libraries
for connecting to the internet over WiFi and Ethernet.

• While(1) super loop: The while loop in main task of ESP32 polls for OCPP events once
every 500ms and SPI transactions once every 100ms. There are no interrupts from any
IOs as OCPP firmware execution is not time-critical and real-time interrupt handling is
taken care of by TMS570LS0432. The code listing 4.3.2 shows the while loop of main
task that handles OCPP messages and the SPI transactions.
1 /* Enter infinite loop */
2 int i = 0;
3 while (1) {
4 if(i >= 5) // Execute once in 500ms
5 {
6 mg_mgr_poll(&mgr, 10); //Poll OCPP messages
7 ocpp_loop(); //Loop through OCPP routines
8 i = 0; //Reset counter
9 }
10 i++;
11 // Free up CPU for 100ms for house keeping
12 vTaskDelay(100/ portTICK_PERIOD_MS);
13 // If SPI write command was received
14 if(spi_write_flag == 0)
15 {
16 //Read SPI Data
17 read_write_spi_data(handle,&t);
18 //Write to console for debug
19 log_rx_data();
20 //Increment transaction parameter index
21 spi_index = (spi_index+1)%(unplug_id+1);
22 }
23 else // SPI read command was received
24 {
25 // Transmitthe SPI buffer content
26 write_spi_data(handle,&t);
27 spi_write_flag = 0;
28 }
29 }

Listing 4.3: Main loop running on ESP32


81 4.4. System integration

4.3.3 Testing Procedure

Following steps are to be performed for testing the firmware on ESP32 and TMS570 MCU:

• Upload the Smart Electronic Module firmware to TMS570 using XDS 100V2 JTAG and
Code Composer Studio.

• Run test OCPP server script in python and note the IP and port number of the server from
the command line output.

• Use these variables in the ESP32 main code for connecting to the OCPP server.

• Upload the ESP32 firmware using idf.py tool over USB. WiFi configurations can be
changed by using menuconfig option with idf.py.

• Open debug window by using monitor option with idf.py and the port number of ESP32.
Debug messages confirming connection with WiFi and successful handshake with the
server should appear on debug window as shown in Figure 4.9.

• Handshake messages and heart beat messages will be printed to console of the test server
as well.

Figure 4.9: ESP32 debug output on successful boot of SEM

4.4 System integration

The sub-module interconnection in SEM hardware is depicted in Figure 4.10. It shows the
TTGO board and the Ethernet module inter connection, their orientation and placement with
4.4. System integration 82

respect to the main PCB in perspective view. Assembly of the SEM PCB, enclosure and heat
sink is already discussed in Figure3.14 and 3.15.

Figure 4.10: Hardware integration of SEM PCB with ESP32 and Ethernet module

The proposed scheme of SEM connection with other modules inside an EVSE is shown in
Figure 4.11. System level functionality test of SEM can only be tested once it is connected
to required sub-modules or their behaviour is emulated. The following behaviour is expected
from the EVSE upon successful integration of SEM into the EVSE during a charging cycle:

• EVSE is idle and no transactions are reserved, charging gun is locked in the EVSE.

• User sends a new transaction request to the OCPP server with EVSE ID using the smart-
phone app.

• OCPP server checks availability of EVSE and if available issues an unlock command.

• GB/T charging gun unlocks, HMI prompts the user to plug the charging gun into EV.
83 4.4. System integration

• After complete insertion of gun, mechanical interlock gets activated.

• EVSE and BMS handshake is initiated by EVSE and BMS. After completion of hand-
shake and charging parameter configuration, relevant information about battery is dis-
played on the HMI.

• User can choose the time to charge or energy units for current transaction in the app.

• User can then start transaction from the app and begin the charging process.

• The charging process can be interrupted in the following ways:

– EV : The BMKS of EV can request the EVSE to stop charging.


– EVSE : The EVSE can itself stop charging e.g. input from HMI.
– OCPP server : A remote stop transaction message from OCPP server can stop the
charging process.
– Fault condition : Fault condition like emergency off signal and insulation monitor-
ing device can also stop the charging process.

• The interlock of charging gun disengages from the vehicle and user is prompted to place
the gun back into EV socket on the HMI.

• Gun locks back into the socket and EVSE is returned to idle state.

• Billing details of completed transaction may be displayed to the user.

In case of fault condition, the charging gun is de-energized and interlock is released to prevent
damage to EVSE, EV and most importantly any person involved in the process of charging.
A technician is required to then debug the problem with the generated error code and take
appropriate corrective actions.
4.4. System integration 84

GB/T Gun for


EV connection

GB/T gun cable assembly

Lock Actuate
+24V UPS
circuit

Current
Sensor

DC In PE CC1 CH GND CL Is GND 5V LS1 LS2 LA1 LA2 T+ GND T- VB+ VB-
Lock Lock Temperature
Power CC1 detect Vehicle CAN Current Sense Battery
Sense Actuate Sense
voltage
sense

Ethernet
Smart Electronic Module
Power converter Power converter
Earth HMI IMD K3-K4 K7 K1-K2 EMO
CAN voltage sense
PE PE CH GND CL 5V Y Z B A GND S+ S- A- A+ A- A+ A- A+ S+ S- PC+ PC-

Pre-charge
EMO
switch

(K7)
Relay driver board and
HMI Display
Auxiliary power supply

Aux+ Aux- K1 K2

Monitor Device
Insulation

AC-DC Programmable Power Converter

Figure 4.11: Hardware integration of SEM module into DC fast charging EVSE
Chapter 5

Concluding remarks

5.1 User instructions

Instructions to technician handling the assembly and integration of SEM in EVSE:

• SEM is ESD sensitive electronic component, disassemble in controlled environment with


all parts de-energised.

• SEM enclosure is sealed by silicon sealant on assembly. If enclosure is disassembled,


apply fresh coat of sealant before assembling.

• All phoenix contact terminals should be made with ferrule crimps to avoid unwanted
short circuits.

• Configure WiFi credentials and OCPP server URLs before assembling the SEM into
EVSE.

• In case of boot fails, disconnect all connectors from SEM and power using barrel jack to
check if boot-up is normal.

• Secure the module mechanical in EVSE before wiring to prevent mechanical damage to
ports and enclosure.

• After assembly, use an EV charging emulator compliant with GB/T standard to verify all
functionalities.

• Debug messages can be obtained from ESP32 over USB for troubleshooting purposes.

85
5.2. Corrections 86

5.2 Corrections

The following corrections in the SEM hardware are required and can be part of second revision:

• Replace resistor R60 with 1kΩ resistor.

• Correct the footprint to schematic pin map for DC-DC SIP modules.

• C3 and R22 can be marked DNI.

• Swap MOSI and CLK lines of ESP32 and TMS570 SPI interconnect.

• Change opto-coupler footprint to larger pad version.

• C68 silkscreen violates DRC.

• Correct the spelling of Department on backside of the PCB.

• Replace all zener diodes with voltage reference ICs.

5.3 Suggestions for next gen

SEM although functional in its current state has room for improvement in many aspects which
are listed below:

• Hardware:

– Include insulation monitoring device on-board the SEM main PCB.


– Use multi-buffered SPI instead of conventional SPI for communication between
ESP32 and TMS570LS0432.
– Use dedicated voltage reference ICs for voltage reference generation.
– Design SEM for dual gun fast chargers.
– Support Aether’s fast charging protocol and gun for two and three wheelers.
– Upgrade ESP32 program flash to 32MB for adding functionalities.

• Software:

– Include support for Ethernet, WiFi and 4G in same firmware of ESP32 which can
be selected by user while configuring SEM for EVSE.
87 5.4. Future scope

– Include support for OCPP 2.0.1 in case back end supports the newer OCPP version.
– Include support for on the air (OTA) firmware upgrade for SEM.
– Streamline communication between BEV DC001 firmware and OCPP client firmware.
– Complete state transition handling for fault cases. Add sub-routines for fail-safe
mode in case of faults.
– Assign priorities to interrupts and handle all time critical operations in ISRs.
– Use the lock step capabilities of TMS570LS0432 for error detection, correction and
fail-safe operation.

• Enclosure:

– Use ABS or other hard thermosetting plastic instead of PLA for rigid enclosures.
– Add inner and outer lips on the top and bottom parts for enhanced IP protection.
– Multiple mounting hole options for end user to mount SEM to EVSE chassis.
– Rubber dampers to prevent damage from mechanical vibration and shocks.
– Supports beneath PCB to support pressure applied by heat sink.

5.4 Future scope

SEM in its current form has the potential to create truly indigenous fast charging charging so-
lutions. Having control of firmware and hardware allows development of specialised functions
and capabilities which are relevant to Indian markets. This control is missing as of now from
commercially available charging solutions imported from overseas. There also exists cost ben-
efits of modular and serviceable charging equipment which is enabled by SEM compared to
black box offerings of international OEMs. In tandem with robust power electronic circuits,
SEM can streamline development and adoption of DC fast chargers in India.

Indian EV market is picking up pace and as new technologies are getting adopted or developed
to sustain the charging needs of this emerging market. Aether’s combined charging standard
[12] and socket+gun combo were adopted by ARAI as the new de-facto fast charging standard
for EVs. Adopting SEM to support this new standard is an interesting possibility to explore.
5.4. Future scope 88
Bibliography

[1] Kamlesh Mallick. Bharat EV specifications for AC and


DC charging. https://www.pluginindia.com/blogs/
bharat-ev-specifications-for-ac-and-dc-charging-everything-you-need
December 2017.

[2] ARAI. Electric Vehicle Conductive DC Charging System . https:


//hmr.araiindia.com/Control/AIS/320201825106PMAIS_138_Part_
2_F.pdf, January 2018.

[3] Introduction to CAN. https://www.ti.com/lit/an/sloa101b/sloa101b.


pdf?ts=1717672191314&ref_url=https%253A%252F%252Fwww.
google.com%252F.

[4] IS17017 Part 23. https://standardsbis.bsbedge.com/BIS_


SearchStandard.aspx?Standard_Number=IS+17017&id=0.

[5] International Electrotechnical Commission. electrostatic discharge (ESD). https://


webstore.iec.ch/publication/4189, September 2008.

[6] Sagarika, Vibhore Jain. User Survey - DC Fast Chargers for EVs. Technical report, IISc,
Bangalore, March 2023.

[7] TMS570LS0432 TRM. https://www.ti.com/lit/pdf/spnu517.

[8] OCPP server. https://github.com/mobilityhouse/ocpp.

[9] Halcogen. https://software-dl.ti.com/hercules/hercules_docs/


latest/hercules/index.html.

[10] Websocket MIT App inventor. https://www.vector.com/us/en/know-how/


protocols/gbt-27930/.

89
BIBLIOGRAPHY 90

[11] Open Charge Alliance. Open Charge Point Protocol 1.6. https://
openchargealliance.org/my-oca/ocpp/, September 2017.

[12] Aether Standard. https://www.carandbike.com/news.

You might also like