Skip to the content
2 layers50.1 × 23.8 mmCAN Firewall, the printed circuit board in 3D

CAN Firewall

PDXostc/canfw12

CAN Firewall project

Size
50.1 × 23.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
32
Nets
72
Pads
157
Tracks, vias
407, 64
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
11 Aug 2015
Updated
17 Dec 2015

Overview

CAN Firewall is an open-source printed circuit board by PDXostc, from the PDXostc/canfw repository on GitHub, published under the MPL-2.0 licence. It is a 2-layer board of 50.1 × 23.8 mm with 32 parts on 72 nets, routed with 407 tracks and 64 vias.

It is built around the MCP2551-I/SN, MC78M05CDTG and SMBJ16A. Its parts include 13 capacitors, 9 resistors, 5 ICs, 2 connectors and 1 diode.

Main components

3

README

README.md

CAN FIREWALL

There are two tables, IVI2VEH and VEH2IVI, specifiying rules for traffic going from the IVI to the vehicle and from vehicle to IVI.

Each one of the two tables has a number of rules.

Each rule has a numberic ID. Rules are executed in order of ascending IDs.

Each rule has an Frame ID mask and a Frame ID filter, applied according to the standard CAN bus filter principle, as described here.

Below is pseudo code for frame processing.

text
process_frame(frame_id, payload) {

  // Traverse all rules
  for (i in rules) {
    masked_id = (frame_id & rules[i].id_mask);

    // If the masked out ID is 0, we have a hit. Process
    if (!masked_id) {
      process(frame_id, input, rules[i].action,
	          rules[i].id_operand, rules[i].data_operand);
      return;
    }

    // Check if we have a hit on the masked ID and the
	// ID filter.
    // If so, we have a hit and will process
    if (masked_id & rules[i].id_filter) {
      process(frame_id, input, rules[i].action,
	          rules[i].id_operand, rules[i].data_operand);
      return;
    }

    // No hit. Try next rule
  }

Below is an example of a rule table.

IDIdMaskIdFilterActionIdOperandDataOperand
10xFFFFFFFF0x00000012ID_AND_DATA_OR0x00FFFFFF0x000000FFFFFFFFFF
20xFFFFFFF00x00000120ID_SET_DATA_SET0x012345670x0123456780ABCDEF
990x000000000x00000000BLOCK0x000000000x0000000000000000
  • RULE 1
    Rule ID 1 specifies will filter out the lower all bits of the CAN frame ID and match those against the specific ID 0x12, thus intercepting all CAN frames with the exact ID of 0x00000012.
    An intercepted frame will be forwarded to the other side after ANDing the incoming Frame ID with 0x00FFFFFF, and then ORing the data payload with 0x000000FFFFFFFFFF.
    Once the intercepted frame has been forwarded, the next frame is processed.

  • RULE 2

    Rule ID 2 is evaluated for all frames not intercepted by Rule 1 above. The rule will mask the incoming CAN frame ID against 0xFFFFFFF0 and filter the result against 0x00000120, intercepting all CAN frames between 0x00000120 and 0x0000012F.
    For each frame intercetpted by rule 2, a fixed frame will be sent to the other side with the frame ID 0x01234567 and payload 0x0123456780ABCDEF.

  • RULE 99
    Rule 99, a catch all, has a mask that intercepts all frames not intercepted by rule 1 or 2. Since the mask is 0x00000000, the filter will not be used since there no bits will pass the mask to be applied to the filter.
    Rule 99 will block the frame and not send anything to the other side.
    The modification bitmasks for the frame ID and data payload are unused for blocking rules.

Please see presentation under doc for further details.

Hardware Details and Data sheets: AT32UC3C2512C Datasheet http://www.mouser.com/ds/2/36/doc32117-74889.pdf

Parts

32
QtyValueFootprintReferences
7100NcUSTOM pARTS:R_0603_smC7, C8, C9, C10, C11, C12, C13
4100cUSTOM pARTS:R_0603_smR2, R3, R4, R5
4560PcUSTOM pARTS:R_0603_smC1, C2, C3, C4
2470cUSTOM pARTS:R_0603_smR1, R8
24K7cUSTOM pARTS:R_0603_smR6, R7
2DB9Connect:DB9F_CIJ1, J2
2MCP2551-I/SNPower_Integrations:SO-8U1, U2
110NcUSTOM pARTS:R_0603_smC5
1470Custom Parts:R_0603_smR9
14U7Capacitors_Tantalum_SMD:TantalC_SizeA_EIA-3216_ReflowC6
1AT32UC3CHousings_QFP:LQFP-64_10x10mm_Pitch0.5mmU4
1FUSEcUSTOM pARTS:R_1210_SMF1
1MC78M05CDTDiodes_SMD:D-Pak_TO252AAU3
1PESDxL5UYHousings_SOT-23_SOT-143_TSOT-6:SC-70-6U5
1PINHEAD1-2Connect:PINHEAD1-212V
1SMBJ16ADiodes_SMD:Diode-SMB_StandardD1

More from PDXostc/canfw

3
  • 2 layers68 × 58 mmCAN Firewall, the printed circuit board in 3D

    CAN Firewall

    PDXostc/canfw

    CAN Firewall project

    80 parts12MPL-2.0
  • 2 layers68 × 58 mmCAN Firewall, the printed circuit board in 3D

    CAN Firewall

    PDXostc/canfw

    CAN Firewall project

    70 parts12MPL-2.0
  • 2 layers68 × 44 mmCAN Firewall, the printed circuit board in 3D

    CAN Firewall

    PDXostc/canfw

    CAN Firewall project

    56 parts12MPL-2.0

Similar boards

  • 2 layers29.2 × 34.3 mmDigipark, the printed circuit board in 3D

    Digipark

    ccadic/attinyoled

    OLED and ATTINY PCB kicad project

    14 parts2
  • 2 layers109.5 × 74 mmJuly23, the printed circuit board in 3D

    July23

    biofoundry/lampdiagnosticspcb

    PCB Design for the LAMP Diagnostics device

    67 parts1MIT
  • 4 layers100 × 50 mmAltReg CAN, the printed circuit board in 3D

    AltReg CAN

    Open-Source-Alternator-Regulator/alt-CAD

    Support Files for the Alternator Regulator

    156 parts
  • 2 layersIon, the printed circuit board in 3D

    Ion

    rusefi/hw_legacy

    In this repo we archive rusEfi-related abandoned hardware files

    40 parts2
  • 4 layers160 × 99.5 mmHigh Current Driver, the printed circuit board in 3D

    High Current Driver

    Strathclyde-EQOP/Vernier-Current-Driver

    The Vernier Current Driver is an ultra low noise, programmable, bi-polar current source. It comes in two flavours:

    248 parts9CC-BY-SA-4.0
  • 2 layers160 × 100 mmMarine gps, the printed circuit board in 3D

    Marine gps

    mbouyer/marine_chartplotter

    Hardware and software for an opencpn-based chartplotter

    115 parts6BSD-2-Clause
  • 4 layers75.5 × 62 mmBspd, the printed circuit board in 3D

    Bspd

    chithigun23/ANUFS-BSPD-2026

    ANUFS's BSPD for 2026 Formula SAE ICE Car. The goal of this project is to be AEC-Q100/Q101/Q200 compliant.

    120 parts1

Questions

How big is the CAN Firewall PCB?

It measures 50.1 × 23.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CAN Firewall use?

32 parts, built around the MCP2551-I/SN, MC78M05CDTG and SMBJ16A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the CAN Firewall KiCad files?

From the PDXostc/canfw repository on GitHub, at the commit this page was made from: the board is hardware/Make files/V1.01/CAN_Firewall.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the CAN Firewall design in my own project?

Its repository publishes it under the MPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).