Skip to the content
PCBKitNew board
4 layers44 × 34 mmCansult, the printed circuit board in 3D

Nissan Consult (14pin) to CAN adapter

Size
44 × 34 mm
Copper layers
4
Thickness
1.6 mm
Parts
69
Nets
61
Pads
230
Tracks, vias
513, 164
Pours
10
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
23 Nov 2021
Updated
23 Apr 2026

Overview

Cansult is an open-source printed circuit board by irudoy, from the irudoy/cansult repository on GitHub, published under the MIT licence. It is a 4-layer board of 44 × 34 mm with 69 parts on 61 nets, routed with 513 tracks and 164 vias.

It is built around the STM32F103T6U6A, LMV358 and ESDCAN24-2BLY, with the X2016WV-06K-N0SN among its other parts. Its parts include 27 capacitors, 10 resistors, 6 ICs, 4 connectors and 3 diodes. It belongs with the interfaces and adapters boards and the STM32 boards of this library.

Main components

4

README

README.md

Nissan Consult (14pin) to CAN adapter

This project aims to translate the Nissan Consult protocol to CAN bus. It is based on the STM32F103 microcontroller and custom-made board. The adapter is both powered and communicates with the ECU through the 14-pin Consult connector.

CAN bus

Baud rate

500 Kbit/s

Frames payload

IDDLCByte 0Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7
0x6668BATTERY_VOLTAGECOOLANT_TEMPIGNITION_TIMINGLEFT_O2TPSAAC_VALVELEFT_AF_ALPHALEFT_AF_ALPHA_SELFLEARN
0x6678VEHICLE_SPEEDTACH_MSBTACH_LSBINJ_TIME_MSBINJ_TIME_LSBLEFT_MAF_MSBLEFT_MAF_LSB
0x6688BIT_1BIT_2DEVICE_VOLTAGEFirst DTC CodeHeartbeat

Data conversion (from Nissan Consult ECU register table)

CAN IDByteParameterFormulaUnits
0x6660Battery Voltageraw × 0.08V
0x6661Coolant Tempraw - 50°C
0x6662Ignition Timing110 - rawdeg BTDC
0x6663Left O2 Sensorraw × 10mV
0x6664TPSraw × 20mV
0x6665AAC Valveraw / 2%
0x6666Left AF Alpharaw%
0x6667Left AF Alpha Selflearnraw%
0x6670Vehicle Speedraw × 2km/h
0x6671-2Tachometer (RPM)(MSB×256 + LSB) × 12.5rpm
0x6673-4Injection Time(MSB×256 + LSB) / 100ms
0x6675-6Left MAF(MSB×256 + LSB) × 5mV
0x6680Digital Bit Register 1see bit tableflags
0x6681Digital Bit Register 2see bit tableflags
0x6682Device Voltageraw × 0.08V
0x6686First DTC Coderawcode
0x6687Heartbeatcounter—

Source: docs/Generic_Nissan_ECU_Sensor_or_Data_register_table_Ver_2.pdf

Diagnostics — primary (0x665)

Sent at 1 Hz. Bytes 1-3 are per-second rates (saturating at 255), bytes 4-6 are monotonic uint8_t counters that wrap. Byte 7 is a freshness indicator. FE+NE framing/noise rate isn't in this frame — derive it from the uart_fe and uart_ne u16 counters in 0x66B by diffing successive samples.

ByteContentNotes
0parser.state0=STARTUP, 1=INIT, 2=POST_INIT, 3=WAITING, 4=IDLE, 5=STREAMING
1ORE/sUART overrun rate, saturating u8
2implausible/sStream frames rejected by range check (see consult_parser_validate_stream)
3CAN TX fail/sCAN mailbox-full / TX-fail rate
4dma_restart_countDMA recovery events (monotonic u8)
5watchdog_timeout_count500ms streaming watchdog fires (monotonic u8)
6reconnect_countSTARTUP-state re-entries after first boot (monotonic u8)
7(ms_since_last_good_frame) >> 2In 4ms units, saturates at ≈1020ms

Diagnostics — extended (0x66B)

Sent at 1 Hz. Full-width counters and device state.

