Skip to content
/ bcm-hv Public

Library for Vicor's BCM4414 DC/DC regulator.

Notifications You must be signed in to change notification settings

gudnimg/bcm-hv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bcm-hv

Library for Vicor's BCM4414 DC/DC regulator. There is a separate folder for Arduino and STM32F4.

Background

Many EV Formula Student teams use 600V tractive system voltage. The higher the voltage, the thinner the cables. To power the low voltage electronics you can do either of 2 things.

  1. A separate low voltage battery pack.
  2. A DC/DC regulator. (Usually 12V or 24V).

It is difficult to find a rule compliant regulator. One such regulator is Vicor's BCM4414.

The purpose of me open sourcing this git repository is to help other Formula Student teams get started with creating the code. I am myself in University of Iceland's Team Spark team but this project developed for another course outside my team.

The BCM4414 module I had to test and write this code is an engineering prototype and it doesn't have all the functionality as the newest modules. Though it should be easy to add to the code. All reading and writing functionality has been fully tested.


Hardware connection

External pull-ups are required to get good signal edges. You can use either 3.3V or 5V, either works fine.

You can choose your own ADDR resistor value (R3) by looking up the table in the datasheet. Using 1000 Ohms as depicted below yields a device address 0x51.

Usage

Arduino

The code is located in Arduino/src/

Start by creating an instance of the class Vicor. It takes two inputs, a TwoWire instance and an I2C address (see Device Address in BCM datasheet). You can choose whether you want to use the your own TwoWire instance or not, the Vicor class will create one for you.

// Method 1
Vicor bcm;       // Not inputs. The instance uses default settings.

// Method 2
Vicor bcm(0x51); // Custom I2C address 0x51.

// Method 3
TwoWire pWire;           // Custom Wire class for I2C
Vicor bcm(&pWire, 0x51); // Custom I2C address 0x51 and TwoWire instance.

STM32F4

The code is located in Nucleo-F401RE/src/

I had trouble using C++ so I've stuck with C. That means I can't use the class method I used for the Arduino.

Start by declaring an instance of the global struct like this:

BCM4414 bcm; // Global BCM variable.

This struct includes all the data possible to get out of the modules.

You must manually call the other functions included in vicor.c to specify which data to get. The data is stored in the BCM4414 struct.

Example: Status CML

read_status_cml(&hi2c1); // Read Status CML byte from the BCM module.

// You can either get the entire byte in one:
bcm.status_cml.all // <-- raw byte (includes all bits)

// Or you can go further and read individually defined bits:
bcm.status_cml.cmd_stat_rx  // <-- 0 or 1 for bit 7
bcm.status_cml.data_stat_rx // <-- 0 or 1 for bit 6

About

Library for Vicor's BCM4414 DC/DC regulator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published