Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Pedal Board Schematic #1

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

etejeda113
Copy link

@etejeda113 etejeda113 commented Oct 26, 2024

Includes Break fluid pressure circuitry and excludes potentiometer for the pedal position sensor.

Quality Assurance Checklist

To make reviews more efficient, please make sure the board meets the following standards and check everything off once the board meets the quality check. Once everything has been checked, the assigned reviewers will begin the review process. Edit this description to check off the list.

There are exceptions with all guidelines. As long as your decisions are justified, then you are good! Contact the reviewers or the leads about any exceptions.

Minimum Prerequisites

  • Pushed changes to branch.
  • The board passes ERC and DRC.
    • Note some ERC warnings are acceptable.
  • All traces are routed.
  • Units are in metric.

2D Spacing

  • The components are spaced out at an optimal distance.
    • All components can be easily hand-soldered.
    • IPC-SM-782A Standard requires a minimum distance of 1.0mm from edge to edge.
  • Components that are in parallel with each other are spaced out at an equal distance when possible.
  • The components are aligned with each other when possible.
  • Components are grouped based off of functionality.
    • E.g. all components for CAN should be grouped.
  • Bypass capacitors are less than 1cm away from their respective IC's power pins.

3D Spacing

  • Layout of components have been placed with mounting location and usage of the board in mind.
    • Are PCBs going to be stacked on above/below this board? Are tall components placed accordingly?
    • Are buttons and lights easily accessible and viewable?
    • When mounted into the car, are the heights of the components and connectors accounted for?
  • Location of connectors and wires going out of the board will prevent messy wiring.
    • Are all the wires that are going in the same direction placed on the same edge of the board?

Components

  • Custom footprints have been double checked with the datasheet.
  • Pin 1 of the footprint is labeled in some way.

Copper Layer

  • The trace widths and trace clearances are greater than JLCPCB's minimum requirements.
  • The trace lengths are as short as possible.
    • Can there be a more optimal route if you go to another layer?
  • Each trace's width is capable of handling the expected current flow.
    • Use PCB width calculator to calculate trace width.
  • *No sharp corners. No trace angles equal to or less than 90 degrees.
  • Traces are in parallel with each other when possible.
    • E.g. traces connected between an IC and MCU can be placed in parallel with each other.
  • There are no random trace appendages.
  • Vias placed in copper pads are fully encompassed in the copper pads.
  • Through-hole components do not have extraneous vias.

*Not really a problem for modern manufacturing techniques but good practice and important for high speed signal integrity.

Silkscreen Layer

  • Visible text sizes are greater than JLCPCB's minimum requirements.
  • All visible text is on the silkscreen layer.
  • All reference labels of each component are not overlapping a copper pad or another component.
  • All connector pins are labeled with a meaningful and helpful name.
  • All LEDs are labeled with a meaningful and helpful name.

Edge Cut Layer

  • The dimensions of the board and the mounting holes are nice values in metric i.e. no long decimals.
  • The physical outline of the board is on the edge cut layer.
  • Edge cuts are straight and parallel with opposite edge of the board.
  • Mounting holes are aligned.
  • Corners are curved and contoured to mounting holes.

IMPORTANT NOTICE

  • I am confident that this board will be safe to use in a safety critical environment.
  • [NO!!!!] I had fun :)

Other Comments

Write any comments about the board that would help the reviewers here.

@Lakshay983
Copy link

You should have bypass caps on the on the output of the 5V buck to clean the 5V power

The peripheralSOM's ADC uses GND, but the signal for the brake is referenced to GNDPWR. You need some form of isolation to take the input signal which is referenced to GNDPWR and make it GND.

Amperes is doing smth similar if you want to see how that is implemented: https://github.com/lhr-solar/BPS-AmperesPCB

Look on mouser to see if you can find a high precision resistor that matches what you need for the shunt resistor, since 160 ohms is a bit of an awkward value

