Giter VIP home page Giter VIP logo

pcb's Introduction

PCBs

About

Central repository of all schematics and PCB design files.

Folder Project Project Code
ail Accumulator Indicator Light ail
bspd Brake System Plausibility Device bspd
dash Dashboard dash
discharge Discharge Relay Breakout discharge
hv-sense High Voltage Sense hvs
latching Latch Circuit latching
loom* Loom Design loom
segment Segment segment
telemetry On-Car Telemetry telemetry
test-rig PCB Test / Demo Rig test
top-level* Full Car Schematic
trc TSAC Relay Controller trc
tsal Tractive System Active Light tsal
vcu Vehicle Control Unit vcu

We design our PCBs in KiCad (version 7+).

*Schematic only.

Version Control for KiCad Projects

Why?

  • Revert individual changes.
  • Document development history via commits and GitHub issues.
  • Easily view previous versions of designs.
  • Manage shared library of components.

Files

Files that should be in this repo, under version control:

  • Project files (.kicad_pro).
  • Schematic files (.kicad_sch).
  • PCB files (.kicad_pcb).
  • Custom footprints (.kicad_mod).
  • Custom symbols (.kicad_sym).
  • Footprint library tables (fp-lib-table).
  • Symbol library tables (sym-lib-table).
  • 3D models of components (.step files).
  • Simulation code (e.g. .asc files from LTSpice).

Files that should never be in here:

  • Exports such as BOMs, gerbers, netlists, renders, etc.
  • Local project settings (.kicad_prl).
  • Project backups (.zip files generated in <project name>-backups, .bak .bck -bak files).
  • Cache files (fp-info-cache).

The .gitignore should prevent the addition of files we don't want to keep in here, but before you commit make sure to do a quick check of what is actually being added.

Shared Resources

The common folder is used for resources which can be shared across multiple projects. This includes:

  • Images (images subdirectory).
  • 3D models (step subdirectory).
  • Custom symbols (sufst-lib.kicad_sym).
  • Custom footprints (sufst-lib.pretty).
  • SUFST standard sheet layout (sheet-layout.kicad_wks).

Note: Since projects were previously in their own individual repos, many designs still have their own libraries, step files, etc. These will gradually be migrated to the SUFST library.

Library Paths

When you configure the library paths for a project (sym-lib-table and fp-lib-table data), make sure to always use a path relative to the project with the ${KIPRJMOD} substitution.

  • Correct: ${KIPRJMOD}/../common/sufst-lib.kicad_sym
  • Incorrect: /Users/<your name>/Documents/sufst/pcb/common/sufst-lib.kicad_sym

If an absolute path is used, when someone else opens the project that path will not exist and the library paths will not be valid. -lib-table files should never contain an absolute path.

Git Limitations

It is not possible to resolve merge conflicts within individual design files, which is an unfortunate limitation of using git with KiCad. While KiCad files are in a text format, they aren't really designed to be edited manually. It is therefore essential that only one person is editing a particular file in a project at a time (including the shared library). Once someone starts working on a file, until it is merged into the main branch nobody else can edit that file. A good way to get round this is to use the "hierarchical sheets" feature to divide schematics into multiple files (if it can be done in a logical way).

Releases

Release Files

When a PCB is fabricated, a new 'release' for the given project should be created and stored within this repo in the releases/<PROJECT NAME> folder. This folder should contain the latest version (and ONLY the latest version) of the following files:

  1. Exported gerbers and drill files in a ZIP archive called fabrication.zip.
  2. Schematic sheets as a PDF (Schematic.pdf).
  3. Layout as a PDF in colour, with border and title block (Layout.pdf).
  4. HTML iBOM created using the "Interactive HTML BOM Plugin" (ibom.html).

Additionally, a file called info (no extension) should be created (if it doesn't already exist) containing release information in the following format:

version: <VERSION NUMBER>
date: <RELEASE DATE>
fabrication: <COMPANY>

Version numbers should be in the format v1.0.1 and dates should be in the format YYYY-MM-DD. For example:

version: v1.0.1
date: 2023-01-23
fabrication: JLCPCB

The release folder for a project should then have the following structure and file names:

<PROJECT NAME>
├── Layout.pdf
├── Schematic.pdf
├── fabrication.zip
├── ibom.html
└── info

When creating a new release, make sure to overwrite/replace all the existing files.

Release Tag

The release commit should then be tagged with the following command:

git tag <PROJECT CODE>-<VERSION_NUMBER>

Tagging should be done after merging to main! Example command:

git tag segment-v1.0.1

To push tags to GitHub:

git push --tags

pcb's People

Contributors

joepater avatar maxobrien avatar mxrxk avatar saltyboi2995 avatar t-bre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pcb's Issues

feat(bspd): add indicator LEDs

Description

Add LEDs to indicate key states in the BSPD:

  • SCS implausible (red, on during fault).
  • Brake and throttle pressed (red, on during fault).
  • Shutdown output state (green, on if shutdown circuit closed).

Additional Notes

SMD LEDs on the PCB and one external LED on the BSPD box (via connector).

feat(latching): add labels

Description

PCB is currently un-labelled, would be nice to add:

  • Connector names on the top of the board.
  • Pin names on the bottom of the board.
  • The project name and version number.
  • SUFST stag logo (if space).

bug(tsal): Molex connectors should be reversed

Description

Clips on Molex connectors are currently facing towards the inside of the board. This makes it harder to remove them.

Screenshot 2023-02-07 at 16 39 44

Expected Behaviour

Clips facing towards outside of board.

bug(latching): IMD input not pulled down

Description

IMD input is not pulled down which is potentially undefined behaviour if the connection is broken and the input is floating.

Expected Behaviour

IMD input pulled down.

feat(vcu): update to STM32-F746ZG board

Description

Update schematic for STM32-F746ZG board.

Requirements

  • New schematic for STM32-F746ZG connectors.
  • Remove third CAN transceiver.
  • Update connections from MCU to rest of board.

feat(vcu): label power input polarity on front silkscreen

Description

It would be useful to show the polarity of the power input connection on the front silkscreen. Currently it is only labelled on the back.

Additional Notes

This definitely used to be on older designs, but must have accidentally been removed at some point.

bug(latching): signals latch to wrong state

Description

Latching behaviour is the opposite of what we want, currently the output latches high when leaving the fault state and entering the "ok" state.

Expected Behaviour

Output latches low when leaving "ok" state and entering fault state.

Additional Notes

The inputs from the BMS and IMD need to be inverted and Q' of the latches used as the output. Q = 1 should represent a fault state and Q = 0 should represent an "ok" state.

bug(latching): latching mechanic not working

Description

The design using the D-type flip flops U1 seems to not be working. The potential culprits could be the power on state (POR) or the method in which U1 is wired.

A redesign is required.

Steps To Reproduce

  1. Connect power into the circuit using 12V supply
  2. Connect the IMD_Ok signal into the board (J2 pin 2) and connect to 10V supply
  3. Connect the IMD_OK_LATCHED signal to an oscilloscope (J3 pin 2)
  4. Power on 12V and 10V simultaneously. You will notice that the latching will latch into the fault state (J3 pin 2 LOW). This issue persists even if the IMD_Ok signal is connected to the 12V supply to have a truly simultaneous connection in.
  5. Power on 10V slightly earlier than 12V. You will notice that the latching will now latch in the no-fault state (J3 pin 2 HIGH). However when IMD_Ok signal is sent to the fault state, the circuit remains latched in the no-fault state.

Environment

B16 tools and equipment

Expected Behaviour

When turned on simultaneously, the circuit should boot up in a no-fault state given that no faults are detected. If a fault is detected, the circuit must latch in the fault state and remain latched even if the IMD_Ok state changes to the no fault state. Power cycling the circuit should remove the error given that the signal is in a no-fault state.

feat: import existing designs

Description

Import existing designs into this repo.

Requirements

  • VCU
  • TSAL
  • HV sense
  • BSPD
  • Discharge
  • Latching
  • Precharge.

bug(vcu): Molex connectors should be reversed

Description

Clips on Molex connectors are currently facing towards the inside of the board. This makes it harder to remove them.

Screenshot 2023-02-07 at 16 37 55

Expected Behaviour

Clips facing towards outside of board.

bug(hvs): non-standard resistor values

Description

The resistor values used to divide down the HV are very non-standard and not generally stocked at the university. They should ideally be replaced with values which are more common.

Screenshot 2023-06-08 at 16 46 47

bug(bspd): bad footprint for transistor

Description

The footprint for the transistor which is used in the following circuit is wrong:

Screenshot 2023-03-24 at 21 03 34

The footprint is BCE, but most transistors we have (BC557, 2N3906) are CBE.

Expected Behaviour

Footprint changed to CBE.

bug(tsal): fp-lib-table contains user-specific paths

Description

fp-lib-table for TSAL contains:

(fp_lib_table
  (lib (name "footprints")(type "KiCad")(uri "/home/joe/pro/sufst/precharge/hardware/precharge/footprints.pretty")(options "")(descr ""))
)

This should be a path relative to the project, instead of an absolute path specific to one user.

Not sure if this breaks the PCB in some way?

Steps To Reproduce

  1. Look at contents of tsal/fp-lib-table.
  2. Single entry in table with path specific to one user.

Expected Behaviour

No absolute paths in table.

bug(vcu): 5V regulator tab is not ground

Description

5V regulator tab is the regulator output and not ground. This causes a short to the large exposed copper pad. The net of the pad should be changed to 5V and a new (small) 5V plane created.

bug(vcu): EEPROM IC orientation not clear on silkscreen

Description

When soldering the board, it is hard to tell what the correct orientation of the EEPROM IC is. There is a small dot, but it's not immediately obvious because it really is tiny. Might be good to add a larger dot/circle below pin 1. The reference designator for the IC is also on the opposite side to the dot, which could be incorrectly interpreted as the side of pin 1 if the dot isn't seen.

Screenshot 2023-04-16 at 23 24 00

bug(hvs): missing / modified symbols

Description

Some symbols were missing after migration from the old separate PCB repos to this new monorepo. The schematic / PCB are fine, but these should be sorted eventually.

Additional Notes

Causes ERC errors below:

Screenshot 2023-04-02 at 22 21 28

chore: update to KiCad 7

Description

Opening projects created in KiCad 6 with KiCad 7 causes a change to the project file which may be accidentally committed if the project is opened for reference when working on something else. To avoid merge conflicts caused by this, we should probably just open everything in KiCad 7 once and commit the changes.

bug(vcu): R2D and VC LED outputs swapped

Description

The VCU has the R2D and VC LED outputs swapped.

Screenshot 2023-06-02 at 23 19 39

Additional Notes

Small schematic error, easily fixed in a future revision. This has been patched in software for now, remember that it will need to be changed if this is fixed on the PCB.

feat(vcu): replace DRS driver with timer pin output

Description

DRS servo can be driven directly from a timer pin on the MCU, instead of with an extra driver chip.

Requirements

  • Remove old driver chip.
  • Add DRS output pin to MCU.
  • Level shift DRS output.
  • Add DRS to connector.

Additional Notes

The servo is 5V, so the 3.3V MCU output will need to be level shifted.

feat(vcu): update DRS servo hardware to 12V

Description

Change DRS servo control system to operate at 12V. Potentially add a current measurement mechanism for intelligent servo control. The 5V regulator can be removed, which will fix #49.

bug(vcu): analogue inputs not buffered

Description

Analogue inputs from the APPS need to be buffered as the current resistor divider design affects the transfer function of the sensor.

Expected Behaviour

Unity gain op-amp buffers added to analogue input channels.

feat(vcu): add EEPROM memory

Description

Add NVM for use by the VCU microcontroller for parameter configuration.

Requirements

  • Spec new EEPROM.
  • Add to schematic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.