Amperes Board

Amperes Board

Status

 

Owner

 @Michael Adeluyi

Approver

 @Rav

Due date

 

GitHub

 

BOM

 

Due Dates:

  • Requirements/Considerations -

  • Component Selection -

  • Initial Schematic -

  • Initial Layout -

  • Rev. A Ordered -

  • Firmware/Testing -

Description/Purpose

  • Measures battery current using a low-side shunt resistor placed on HV- line

Requirements

  • Sizing constraint: no room for SOM board, so MCU, CAN, and other peripheral components are placed directly on board

Application Note

Context

Location of the board:

Connection List

#

Name

Type

Part Number

#

Name

Type

Part Number

J1, J2

 Peripheral CAN connectors

 Molex Nanofit: 1x04

 105309-1204

J3

SWD connector

Molex Nanofit: 1x04

1053091104

J4

CAN Breakout

1x02 Pin Header

 

JP1

CAN Termination jumper

1x02 Pin Header

 

J5

USB-C

 

 

Main

Schematics

Circuit Components

Layout

Github link:

PCB:

3D Model

Firmware

Drivers

High-Level (Block Diagram)


 

Old stuff (archive it)?


Overview

This is the design document for the Amperes Board. As one of the four important boards within our system, we need to be able to track the current within the car so that it is safe and manageable. We also want to consider how we can record the current and apply the result to a State of Charge (SoC) algorithm.


 Problem statement


BPS is tasked with securing the safety and monitoring of the battery, such as current monitoring. Overcurrent can damage internal components and pose a risk to the driver.

 Research insights


There are 2 ways to measure current: using a shunt resistor connected to the load or a hall-effect sensor. Each has its pros and cons, but they solve the same problem.

 Solution hypothesis


The solution would be successful if we could track current reliably and transmit that data to the leaderboard.


Old Design

image-20241019-163804.png
Limited by the original chip's use of isoSPI, this design (credited to Tianda Huang) used a current sense amplifier to measure the current on the chip's low side.

 Design options

There are only two ways to measure current. We can measure the voltage across a resistor in series with the load, or we can measure the magnetic field of the wire. Invasive vs non-invasive

 

Option 1 - Voltage Across a Resistor

Option 2 - Magnetic Field of Wire

 

Option 1 - Voltage Across a Resistor

Option 2 - Magnetic Field of Wire

Overview

Current Sense Amplifier or Isolated Modulators/ADC

Hall-Effect Current Sensing

Screenshot

image-20240907-165605.png
image-20240907-183949.png

Pros and cons

Accuracy

Simplicity and cost

Affected by electric noise

Power loss and voltage drop

Electric isolation and no power loss

Measures both AC and DC current

Affected by magnetic noise and temperature

Zero-drift problems


Decision 1

  1. Option 1 - Making the PCB through a shunt resistor

Members can look into the second option for a hall-effect version in the future.


Ideas

Amperes Board Diagrams-Figure 1.drawio.svg

Figure 1 is a standard method to measure current using a shunt-resistor. There are three steps to read the current:

  1. The differential voltage is fed into the Current Sense Amplifier and converted to a single-ended signal.

  2. This single-ended signal is connected to an ADC, digitizing the signal.

  3. The signal is sent to a microcontroller for processing.


High Side vs Low Side

For reading the current, there are two different configurations you can have your device hooked up to.

See Introduction to Current Sense Amplifiers to learn more


Amperes Board Diagrams-Figure 2.drawio.svg

Figure 2 shows an example of the current sense amplifier connected to the shunt resistor in a high-side sensing configuration.

Advantages:

  • Able to detect load short to ground

  • Current is monitored directly from the source

Disadvantages:

  • High voltage can limit the variety of devices


Amperes Board Diagrams-Figure 3.drawio.svg

Figure 3 shows an example of the current sense amplifier connected to the shunt resistor in a low-side sensing configuration.

Advantages:

  • Wide range of available options

  • It does not need an advanced sensor

Disadvantages:

  • Difficult to detect load short to the ground without software


Decision 2

  1. Low side Sensing

We will get the advantages of both and no disadvantages except cost. Plus, built-in fault monitoring.

Fault monitoring:

By comparing the readings from the low-side sensor, you can detect faults such as open circuits, short circuits, or unexpected current paths. Unexpected spikes in the current readings will let us know of a problem in the system.


🖼️ Chips to pick

You can choose different chips to make your life easier. The current sense amplifier is great, but you could also use an isolated modulator (an integrated ADC) to track the voltage differential.


📢 Amplifier types

There are many ways to measure the voltage across a resistor, as different components can perform different functions during assembly and testing. Below is a list of variations on calculating the same thing.


image-20241102-154139.png
Figure 4: Operational Amplifier

The Operational Amplifier (Op Amp) is the most straightforward building block of all the technologies listed below, as shown in Figure 4. An op amp amplifies the voltage difference between two input pins and outputs that voltage difference. You can mimic several behaviors based on the resistor and wire combination connections you add to the inputs and outputs. Unfortunately, it is challenging to configure these devices to handle a differential voltage accurately, as any selected resistors are super specific (5.121235 Ohms) and super expensive.


image-20241102-153202.png
Figure 5: Current Sense Amplifier

Current Sense Amplifiers are the next option for current sensing, like the example shown in Figure 5. These op amps have built-in specific resistor values that have been fine-tuned to handle these differential voltages at an affordable price.

Configurations include:

  • High Side - Specialized to handle high-voltage differentials

  • Low Side - Specialized to handle low-voltage differentials

  • Bidirectional current - Specialized to measure in both directions


image-20241019-205932.png
Figure 6: Isolated Amplifier

Isolated amplifiers have properties similar to current sense amplifiers, except for the benefit of physically separating the high and low-voltage sides, preventing issues like ground loops, shown in Figure 6. The component is more resistant to input and ground noise, which is helpful in noisy environments. They are also not limited to the high-low side configurations of current sense amplifiers, as they measure the voltage at any level, eliminating common-mode voltage limitations. It comes at the cost of accuracy due to the isolation barrier, similar to a hall effect sensor. This component is necessary as we work with a 120V battery while the PCBs use 3.3V-5V.


image-20241102-161024.png
Figure 7: Isolated ADC

Isolated ADCs are the “All-in-one PCs, “similar to the isolated amplifier, as shown in Figure 7. Using this chip is almost too easy.

Advantages:

  • Often includes integrated isolation barrier

  • Digital output already compatible with MCUs

Disadvantages:

  • Many are Sigma-Delta, which have inherent latency

  • It can be 5-10x the cost of other solutions ($5-$10 for a single chip)


Decision 3

  1. Battery → Shunt → Isolated Amplifier → ADC → MCU

We want to minimize the latency of the components, and (personal choice) I don’t like all-in-one computers.


📃 Choice of Isolated Amplifier and Shunt Resistor

Current Shunt Resistor: WSBS8518L2500JKM4

Key Parameters

  • Resistance: 250 μΩ

  • Power Rating: 36 W

  • Tolerance: 5%

  • Temperature Coefficient: 110 ppm/°C

I have decided to use the AMC1306M25. Here are the specifications and reasons why.

Input Specifications:

  • Input voltage range: ±250mV (matches the 500μΩ shunt)

  • Programmable Gain: 8 (default)

  • Input common-mode range: -0.1V to +0.1V

Performance:

  • Sample rate: 21 MSPS

  • SNR: 82dB

  • SFDR: 83dB

  • Resolution: 16-bit

Isolation:

  • Reinforced isolation: 5000 Vrms

  • Working voltage: 1500 Vrms

  • CMTI: 50 kV/μs (common mode transient immunity)

  • Creepage/Clearance: 8.5mm

Interface/Power:

  • Serial CMOS interface

  • Supply voltage: 3.3V

  • Power consumption: 42.4mW typical

  • Temperature range: -40°C to 125°C

Physical:

  • Package: SOIC-8

  • Single channel

Cost: $1.80 (standard version)

These specs are particularly relevant because:

  1. The input range matches the shunt resistor

  2. Isolation specs exceed the 120V battery requirements

  3. Sample rate and resolution are good for current monitoring

  4. Power and interface compatible with standard MCUs


Decision 4

  1. Battery → Shunt → Isolated Amplifier → ADC → MCU

The ADC of choice is the INA229. It is a good 85-V, 20-bit SPI output ADC, the only 20-bit ADC that uses SPI. The INA229AIDGSR is cheaper than the INA229AIDGST.


DC/DC Converter Safety

We put a capacitor between the two grounds to filter out noise from the GND High node. All of our filters assume that the GNDPwr node is stable. Attaching a capacitor between GND High and GNDPwr will bypass all high-frequency noise from the Vout on the DC/DC converter. YAY!!!


 Follow up

#

Decision

Status

Next steps

#

Decision

Status

Next steps

1

Decision 1 - Shunt Resistor

Completed

Decide the location of the shunt resistor

2

Decision 2 - Low-Sided Current Sensor

Completed

What chips will you pick to sense?

3

Decision 3 - Isolated Amplifer

Completed

What is the exact chip?

4

Decision 4 - ADC Chip Choice

COMPLETED

What choice of an ADC?

5

 

Up next

 

6

 

Up next

 

 

Vocab

Current Sense Amplifier: Amplifies the small voltage drop across a shunt resistor to measure current accurately in circuits.

Isolated Modulator: Converts analog signals to digital while maintaining electrical isolation, often used in high-voltage or noisy environments.

Hall-Effect Sensor: Detects magnetic fields to measure position, speed, or current without direct electrical contact.

Zero-drift: the phenomenon where a sensor's output signal shifts away from its baseline (or zero) value when there is no actual current flowing through the sensor; affects Hall-Effect Sensor

 Resource files

How to Sense Current

Hall-Effect White Paper

Shunt vs Hall-Effect

Isolated Amplifiers vs Isolated Modulators

Introduction to Current Sense Amplifiers