Use a bidirectional TVS diode for the 12V input (to prevent transients from GND going into it). See the powerDist sheet of the psom for what TVS to use: https://github.com/lhr-solar/PeripheralSOMPCB/tree/v2.1

For the accelerator i'd do what the datasheet suggests and add a buffer for the ADC signal.

@IsaacNeideffer15
Copy link

I wanted to ask, partly just for myself, why the circuit has to be isolated? It isn't connected to HV and all of the components would be powered off of the single 12v power supply, so there wouldn't be ground loop issues from what I know.

The main reason I bring this up is because you are using an isolated amplifier for your brake sensor. The way these amplifiers work is they use an ADC internally to digitize and transfer the voltage value across the isolation barrier, which is read by a DAC and outputted. The issue with this in the context of sensors is that you lose a degree of precision each time you perform a conversion between analog and digital. Since you will ADC the value again in the microprocessor, you could compound the error and get less accurate readings. However it is possible in your application the precision of the measurement doesn't matter as much, in which case this isn't a concern.

If the board has to be isolated and absolutely has to have a very precise signal, then you could add an ADC to the board, and use an isolator to bring the digital signal across the isolation barrier, in which case you wouldn't lose any precision.

@IsaacNeideffer15
Copy link

image
Brake*

@Lakshay983
Copy link

I wanted to ask, partly just for myself, why the circuit has to be isolated? It isn't connected to HV and all of the components would be powered off of the single 12v power supply, so there wouldn't be ground loop issues from what I know.

The main reason I bring this up is because you are using an isolated amplifier for your brake sensor. The way these amplifiers work is they use an ADC internally to digitize and transfer the voltage value across the isolation barrier, which is read by a DAC and outputted. The issue with this in the context of sensors is that you lose a degree of precision each time you perform a conversion between analog and digital. Since you will ADC the value again in the microprocessor, you could compound the error and get less accurate readings. However it is possible in your application the precision of the measurement doesn't matter as much, in which case this isn't a concern.

If the board has to be isolated and absolutely has to have a very precise signal, then you could add an ADC to the board, and use an isolator to bring the digital signal across the isolation barrier, in which case you wouldn't lose any precision.

It rlly doesn't need to be isolated in the general case, but the reason has isolation is cuz that's how we designed the PeripheralSOM because of the isolation requirement of BPS. So since BPS had an isolation requirement for PeripheralSOMs so everyone needs to work within those bounds. In the future, I would like for everyone to develop their own SOM version so BPS can make their own SOM with isolation and everyone else can make something without isolation.

Isolation doesn't rlly lose you that much precision compared to the precision lost in an STM's ADC, i.e you do lose precision but not enough for an STM's ADC to notice. Isolation is iffy for analog signals cuz you can add a good amount of thermal noise to the output signal that you need to add heavier filtering for.

For your point about GND loops, isolation is one of the ways you can avoid GND loops and it's something we did in the past for CAN and some other signals, but for 2026 car (Solar Mcqueen) we can avoid GND loop problems by relegating inter-board communications to just a CAN that shares the same GND as the fusebox.

@Lakshay983
Copy link

Also, y'all have both "3.3V" and "3v3" as nets, so KiCAD is considering them as different nets (no bueno)

image
It looks like there's 2 seperate instances of the mounting holes and PeripheralSOM edge cuts. You can Update PCB From Schematic and check the "Delete Footprints with no symbols" option

Can you make all the resistors and passives on one side? It'll make soldering easier since you can just put the components then heat gun it all once

J3 and J5 are rlly far from each other so you need route CAN and power across the entire board, which is kinda iffy for signal integrity and routing. I'd move em closer to each other.

@krazykrayon
Copy link

Agree with Lakshay on the CAN connectors being a little far from one another. Most of your test points are pads, which should be fine for power since its probably not being tested very frequently, but making them the little clip ones might be better. Also, not sure if necessary, but having testpoints for the accel and brake values might be helpful for debugging purposes (maybe?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants