Skip to the content
PCBKitNew board
4 layers96 × 42.2 mmCANDrive, the printed circuit board in 3D

CANDrive is a brushed DC Motor Controller controlled via a CAN interface.

Size
96 × 42.2 mm
Copper layers
4
Thickness
4.69 mm
Parts
80
Nets
101
Pads
281
Tracks, vias
0, 0
Pours
1
Routed
Not yet
KiCad
KiCad 6 (file 20211014)
Created
2 Mar 2021
Updated
15 Jul 2026

Overview

CANDrive is an open-source printed circuit board by Andreasdahlberg, from the Andreasdahlberg/CANDrive repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 96 × 42.2 mm with 80 parts on 101 nets.

It is built around the SN65HVD234D, MAX5035BUSA+T and AO3401A, with the BC546 and CDBA3100-HF among its other parts. Its parts include 33 resistors, 19 capacitors, 6 ICs, 6 connectors and 3 diodes. It belongs with the robots and motor control and interfaces and adapters boards and the STM32 boards of this library.

Main components

5

README

README.md

CANDrive CI Quality Gate Status Coverage

CANDrive

CANDrive is a brushed DC Motor Controller controlled via a CAN interface.

Features

  • Velocity control
  • Torque control
  • CAN interface
  • Firmware updates over CAN
  • Emergency stop
  • 5 A output current
  • 12-24 V supply voltage

Getting started

Getting the Source

This project is hosted on GitHub. You can clone this project directly using this command:

text
git clone --recurse-submodules https://github.com/Andreasdahlberg/CANDrive.git

Building

text
scons build-opencm
scons build

Running Tests

Run all tests with valgrind:

text
scons test

Run a single test suite:

text
scons app/motor/test && build/motor/test/TestRunner

Run a single unit test:

text
scons app/motor/test && build/motor/test/TestRunner test_Motor_SetSpeed

Tools

Monitor

The monitor tool is a serial terminal which parses serial output from the device and formats the output to make it easier to read. It also incorporates a simple command line used for debug commands and device configuration. The debug commands are not intended for controlling the motors during normal operation since they bypass several of the safety features.

Features
  • Host timestamps
  • Color coded debug levels
  • Translation from addresses to file and line
  • Command line
  • Filtering[Not implemented]

Example of monitor output

Usage

The monitor is started by typing scons monitor. Serial port and baudrate can be configured here or on the command line, e.g. scons monitor SERIAL_PORT=/dev/ttyACM0 BAUD_RATE=921600

The serial port used by the monitor is available at JP1 and is disabled by default. It can be enabled by moving jumper J1.

Available commands
rpm

rpm [MOTOR_INDEX] [RPM]

Ex.

text
CANDrive> rpm 0 50
current

current [MOTOR_INDEX] [CURRENT]

Ex.

text
CANDrive> current 1 1500
run

run [MOTOR_INDEX]

Ex.

text
CANDrive> run 0
coast

coast [MOTOR_INDEX]

Ex.

text
CANDrive> coast 0
brake

brake [MOTOR_INDEX]

Ex.

text
CANDrive> brake 0
reset

reset

Ex.

text
CANDrive> reset
level

level [MODULE] [LEVEL]

Ex.

text
CANDrive> level App 10
store

store [PARAMETER] [VALUE]

Ex.

text
CANDrive> store number_of_motors 1

Hardware

BOM

Parts

80
QtyValueFootprintReferences
131KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R4, R5, R7, R10, R11, R20, R24, R25, R27, R28, R31, R32
6100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8, C10, C11, C12, C13, C14
40.1uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6, C9, C16, C17
410KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R18, R19, R22
422Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR14, R15, R16, R17
42KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR8, R9, R29, R30
21K5Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3, R23
21uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC19, C20
2220uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC2, C4
233nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C3
247KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6, R26
268uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC15, C18
2Conn_01x06_MaleConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_HorizontalJ2, J6
2Conn_01x06_MaleConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ3, J4
2LEDLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD1, D2
2PolyfuseFuse:Fuse_Bourns_MF-RHT300F1, F2
2SolderJumper_2_BridgedJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP1, JP2
2VNH7070BASTRandreas:VNH7070BASTRU4, U5
1100uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC7
1100uHInductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolderL1
1120Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR33
11kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR13
12.7KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR21
13.3VTestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mmTP3
1510Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR12
15VTestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mmTP2
1AO3401APackage_TO_SOT_SMD:SOT-23Q1
1BC546Package_TO_SOT_THT:TO-92_InlineQ2
1CDBA3100-HFDiode_SMD:D_SMAD3
1Conn_01x02_MaleConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_HorizontalJ1
1Conn_01x03_MaleConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_HorizontalJ5
1ENCENTestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mmTP4
1FerriteBeadFerrite_THT:LairdTech_28C0236-0JW-10FB1
1LD1117S33TR_SOT223Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1MAX5035BUSAPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU6
1SN65HVD234Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1STM32F103RBTxPackage_QFP:LQFP-64_10x10mm_P0.5mmU1
1SW_PushButton_Switch_SMD:SW_Push_1P1T_NO_CK_KSC6xxJSW1
1VCCTestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mmTP1

Questions

How big is the CANDrive PCB?

It measures 96 × 42.2 mm and has 4 copper layers, 4.69 mm thick.

What parts does the CANDrive use?

80 parts, built around the SN65HVD234D, MAX5035BUSA+T, AO3401A and BC546. 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 CANDrive KiCad files?

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

Can I use the CANDrive 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).

Similar boards

  • 4 layers96 × 42.2 mmCandrive, the printed circuit board in 3D

    Candrive

    Andreasdahlberg/CANDriveHW

    CANDrive is a brushed DC Motor Controller controlled via a CAN interface.

    70 partsCC0-1.0
  • 2 layers191.3 × 181.7 mmIO Card G3, the printed circuit board in 3D

    IO Card G3

    PerMalmberg/IO-Card-G3

    This is my custom I/O card, third generation. Main purpose is to serve as an alarm system.

    400 parts7MIT
  • 2 layers156.2 × 187.5 mmIO Card G2, the printed circuit board in 3D

    IO Card G2

    PerMalmberg/IO-Card-G2

    I/O card, generation 2

    232 partsMIT
  • 4 layers254.9 × 150.1 mmWomo, the printed circuit board in 3D

    Womo

    muccc/WomoLIN

    Open Source Steuerung von LIN Bus Geräten im Caravan Bereich.

    534 parts84GPL-3.0
  • 4 layers50 × 50 mmGD32 SPINE, the printed circuit board in 3D

    GD32 SPINE

    zbwu/GD32_SPINE

    38 parts2MIT
  • 4 layers373.1 × 220.9 mmSolarpump, the printed circuit board in 3D

    Solarpump

    rivimey/solarpump

    Solar powered pump for allotment garden water supply

    450 parts1