

Adapter
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
3PIC16F18326-I/P
PDIP-14-40℃~+85℃ 10bit 12 2.3V~5.5V 256Byte 28KB 2KB 32MHz 5bit 8 Bit Built-in FLASH PIC Power-on reset (POR)、Undervoltage detection (BOR/LVD/LVR/LVI)、Watchdog reset、Built-in general-purpose timer、Stack overflow reset PDIP-14 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)MCP2561-E/P
PDIP-8-40℃~+125℃ 1 15uA 1Mbps 4.5V~5.5V 45mA CAN Transceiver PDIP-8 CAN Transceivers ROHSMicrochip TechnologyCAN TransceiversMCP2515-I/P
PDIP-18-40℃~+85℃ 1Mbps 1uA 2.7V~5.5V 5mA CAN Controller SPI PDIP-18 CAN Controllers ROHSMicrochip TechnologyCAN Controllers
README
README.mdIoT with CAN bus

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:

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
| Parameter | Value | Note |
|---|---|---|
| PIC16F1 MCU clock | 32MHz(Internal OSC 8MHz * 4 PLL) | |
| UART baud rate | 9600bps (fixed) | Full-duplex wire-rate is not supported |
| SPI clock | 2MHz (fixed) | |
| CAN speed | Max. 250kHz (default 125kHz) | |
| Oscillator for CAN controller | 8MHz (ceramic) | Murata Ceralock |
| Expansion board | 8 pins connected to PIC MCU |
Circuit

PCB

BOM
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.
/// 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]: @hFor example, to receive messages with SID 5, 10 and 15, set masks and filters to the CAN adapter as follows:
@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
- Microchip MPLAB-X IDE with MCC plugin.
- FreeCAD
- KiCAD
- 3D printer BIQU Magician
- RaspberryPi
Development plan and progress
M1 (completed on March 17, 2018)

- 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:

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



M2 (completed on April 1, 2018)

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.

Reference
Datasheet (Microchip/NXP/Murata)
Microchip
NXP
Murata
Parts
30| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 0.1u | can-bus:Capacitor_2.54mm | C1, C2, C3, C5 |
| 2 | 250mA | can-bus:Polyswitch_Tyco | F1, F2 |
| 2 | Jumper | can-bus:Jumper_1x2 | JP1, JP2 |
| 2 | Pin socket | can-bus:PinSocket_1x4 | J2, J3 |
| 1 | 10k | can-bus:Resistor_FaithfulLink_CF25 | R3 |
| 1 | 120 | can-bus:Resistor_FaithfulLink_CF25 | R1 |
| 1 | 1A | can-bus:Diode | D1 |
| 1 | 1k | can-bus:Resistor_FaithfulLink_CF25 | R5 |
| 1 | 47u | can-bus:Capacitor_2.54mm | C4 |
| 1 | 51k | can-bus:Resistor_FaithfulLink_CF25 | R2 |
| 1 | CAN0 | can-bus:PinHeader_1x2_L_Shape | J4 |
| 1 | CAN1 | can-bus:PinHeader_1x2_L_Shape | J5 |
| 1 | Ceralock 8MHz | can-bus:Ceralock_Murata | Y1 |
| 1 | ICSP | can-bus:PinSocket_1x6 | J6 |
| 1 | LED | can-bus:Led | D3 |
| 1 | MCP2515-I/P | can-bus:IC_socket_18pins | U3 |
| 1 | MCP2561-E/P | can-bus:IC_Socket_8pins | U2 |
| 1 | PIC16f18326-I/P | can-bus:IC_socket_14pins | U1 |
| 1 | Pin header | can-bus:PinHeader_1x4_L_Shape | J1 |
| 1 | SW | can-bus:TactileSwitch | Reset |
| 1 | regulator | can-bus:TA48M05F | U4 |
| 1 | terminal | can-bus:Terminal_PhoenixContact_2P | J7 |
The 28 most common of 30 parts.
More from araobp/can-bus
1- 2 layers10.7 × 20.8 mm

Similar boards
- 2 layers50 × 50 mm

Circuits
mocketech/EmoGo
A Go game system that conveys the state of Go stones through facial expressions
19 parts1MIT - 2 layers100 × 100 mm

- 2 layers107.7 × 85.1 mm

Ccd can bridge
xerootg/CAN-CCD_bus
Implements a CAN translator to CCD via a Intersil CDP68HC68S1
86 parts12 - 4 layers72 × 78.5 mm

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 mm

Obd2
kevinkrieger/CAN
CAN repository containing my CAN project, kicad files, firmware, datasheets, references, etc.
64 parts3 - 2 layers24 × 27.9 mm

- 2 layers50 × 50 mm

Boards.design lecture
Gonke0606/Personal_production_circuit
This repository is for my personal production of circuit.
61 parts - 2 layers178 × 107.3 mm

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