Skip to the content
2 layers47.6 × 36.8 mmAdapter, the printed circuit board in 3D

CAN adapter to UART

Size
47.6 × 36.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
30
Nets
36
Pads
104
Tracks, vias
196, 17
Pours
1
Routed
Yes
KiCad
KiCad 4
Created
10 Mar 2018
Updated
10 Nov 2021

Overview

Adapter is an open-source printed circuit board by araobp, from the araobp/can-bus repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 47.6 × 36.8 mm with 30 parts on 36 nets, routed with 196 tracks and 17 vias.

It is built around the PIC16F18326-I/P, MCP2561-E/P and MCP2515-I/P. Its parts include 7 connectors, 5 capacitors, 4 resistors, 4 ICs and 2 diodes. It belongs with the interfaces and adapters and home automation and IoT boards and the PIC boards of this library.

Main components

3

README

README.md

IoT with CAN bus

pcb_ed

Printed circuit design for CAN node

(I have not tested the printed circuit board yet, because I have been too busy in other priority works)

Motivation

I want to develop very cheap and low power sensor/actuator network with electronic parts sold in Akizuki-Denshi, Tokyo.

Most of parts I use are DIP.

Architecture

Basic concept

I pursue seamless communications between CAN-bus and MQTT-bus:

concept

Specification

The CAN node consists of one base board and one expansion board.

See this page for expansion boards: EXPANSION BOARDS.

CAN node base board

ParameterValueNote
PIC16F1 MCU clock32MHz(Internal OSC 8MHz * 4 PLL)
UART baud rate9600bps (fixed)Full-duplex wire-rate is not supported
SPI clock2MHz (fixed)
CAN speedMax. 250kHz (default 125kHz)
Oscillator for CAN controller8MHz (ceramic)Murata Ceralock
Expansion board8 pins connected to PIC MCU
Circuit

Circuit

PCB

pcb

BOM
Part                    Akizuki-denshi URLPrice in YenQuantity
Microchip PIC16F1825-I/Phttp://akizukidenshi.com/catalog/g/gI-10656/1501
Microchip PIC16F18326-I/Phttp://akizukidenshi.com/catalog/g/gI-11886/1301
Microchip MCP2515http://akizukidenshi.com/catalog/g/gI-12030/1601
Microchip MCP2561http://akizukidenshi.com/catalog/g/gI-12483/901
Murata Ceralock 8MHz    http://akizukidenshi.com/catalog/g/gP-00153/351
Regiter 51k ohmhttp://akizukidenshi.com/catalog/g/gR-25513/11
Register 10k ohmhttp://akizukidenshi.com/catalog/g/gR-25103/11
Register 120 ohm        http://akizukidenshi.com/catalog/g/gR-25121/11
Murata capacitor 0.1 micro Fhttp://akizukidenshi.com/catalog/g/gP-00090/103
Diode 1A                http://akizukidenshi.com/catalog/g/gI-08332/101
Toshiba TA48M05F (w/ capacitors)http://akizukidenshi.com/catalog/g/gI-00451/1001
Polyswitch 250mA        http://akizukidenshi.com/catalog/g/gP-01354302
LED 3mm redhttp://akizukidenshi.com/catalog/g/gI-04780/201
Tactile switch            http://akizukidenshi.com/catalog/g/gP-08216/201
IC sockets 14pins        http://akizukidenshi.com/catalog/g/gP-00006/101
IC sockets 18pinshttp://akizukidenshi.com/catalog/g/gP-00008/101
IC sockets 8pinshttp://akizukidenshi.com/catalog/g/gP-00017/101
Pin socket 6pinshttp://akizukidenshi.com/catalog/g/gC-03784/201
Pin socket 4pins        http://akizukidenshi.com/catalog/g/gC-10099/202
Pin header L shape      http://akizukidenshi.com/catalog/g/gC-01627/501
Phenix Contact terminal block 2Phttp://akizukidenshi.com/catalog/g/gP-08369/201

CAN Standard Identifier format

This implementation supports CAN Standard Frame only (does not support Extended Frame). For home networking, 11bit Standard Identifier suffices.

=> FORMAT

"CAN adapter to UART" command list

This implementation supports CAN adapter functionality for PC and Android.

text
/// UART2CAN HELP (version 0.11  March 19, 2018) ///
[Set standard identifier] @i<standard identifier>
[Set output mode] {debug: @vd, verbose: @vv, normal: @vn}
[Enable operation mode] {loopback: @ol, normal: @on}
     with SID: @ols or @ons
[Set mask] @m<n><mask(SID10 ~ SID0)>
[Set filter] @f<n><filter(SID10 ~ SID0)>
[Set baud rate] @b<bpr>
[Abort all pending transmissions] @a
[Dump masks and filters] @F
[Dump registers] @D
[Send message] <message>
[Send message beginning with '@' character] @<@message>
[Receive message] <message> will be output
[Show this help]: @h

For example, to receive messages with SID 5, 10 and 15, set masks and filters to the CAN adapter as follows:

text
@m02047  --> RXM0 0b11111111111
@f05     --> RXF0 0b00000000101 (SID 5 message to RXB0)
@f110    --> RXF1 0b00000001010 (SID 10 message to RXB0)
@m12047  --> RXM1 0b11111111111
@f215    --> RXF2 0b00000001111 (SID 15 message to RXB1)