ByteContentNotes
0-1uart_fe_countFraming errors, u16 big-endian (monotonic)
2-3uart_ne_countNoise errors, u16 big-endian (monotonic)
4-5mcu_temp_c10Internal MCU temp, signed int16 big-endian, °C × 10
6can_recover_countBus-off / RESET / ERROR software recoveries (monotonic u8)
7mode_bit << 7 | hcan.StateBit 7 = 1 if ADAPTER mode, bits 0-6 = HAL CAN state (≤5)

Debug UART stream (0x669, 0x66A)

Raw UART bytes streamed as CAN frames. Off by default, toggled via CAN command.

IDDirectionDLCContent
0x669ECU → cansult (RX)1-8Raw bytes received from ECU
0x66Acansult → ECU (TX)1-8Raw bytes sent to ECU

Adapter mode command (0x66D)

Send to cansult to switch between normal streaming and BT pass-through. In ADAPTER mode the MCU releases PA9 (USART1_TX) to high-Z, powers the BC417 Bluetooth module via PA8, pauses the parser/watchdog/CAN stream, and lets the PC talk directly to the ECU over BT. 0x665 data and 0x66B diag keep ticking so the host sees the mode change.

Byte 0Action
0x00Exit ADAPTER, return to STREAM
0x01Enter ADAPTER (BT pass-through)
0x02Toggle

Debug command (0x66F)

Send to cansult to control debug stream:

Byte 0Action
0x00Disable debug stream
0x01Enable debug stream
0x02Toggle debug stream

Build & Flash

All commands run from firmware/. Toolchain paths (STM32CubeIDE, ST-Link GDB server) are pinned in the Makefile.

bash
make build        # Headless CubeIDE build
make test         # Host unit tests (Unity, 28 tests)
make flash        # Build + flash via ST-Link SWD
make reset        # Hardware reset via ST-Link

Debug

bash
make ocd-server   # OpenOCD GDB server on :3333
make ocd-status   # Reset, run 3s, halt, dump parser/DMA state
make ocd-dump     # Full state snapshot via GDB script
make gdb-read EXPRS="parser.state dmaRxReadPos"
make gdb-exec  SCRIPT=scripts/dump.gdb

CAN tools (requires python-can + PCAN)

bash
make can-monitor          # Live monitor, all cansult frames
make can-diag             # 0x665 + 0x66B diagnostics only
make can-capture          # Atomic N-second capture (CAN_DURATION=3)
make can-capture-diag     # Atomic capture: diagnostics only
make can-capture-debug    # Enable 0x669/0x66A debug stream + capture
make can-debug-on/off     # Toggle raw UART debug stream (0x66F)
make can-adapter-on/off   # Toggle BT pass-through ADAPTER mode (0x66D)

Hardware

  • STM32F103TBU6 — generates the 153.52 kHz Consult CLK on PB3 via TIM2_CH2 PWM
  • MCP2562 — CAN transceiver

Parts

