Prerequisites:
Electrical Onboarding Page [insert here]
Github SSH key
Latest KiCAD
Git bash
Background:
The Problem
When we draw current from a battery it also produces heat, which induces a high current draw. If a battery gets hot enough, it will enter a thermal runaway where it gets so hot that it draws much more current than normal, producing more heat and drawing more current until the battery explodes (not good). There are a lot of preventative measures you can take to avoid thermal runaway like passive cell balancing. The simplest option to prevent the battery from getting too hot is controlling fans to dissipate heat in the battery box.
Given that the voltage stays the same, and the current increases when the cells get hotter. What circuit component must be changing due to the heat (not the current).
How we control fans
Unfortunately, we can’t have the fans on at all times since that’s a huge draw of our limited power, so BPS turns the fans on at different speeds depending on the state of the battery’s heat.
The first thought is to turn it on or off a switch via the BPS microcontroller and control it in software.
Requirements:
The BPS MCU must control it
Schematic:
Some notes, make sure when you edit or open schematic or PCB files, only open them from the project
Symbol Libraries:
We have many shared components for our boards, so we decided to have a separate repository just for storing shared components.
Repo Link: https://github.com/lhr-solar/UTSVT-KiCadLibraries
We store this library in your repository as a submodule which means we’re cloning a 2nd repository (the KiCAD Libraries repo) into your PCB repository
Steps to add the UTSVT-KiCAD Libraries repo to your repository.:
Travel to your PCB directory in Git Bash
Get the clone link of the UTSVT-KiCADLibraries repo
Type this into bash:
git submodule add [clone link of the UTSVT-KiCADLibraries repo
Go to the schematic editor of the starter project
Go to Preferences->Manage Symbol Libraries
Go to the “Project Specific Libraries“ page
Press the + button at the bottom left of the screen
In Library path, select the “utsvt-chips.kicad_sym” and change the nickname to usvt-chips
{KIPRJMOD} is a variable that changes depending on the user.
Make sure to use the {KIPRJMOD} variable instead of your /Users/[username] directory
Repeat step 8 for every .kicad_sym file
Press “Ok“
To test if it worked, in the menu to add symbols type the nickname for one of the libraries you added and see if there is a symbol in that section
Why do I need to use {KIPRJMOD}
Why don’t I just download thee UTSVT-KiCAD Libraries as a zip and then copy and paste it into your repo?
PCB:
Footprint Libraries:
Make sure you do the symbol libraries setup step before this step
Go to the PCB editor
Preferences → Manage Footprint Libraries
Go to Project Specific Libraries
Add each .pretty folder
Make sure the nickname stays as the the name of the footprints foder (without the .pretty name)
Setting up constraints:
The PCB manufacturer we use (JLCPCB) has specific machining requirements that we need to follow to have them order the board.
They are linked here: https://github.com/lhr-solar/UTSVT-KiCadLibraries?tab=readme-ov-file#standard-constraints-for-laying-out-board
Go to File-> Board Setup
Go to Constraints
Change the constraints