
Candrive
Andreasdahlberg/CANDriveHW
CANDrive is a brushed DC Motor Controller controlled via a CAN interface.

CANDrive is a brushed DC Motor Controller controlled via a CAN interface.
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.
CANDrive is a brushed DC Motor Controller controlled via a CAN interface.
This project is hosted on GitHub. You can clone this project directly using this command:
git clone --recurse-submodules https://github.com/Andreasdahlberg/CANDrive.gitscons build-opencm
scons buildRun all tests with valgrind:
scons testRun a single test suite:
scons app/motor/test && build/motor/test/TestRunnerRun a single unit test:
scons app/motor/test && build/motor/test/TestRunner test_Motor_SetSpeedThe 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.

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.
rpm [MOTOR_INDEX] [RPM]
Ex.
CANDrive> rpm 0 50current [MOTOR_INDEX] [CURRENT]
Ex.
CANDrive> current 1 1500run [MOTOR_INDEX]
Ex.
CANDrive> run 0coast [MOTOR_INDEX]
Ex.
CANDrive> coast 0brake [MOTOR_INDEX]
Ex.
CANDrive> brake 0reset
Ex.
CANDrive> resetlevel [MODULE] [LEVEL]
Ex.
CANDrive> level App 10store [PARAMETER] [VALUE]
Ex.
CANDrive> store number_of_motors 1| Qty | Value | Footprint | References |
|---|---|---|---|
| 13 | 1K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R4, R5, R7, R10, R11, R20, R24, R25, R27, R28, R31, R32 |
| 6 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C8, C10, C11, C12, C13, C14 |
| 4 | 0.1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C6, C9, C16, C17 |
| 4 | 10K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2, R18, R19, R22 |
| 4 | 22 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R14, R15, R16, R17 |
| 4 | 2K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R8, R9, R29, R30 |
| 2 | 1K5 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R3, R23 |
| 2 | 1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C19, C20 |
| 2 | 220uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C2, C4 |
| 2 | 33n | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C3 |
| 2 | 47K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R6, R26 |
| 2 | 68uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C15, C18 |
| 2 | Conn_01x06_Male | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Horizontal | J2, J6 |
| 2 | Conn_01x06_Male | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J3, J4 |
| 2 | LED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D1, D2 |
| 2 | Polyfuse | Fuse:Fuse_Bourns_MF-RHT300 | F1, F2 |
| 2 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mm | JP1, JP2 |
| 2 | VNH7070BASTR | andreas:VNH7070BASTR | U4, U5 |
| 1 | 100uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C7 |
| 1 | 100uH | Inductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolder | L1 |
| 1 | 120 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R33 |
| 1 | 1k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R13 |
| 1 | 2.7K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R21 |
| 1 | 3.3V | TestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mm | TP3 |
| 1 | 510 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R12 |
| 1 | 5V | TestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mm | TP2 |
| 1 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | BC546 | Package_TO_SOT_THT:TO-92_Inline | Q2 |
| 1 | CDBA3100-HF | Diode_SMD:D_SMA | D3 |
| 1 | Conn_01x02_Male | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Horizontal | J1 |
| 1 | Conn_01x03_Male | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Horizontal | J5 |
| 1 | ENCEN | TestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mm | TP4 |
| 1 | FerriteBead | Ferrite_THT:LairdTech_28C0236-0JW-10 | FB1 |
| 1 | LD1117S33TR_SOT223 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | MAX5035BUSA | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U6 |
| 1 | SN65HVD234 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U3 |
| 1 | STM32F103RBTx | Package_QFP:LQFP-64_10x10mm_P0.5mm | U1 |
| 1 | SW_Push | Button_Switch_SMD:SW_Push_1P1T_NO_CK_KSC6xxJ | SW1 |
| 1 | VCC | TestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mm | TP1 |
It measures 96 × 42.2 mm and has 4 copper layers, 4.69 mm thick.
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.
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.
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).

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

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