69
QtyValueFootprintReferences
11100nCapacitor_SMD:C_0603_1608MetricC2, C5, C6, C8, C10, C11, C13, C14, C21, C26, C28
7TestPoint_Probelocal:KEYSTONE_5015TP1, TP2, TP3, TP4, TP5, TP6, TP7
51uCapacitor_SMD:C_0603_1608MetricC17, C19, C20, C24, C27
44K7Resistor_SMD:R_0603_1608MetricR2, R3, R4, R6
3SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP2, JP3, JP4
21KResistor_SMD:R_0603_1608MetricR5, R7
22N7002Package_TO_SOT_SMD:SOT-23Q1, Q2
230pCapacitor_SMD:C_0603_1608MetricC3, C4
247pCapacitor_SMD:C_0603_1608MetricC16, C18
28pCapacitor_SMD:C_0603_1608MetricC7, C12
2MountingHoleMountingHole:MountingHole_4mmH1, H2
1 120R BLM18PG121SN1DInductor_SMD:L_0603_1608MetricFB1
10603 CP06V5TR50 500mA 50VFuse:Fuse_0603_1608MetricF1
1100n/25VCapacitor_SMD:C_0603_1608MetricC25
110KResistor_SMD:R_0603_1608MetricR9
110MResistor_SMD:R_0603_1608MetricR8
110nCapacitor_SMD:C_0603_1608MetricC15
110uCapacitor_SMD:C_0603_1608MetricC9
1120Resistor_SMD:R_0603_1608MetricR10
116MHz 9pFCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY2
11nCapacitor_SMD:C_0603_1608MetricC1
11u/25VCapacitor_SMD:C_0603_1608MetricC23
14.9152 MHzCrystal:Crystal_HC49-4H_VerticalY1
16K8Resistor_SMD:R_0603_1608MetricR1
1BTConnector_JST:JST_GH_BM05B-GHS-TBT_1x05-1MP_P1.25mm_VerticalJ4
1Conn_01x02_PinConnector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ3
1DEBUGConnector:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_VerticalJ2
1ES3D-E3/57T, 3A 200VDiode_SMD:D_SMCD3
1ESDCAN24-2BLYPackage_TO_SOT_SMD:SOT-23D1
1LD1117S33TR_SOT223Package_TO_SOT_SMD:SOT-223-3_TabPin2U5
1LM78M05_TO252Package_TO_SOT_SMD:TO-252-2U6
1LMV358Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU1
1MC74HC4060ADTR2GPackage_SO:TSSOP-16_4.4x5mm_P0.65mmU2
1MCP2562-E-SNPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1SM6T36CAY DO-214AADiode_SMD:D_SMBD2
1STM32F103T6U6APackage_DFN_QFN:QFN-36-1EP_6x6mm_P0.5mm_EP4.1x4.1mmU4
1SolderJumper_3_OpenJumper:SolderJumper-3_P2.0mm_Open_TrianglePad1.0x1.5mm_NumberLabelsJP1
1X2016WV-06K-N0SNConnector_JST:JST_PH_B6B-PH-K_1x06_P2.00mm_VerticalJ1

Questions

How big is the Cansult PCB?

It measures 44 × 34 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Cansult use?

69 parts, built around the STM32F103T6U6A, LMV358, ESDCAN24-2BLY and X2016WV-06K-N0SN. 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 Cansult KiCad files?

From the irudoy/cansult repository on GitHub, at the commit this page was made from: the board is hardware/cansult.kicad_pcb and its schematic hardware/cansult.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Cansult design in my own project?

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

Similar boards

  • 4 layers94.4 × 72.8 mmRP2040 base, the printed circuit board in 3D

    RP2040 base

    Twisted-Fields/rp2040-motor-controller

    A dual channel brushless motor controller based on the RP2040 microcontroller, designed in Kicad.

    325 parts419
  • 6 layers76 × 46.4 mmRp2350 driver, the printed circuit board in 3D

    Rp2350 driver

    sequoia-hope/rp2350-motor-controller

    An RP2350 based brushless motor controller

    291 parts39
  • 4 layers25 × 25 mmLaserCAN Board, the printed circuit board in 3D

    LaserCAN Board

    GrappleRobotics/LaserCAN

    59 parts3GPL-3.0
  • 6 layers160 × 145 mmMes main board, the printed circuit board in 3D

    Mes main board

    jmh8231-Dev/mes-main-board

    STM32MP257 Embedded Main Board

    736 parts3
  • 2 layers50 × 100 mmParrot imu, the printed circuit board in 3D

    Parrot imu

    LucienMorey/parrot_imu

    This design will host an IMU board for the Parody tripedal robotic platform. It will expose connect an IMU to the teensy 4.1 microcontroller with the ability to deliver this data over CAN bus and over an ethernet…

    29 parts3MIT
  • 2 layers59 × 22 mmCANberry, the printed circuit board in 3D

    CANberry

    joshajohnson/car-hacking

    A repo for assorted tools, projects, and documentation.

    86 parts2
  • 2 layers68.5 × 53.5 mmSteering wheel TX, the printed circuit board in 3D

    Steering wheel TX

    repmanga/steering_wheel

    This is PCB file of multisteering wheel for ECUmaster EMU black ECU

    128 parts1MIT
  • 4 layers100 × 75 mmESC rev0, the printed circuit board in 3D

    ESC rev0

    AndyBritoS/DC_Motor_Controller

    DC Motor Controller PCB Project files

    175 parts