Development environment


Development plan and progress

M1 (completed on March 17, 2018)

board

  • Purchased CAN adaptors from Amazon.
  • Evaluate CAN ==> EVALUATION.
  • Developed my original ASCII-based protocol over serial for MCP2515. The protocol is mainly for evaluating MCP2515.

At first, I use this universal board to make a prototype of the CAN adaptor:

universal board

I have finished the first prototype (Marth 25-27, 2018). I have made three boards, and it took eight hours.

front

back

daisy_chain

M2 (completed on April 1, 2018)

3d_printed

3D printed enclosure for CAN node

  • Purchase three pairs of MCP2515 and MCP2561 in Akihabara.
  • Develop my original CAN adaptor board.
  • Develop CAN-MQTT gateway on RasPi and OpenWrt.
  • Develop a 3D-printed DIN rail enclosure for the board by using FreeCAD.
  • Mount all of them on DIN rail (incl. RasPi).
  • Add SLCAN that is ASCII-based protocol for SocketCAN.

M3

  • Evaluate PIC16F18326 that is cheaper than PIC16F1825 and supports two MSSPs.
  • Use KiCAD to redesign the circuit for PIC16F18326.
  • Adopt moduler architecture: base board and sensor/actuator building blocks.
  • Support sensors and actuators: doppler sensor, CdS, servo motor etc.

requirements


Reference

Datasheet (Microchip/NXP/Murata)

Microchip
NXP
Murata

Parts

30
QtyValueFootprintReferences
40.1ucan-bus:Capacitor_2.54mmC1, C2, C3, C5
2250mAcan-bus:Polyswitch_TycoF1, F2
2Jumpercan-bus:Jumper_1x2JP1, JP2
2Pin socketcan-bus:PinSocket_1x4J2, J3
110kcan-bus:Resistor_FaithfulLink_CF25R3
1120can-bus:Resistor_FaithfulLink_CF25R1
11Acan-bus:DiodeD1
11kcan-bus:Resistor_FaithfulLink_CF25R5
147ucan-bus:Capacitor_2.54mmC4
151kcan-bus:Resistor_FaithfulLink_CF25R2
1CAN0can-bus:PinHeader_1x2_L_ShapeJ4
1CAN1can-bus:PinHeader_1x2_L_ShapeJ5
1Ceralock 8MHzcan-bus:Ceralock_MurataY1
1ICSPcan-bus:PinSocket_1x6J6
1LEDcan-bus:LedD3
1MCP2515-I/Pcan-bus:IC_socket_18pinsU3
1MCP2561-E/Pcan-bus:IC_Socket_8pinsU2
1PIC16f18326-I/Pcan-bus:IC_socket_14pinsU1
1Pin headercan-bus:PinHeader_1x4_L_ShapeJ1
1SWcan-bus:TactileSwitchReset
1regulatorcan-bus:TA48M05FU4
1terminalcan-bus:Terminal_PhoenixContact_2PJ7

The 28 most common of 30 parts.

More from araobp/can-bus

1
  • 2 layers10.7 × 20.8 mmThermistor, the printed circuit board in 3D

    Thermistor

    araobp/can-bus

    CAN adapter to UART

    4 parts12GPL-3.0

Similar boards

  • 2 layers50 × 50 mmCircuits, the printed circuit board in 3D

    Circuits

    mocketech/EmoGo

    A Go game system that conveys the state of Go stones through facial expressions

    19 parts1MIT
  • 2 layers100 × 100 mmCANBuster, the printed circuit board in 3D

    CANBuster

    GBert/misc

    miscellaneous stuff / unsorted

    182 parts99
  • 2 layers107.7 × 85.1 mmCcd can bridge, the printed circuit board in 3D

    Ccd can bridge

    xerootg/CAN-CCD_bus

    Implements a CAN translator to CCD via a Intersil CDP68HC68S1

    86 parts12
  • 4 layers72 × 78.5 mmDashSight Mezzanine Card, the printed circuit board in 3D

    DashSight Mezzanine Card

    DashSight/Pine64-Mezzanine-Card

    A PineA64 mezzanine card for adding support to communicate with a vehicle's OBD2 port, obtain GPS location and determine acceleration, designed in KiCAD

    88 parts3
  • 2 layers80 × 49 mmObd2, the printed circuit board in 3D

    Obd2

    kevinkrieger/CAN

    CAN repository containing my CAN project, kicad files, firmware, datasheets, references, etc.

    64 parts3
  • 2 layers24 × 27.9 mmCanankaFEC, the printed circuit board in 3D

    CanankaFEC

    medo64/CanankaFEC

    CAN bus framework expansion card.

    28 parts2MIT
  • 2 layers50 × 50 mmBoards.design lecture, the printed circuit board in 3D

    Boards.design lecture

    Gonke0606/Personal_production_circuit

    This repository is for my personal production of circuit.

    61 parts

Questions

How big is the Adapter PCB?

It measures 47.6 × 36.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Adapter use?

30 parts, built around the PIC16F18326-I/P, MCP2561-E/P and MCP2515-I/P. 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 Adapter KiCad files?

From the araobp/can-bus repository on GitHub, at the commit this page was made from: the board is KiCAD/circuit/adapter.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Adapter design in my own project?

Its repository publishes it under the GPL-3.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).