

CAN Firewall
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
4MCP25625-E/ML
QFN-28-EP(6x6)-40℃~+125℃ 10uA 1Mbps 4.5V~5.5V CAN Controller QFN-28-EP(6x6) CAN Transceivers ROHSMicrochip TechnologyCAN TransceiversMC78M05CDTG
DPAK0℃~+125℃@(Tj) 1 2V@(350mA) 3.2mA 35V 40uV 500mA 5V 62dB@(120Hz) Fixed Over Current Protection、Over Temperature Protection、Short Circuit Protection Positive DPAK Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSonsemiVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsSMF05
SOT-353-55℃~+125℃ 100W 12V 200nA 5V 60pF 8.5V 8A Four channels IEC 61000-4-2、IEC 61000-4-5 TVS Unidirectional SOT-353 ESD and Surge Protection (TVS/ESD) ROHSWPMtekESD And Surge Protection (TVS/ESD)SMBJ16A
DO-214AA(SMB)16V 19.7V 23.08A 26V 5uA 600W@10/1000us IEC 61000-4-2 TVS Unidirectional DO-214AA(SMB) ESD and Surge Protection (TVS/ESD) ROHShongjiachengESD And Surge Protection (TVS/ESD)
README
README.mdCAN 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.
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.
| ID | IdMask | IdFilter | Action | IdOperand | DataOperand |
|---|---|---|---|---|---|
| 1 | 0xFFFFFFFF | 0x00000012 | ID_AND_DATA_OR | 0x00FFFFFF | 0x000000FFFFFFFFFF |
| 2 | 0xFFFFFFF0 | 0x00000120 | ID_SET_DATA_SET | 0x01234567 | 0x0123456780ABCDEF |
| 99 | 0x00000000 | 0x00000000 | BLOCK | 0x00000000 | 0x0000000000000000 |
-
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 with0x00FFFFFF, and then ORing the data payload with0x000000FFFFFFFFFF.
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
0xFFFFFFF0and filter the result against0x00000120, intercepting all CAN frames between0x00000120and0x0000012F.
For each frame intercetpted by rule 2, a fixed frame will be sent to the other side with the frame ID0x01234567and payload0x0123456780ABCDEF. -
RULE 99
Rule 99, a catch all, has a mask that intercepts all frames not intercepted by rule 1 or 2. Since the mask is0x00000000, 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| Qty | Value | Footprint | References |
|---|---|---|---|
| 11 | 470 | Custom Parts:R_0603_sm | R4, R5, R6, R7, R8, R10, R11, R12, R13, R14, R15 |
| 10 | 100N | Custom Parts:R_0603_sm | C3, C4, C5, C8, C9, C10, C11, C12, C13, C14 |
| 4 | 0 | Custom Parts:R_0603_sm | R16, R17, R18, R19 |
| 3 | 10N | Custom Parts:R_0603_sm | C1, C2, C6 |
| 3 | 22 | Custom Parts:R_0603_sm | R1, R2, R3 |
| 3 | FUSE | Custom Parts:R_1210_SM | F1, F2, F3 |
| 3 | SPST | Custom Parts:SW_SPST_FSMSM_SM | SW1, SW2, SW3 |
| 2 | 120 | Custom Parts:R_0603_sm | R20, R21 |
| 2 | 220 | Custom Parts:Diode_0805_12_SM | FB1, FB2 |
| 2 | DB9 | Connect:DB9F_CI | J2, J3 |
| 2 | MCP25625 | Housings_SSOP:SSOP-28_5.3x10.2mm_Pitch0.65mm | U5, U6 |
| 2 | Matrix A | Connect:GS3 | JP1, JP6 |
| 2 | Matrix B | Connect:GS3 | JP2, JP7 |
| 2 | Matrix C | Connect:GS3 | JP3, JP8 |
| 2 | Matrix D | Connect:GS3 | JP4, JP9 |
| 2 | Matrix E | Connect:GS3 | JP5, JP10 |
| 2 | USB_OTG | Custom Parts:USB_Micro-B-DX4R005JJ2R1800 | P1, P2 |
| 1 | +5V_SRC | Socket_Strips:Socket_Strip_Straight_1x03 | J1 |
| 1 | 47U | Capacitors_Tantalum_SMD:TantalC_SizeA_EIA-3216_Reflow | C7 |
| 1 | 4K7 | Custom Parts:R_0603_sm | R9 |
| 1 | AT32UC3C | Housings_QFP:LQFP-64_10x10mm_Pitch0.5mm | U1 |
| 1 | AVR-AW-6 | Socket_Strips:Socket_Strip_Straight_2x03 | CON3 |
| 1 | AVR-JTAG-10 | Socket_Strips:Socket_Strip_Straight_2x05 | CON2 |
| 1 | BARREL_JACK | Custom Parts:RAPC722X | CON1 |
| 1 | BLUE | Custom Parts:Diode_0805_12 | D6 |
| 1 | DIAG Port | Socket_Strips:Socket_Strip_Straight_1x12 | P3 |
| 1 | FT232RL-SSOP | Housings_SSOP:SSOP-28_5.3x10.2mm_Pitch0.65mm | U2 |
| 1 | GREEN | Custom Parts:Diode_0805_12 | D5 |
| 1 | MC78M05CDT | Diodes_SMD:D-Pak_TO252AA | U3 |
| 1 | RED | Custom Parts:Diode_0805_12 | D4 |
| 1 | SMBJ16A | Diodes_SMD:SMB_Standard | D3 |
| 1 | SMF05 | Housings_SOT-23_SOT-143_TSOT-6:SC-70-6 | U4 |
| 1 | TXC | Custom Parts:TXC | X1 |
| 1 | WHITE | Custom Parts:Diode_0805_12 | D2 |
| 1 | YELLOW | Custom Parts:Diode_0805_12 | D1 |
The 75 most common of 80 parts.
More from PDXostc/canfw
3- 2 layers68 × 58 mm

- 2 layers68 × 44 mm

- 2 layers50.1 × 23.8 mm

Similar boards
- 2 layers87 × 71 mm

- 4 layers53.5 × 53 mm

- 2 layers46 × 36 mm

- 2 layers29.2 × 34.3 mm

- 2 layers109.5 × 74 mm

- 4 layers100 × 50 mm

AltReg CAN
Open-Source-Alternator-Regulator/alt-CAD
Support Files for the Alternator Regulator
156 parts - 2 layers

- 2 layers100 × 50 mm

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).