Skip to the content
2 layers68 × 58 mmCAN Firewall, the printed circuit board in 3D

CAN Firewall

PDXostc/canfw12

CAN Firewall project

Size
68 × 58 mm
Copper layers
2
Thickness
1.6 mm
Parts
80
Nets
138
Pads
367
Tracks, vias
1,103, 121
Pours
7
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 68 × 58 mm with 80 parts on 138 nets, routed with 1,103 tracks and 121 vias.

It is built around the MCP25625-E/ML, MC78M05CDTG and SMF05, with the SMBJ16A among its other parts. Its parts include 21 resistors, 14 capacitors, 9 connectors, 6 ICs and 6 diodes.

Main components

4

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

80
QtyValueFootprintReferences
11470Custom Parts:R_0603_smR4, R5, R6, R7, R8, R10, R11, R12, R13, R14, R15
10100NCustom Parts:R_0603_smC3, C4, C5, C8, C9, C10, C11, C12, C13, C14
40Custom Parts:R_0603_smR16, R17, R18, R19
310NCustom Parts:R_0603_smC1, C2, C6
322Custom Parts:R_0603_smR1, R2, R3
3FUSECustom Parts:R_1210_SMF1, F2, F3
3SPSTCustom Parts:SW_SPST_FSMSM_SMSW1, SW2, SW3
2120Custom Parts:R_0603_smR20, R21
2220Custom Parts:Diode_0805_12_SMFB1, FB2
2DB9Connect:DB9F_CIJ2, J3
2MCP25625Housings_SSOP:SSOP-28_5.3x10.2mm_Pitch0.65mmU5, U6
2Matrix AConnect:GS3JP1, JP6
2Matrix BConnect:GS3JP2, JP7
2Matrix CConnect:GS3JP3, JP8
2Matrix DConnect:GS3JP4, JP9
2Matrix EConnect:GS3JP5, JP10
2USB_OTGCustom Parts:USB_Micro-B-DX4R005JJ2R1800P1, P2
1+5V_SRCSocket_Strips:Socket_Strip_Straight_1x03J1
147UCapacitors_Tantalum_SMD:TantalC_SizeA_EIA-3216_ReflowC7
14K7Custom Parts:R_0603_smR9
1AT32UC3CHousings_QFP:LQFP-64_10x10mm_Pitch0.5mmU1
1AVR-AW-6Socket_Strips:Socket_Strip_Straight_2x03CON3
1AVR-JTAG-10Socket_Strips:Socket_Strip_Straight_2x05CON2
1BARREL_JACKCustom Parts:RAPC722XCON1
1BLUECustom Parts:Diode_0805_12D6
1DIAG PortSocket_Strips:Socket_Strip_Straight_1x12P3
1FT232RL-SSOPHousings_SSOP:SSOP-28_5.3x10.2mm_Pitch0.65mmU2
1GREENCustom Parts:Diode_0805_12D5
1MC78M05CDTDiodes_SMD:D-Pak_TO252AAU3
1REDCustom Parts:Diode_0805_12D4
1SMBJ16ADiodes_SMD:SMB_StandardD3
1SMF05Housings_SOT-23_SOT-143_TSOT-6:SC-70-6U4
1TXCCustom Parts:TXCX1
1WHITECustom Parts:Diode_0805_12D2
1YELLOWCustom Parts:Diode_0805_12D1

The 75 most common of 80 parts.

More from PDXostc/canfw

3
  • 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
  • 2 layers50.1 × 23.8 mmCAN Firewall, the printed circuit board in 3D

    CAN Firewall

    PDXostc/canfw

    CAN Firewall project

    32 parts12MPL-2.0

Similar boards

  • 2 layers87 × 71 mmSocket, the printed circuit board in 3D

    Socket

    eddyem/STM8_samples

    Some code samples and ready projects based on STM8 (deprecated)

    89 parts80
  • 4 layers53.5 × 53 mmHwexla, the printed circuit board in 3D

    Hwexla

    kmzbrnoI/hWexla

    Turnout controller

    93 parts
  • 2 layers46 × 36 mmTracker, the printed circuit board in 3D

    Tracker

    Polsaker/trackeame-esta

    GPS/GSM tracker

    45 parts
  • 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

Questions

How big is the CAN Firewall PCB?

It measures 68 × 58 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CAN Firewall use?

80 parts, built around the MCP25625-E/ML, MC78M05CDTG, SMF05 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/Active/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).