Skip to content

Repository for the PSoC 6 MCU-based Battery Management System (BMS) of Infineon Mobile Robot (IMR)

License

Notifications You must be signed in to change notification settings

Infineon/IMR_PSoC6_BMS

Repository files navigation

IMR Software for PSoC6 BatteryManagement

Infineon logo


Overview

This is the official Infineon GitHub repository for Modus Toolbox software used with the demo boards for BMS control.

Features

  • 12 cell series battery management system
  • Low-power ePaper display for long-term data display at power off
  • Dual core CPU (Cortex®-M4/M0+)
  • Extensible, non-blocking software layout
  • 30 V – 50.4 V voltage range
  • Support for 1MBit/s CAN and 5MBit/s CAN FD
  • SoC and SoH estimation
  • Balancing algorithm
  • Precharge algorithm
  • Hot-plug support
  • Real-time data recording
  • Extensive diagnostic system
  • Current, voltage and temperature threshold errors
  • Open load diagnostics error monitoring
  • Cell overvoltage or undervoltage check
  • Balancing over- and undercurrent errors
  • ADC cross-check error
  • Internal overtemperature detection
  • Register CRC check fault detection
  • Internal peripheral error checks
  • 16-bit measurement of voltages and current
  • Five temperature measurement channels
  • Low-power Flash technology,
  • Programmable digital & analog resources
  • Integrated buzzer

Reference hardware

This software is meant to run on following reference hardware:

The system consists of a power board on which all measurement and power hardware is populated and an exchangeable main controller board.

Featured Infineon Products

Following products are featured by the reference hardware:

Product Description
CY8C6245AZI-S3D72 High-performance, low-power dual-core microprocessor
2ED4820-EM 48 V smart high-side MOSFET gate driver
TLE9012DQU Li-Ion battery monitoring and balancing analog frontend IC
ILD8150 High power 80V DC-DC converter IC
IPT010N08NM5 Single N-Channel OptiMOS™ 5 power MOSFET
TLE9351BVSJ High speed CAN Transceiver for CAN and CAN-FD
TLI4971-A025T5-E0001 Magnetic coreless current sensor with analog interface
TLS205B0EJ V33 Linear Voltage Post Regulator, Low Dropout, Low Noise, 3.3V
TLS208D1EJV Linear Voltage Post Regulator, Low Dropout, Low Noise, adjustable
BSD235N OptiMOS™2 N-Channel Small Signal MOSFET
IRLML6401TRPBF 12V Single P-Channel Power MOSFET
ISC035N10NM5LF2 OptiMOS™ 5 Single N-Channel Linear FET
CY15B256Q-SXA 256-Kbit Automotive Serial (SPI) F-RAM

Getting started

Project layout

This ModusToolbox project is split up into 2 subprojects, one for each processor:

├── proj_cm4/                             # Sub-project for the main processor (main BMS functions)
|    ├── BMS_2ED4820EM/                   # Library for the safety switch of (intelligent gate driver)
|    ├── BMS_TLE9012/                     # Library for the analog frontend
|    ├── FRAM_DIRECT_SPI.c/               # Library for the FRAM memory IC
|    ├── main.c                           # Main code file for the main processor (main BMS functions)
|    ├── balancing.h/.c                   # Abstraction of battery balancing related functions 
|    ├── battery_state.h/.c               # Abstraction of battery state related algorithm (e.g. SoC & SoH)
|    ├── diagnostic.h/.c                  # Diagnostic subsystem
|    ├── global_management.h/.c           # Common elements between all components on CM4 core
|    ├── IMR2_CAN_GLOBAL.h/.c             # CAN Communication
|    ├── memory.h/.c                      # Abstraction of memory subsystem used for status and real-time data storage
|    ├── safety_switch.h/.c               # Abstraction of safety switch related functions
├── proj_cm0p/                            # Sub-project for the secondary processor (e.g. user interface and now priority tasks)
|    ├── main.c/                          # Main code file for the secondary processor (e.g. user interface and now priority tasks)
|    ├── PSoC6_BMS_EPD_ScreenConfig.h/.c  # Display and menu definition, configuration and design
├── LICENSE/                              # Licenses used in this project

How to import and use this repository

  1. Install and start Modus Toolbox and select a workspace to be used (tested with Version 3.1 and 3.2).
  2. Import the project with the import wizard by pressing 'File' – 'Import…'.

     
  3. Select 'General' – 'Existing Project into Workspace' and press 'Next'.

     
  4. Select the archive file by pressing 'Browse…'.

     
  5. Deselect the subprojects - only the main project must be ticked. Press 'Finish'.

     
  6. Right click the 'proj_cm0p' folder and press 'Import as Project'.

     
  7. Right click the 'proj_cm4' folder and press 'Import as Project'6.

     
  8. Click on the main project item, wait a second until the quick view panel loads and start the 'Library Manager' on it.

     
  9. Press the 'Update' button

     
  10. If the update failed, try it again. If this also fails try to clean the project, before trying it again.

     
  11. It should now be possible to build the project without errors.

     
  12. To flash the project onto the hardware, connect the MiniProg4 Programming adapter using the 10-pin flat cable. Before the flashing can be started the 'Start' button on the BMS (right-most button as seen from the front) must be pressed AND HELD until the programming is finished! Use the green play button on the bottom left - 'Quick Panel' - 'Launches' - 'IMR_SW_PSoC6_BatteryManagement Program Application (KitPro3_MiniProg4)' to initiate the process.

     
  13. OPTIONAL: If the debug UART is needed (status and debug messages from system) also connect the TX pin on the controller board to pin 8 of the MiniProg4 (see figure above). In ModusToolbox open a Terminal and select the COM port the Debugger is on:
     

Additional information

Precise definition of the software and its features can be found in the close-to-code documentation on top of each file, at the specific function itself and in the software documentation.

Related resources

Licensing

Please see our LICENSE for copyright and license information.

About

Repository for the PSoC 6 MCU-based Battery Management System (BMS) of Infineon Mobile Robot (IMR)

Resources

License

Stars

Watchers

Forks

Packages

No packages published