

MCU Board
This is an STM32F042K6T6 based board that can be used to build sensors that communicate over a CAN bus
- Size
- 50.8 × 68.6 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 26
- Nets
- 40
- Pads
- 121
- Tracks, vias
- 199, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 30 Jul 2023
- Updated
- 1 Jun 2024
Overview
MCU Board is an open-source printed circuit board by caipiblack, from the caipiblack/STM32-CAN-Bus-board repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 50.8 × 68.6 mm with 26 parts on 40 nets, routed with 199 tracks and 0 vias.
It is built around the SN65HVD230D, MC34063AD and SM24CANB-02HTG, with the SMAJ33CA and SMAJ4750A-TP among its other parts. Its parts include 6 connectors, 5 capacitors, 5 resistors, 5 diodes and 2 ICs. It belongs with the interfaces and adapters and microcontroller boards boards of this library.
Main components
5SN65HVD230D
SOIC-8-40℃~+85℃ 1 17mA 1Mbps 370uA 3V~3.6V CAN Transceiver Low-power mode、Wake-up function、ESD protection、Thermal shutdown protection、Bus fault protection、Hot-swap protection SOIC-8 CAN Transceivers ROHSTexas InstrumentsCAN TransceiversMC34063AD
SOIC-80℃~+70℃@(TA) 1 1.25V~40V 1.5A 100kHz 3V~40V Adjustable Boost、Buck Buck、Boost Built-in No SOIC-8 DC-DC Converters ROHSonsemiDC-DC ConvertersSM24CANB-02HTG
SOT-23100nA 10A@8/20us 24V 26.7V 30pF 500W@8/20us 50V IEC 61000-4-2、IEC 61000-4-5 TVS SOT-23 ESD and Surge Protection (TVS/ESD) ROHSLittelfuseESD And Surge Protection (TVS/ESD)SMAJ33CA
DO-214AC(SMA)-65℃~+150℃ 1uA 33V 40.6V 400W@10/1000us 53.3V 7.5A Bidirectional TVS DO-214AC(SMA) ESD and Surge Protection (TVS/ESD) ROHSMDDESD And Surge Protection (TVS/ESD)SMAJ4750A-TP
SMA(DO-214AC)-65℃~+150℃ 1 Independent 1W 27V 35Ω 5uA@20.6V ±5% SMA(DO-214AC) Zener Diodes ROHSMicro Commercial ComponentsZener Diodes
README
README.mdSTM32-CAN-Bus-board
CAN Bus shield with external power supply (12V/24V) for NUCLEO-L432KC board.
All the pins of the NUCLEO-L432KC board are available on the connectors of the shield.
The available pins provide many peripherals (ADC, SPI, I2C, GPIO and more) that can be used for many projects (IOT sensors, security sensors, automation...)

Hardware
This part describe how the schematic was made, how to mount the PCB and how to test it.
IMPORTANT: This shield require some modifications on the Nucleo board to works (due to external supply) (see after)
Kicad project
The Kicad project as been created with the version 8.0.1 of Kicad.
Most of the symbols and footprints comes from the default libraries.
The custom footprints are stored in the custom folder near the Kicad project.
Setup Kicad on Ubuntu 24.04:
sudo add-apt-repository ppa:kicad/kicad-8.0-releases
sudo apt update
sudo apt install kicadThe last production files are stored in the directory hardware/rev_a/fab.
Configuration of the NUCLEO-L432KC board
Some modifications are required to be able to power the Nucleo board from external 3V3 regulator (provided by the shield):
- Remove the jumper!
- Remove SB9.
- Remove SB14.
After these changes:
- The 3V3 power for the STM32 will be provided by "external power source" (the shield).
- The debug/flash side of Nucleo board will not be powered by the "external power source" (the shield).
- To flash or debug the Nucleo board, the Nucleo board must be connected by USB to the computer (The St-Link chip will be powered by 5V>3V regulator in the Nucleo board) AND the 3V3 power must be supplied by the shield (to power the STM32 chip).
PCB mounting instructions

Mount the components on the board:
- Take the PCB and fix it to the table.
- Put solder past on all CMS pads.
- Configure your hot air machine with something like this:
- Speed: 3/8.
- Temperature: 300°C.
- Solder the CMS components in this order: D4, D6, D1, D5, D2, U2, U3.
- Solder the other components in this order: C1, C10, C4, R4, R2, R6, R3, R5, F1, Jumper, C6, C5, L1.
- Mount the
NUCLEO-L432KCboard in the headers and solder the headers to the PCB (Doing it like this prevent issues with headers that are not perfectly vertical or parallel). - Remove the nucleo board from the soldered headers.
PCB testing instructions
Testing instructions:
- Remove the
NUCLEO-L432KCboard from the headers. - Power on the board with laboratory power supply configured at 12V with current limited to 50mA.
- At this point the power consumption (on 12V line) should be less than 10mA.
- Measure the voltage in the 3V3 pin and check that the voltage is around 3.3V.
- If the previous tests pass, turn off the power and plug the
NUCLEO-L432KCboard in the headers then turn on the power.- At this point the power consumption (on 12V line) should be less than 10mA.
- If the previous tests pass, connect the
NUCLEO-L432KCboard to the computer and flash it with the template project. - Test the CAN interface:
- Plug a USB<>CAN device from a Linux computer to the board.
- On the computer, execute these commands:
sudo apt-get install can-utils
sudo modprobe vcan
sudo ip link add dev can0 type vcan
sudo ip link set up can0 type can bitrate 250000
candump -td -a can0- Reset the board
- On the
candumpyou should see something like this:
(000.000000) can0 71D [1] 00 '.'Software
This repository comes with a demo software in the software directory: This software act like a CANopen node and permits to control the LED of the NUCLEO-L432KC board.
This guide also describe how to create a project from scratch for the STM32-CAN-Bus-board board.
The LED can be controlled by writing in the object at index 0x6001. (See examples at CANopenLinux section).
Tools setup
- Download and install
STM32CubeIDEfrom here - (Optional) Download and install
STM32CubeProgfrom here. (This tool can be used to only flash theNUCLEO-L432KCboard without the IDE)
Compatibility issues of STM32CubeIDE with Ubuntu 24.04
There are issues with STM32CubeIDE on Ubuntu 24.04 because it has a dependecy to libncurses5 and this is not available with this version of Ubuntu.
This dependency is required by the arm-none-eabi-gdb provided by ST.
To resolve the problem:
- Install the generic linux version of
STM32CubeIDEinstead of the version from.deb(as it will not check the dependency). - Install
arm-none-eabi-gdborgdb-multiarchand create a link to providearm-none-eabi-gdb:
sudo apt install gdb-multiarch
sudo ln -s /usr/bin/gdb-multiarch /usr/bin/arm-none-eabi-gdb- In your project configuration
Project Properties -> C/C++ Build -> Environment -> PATHadd/usr/binat the first place to usearm-none-eabi-gdbprovided by/usr/bininstead of ST directories.
Create a project from scratch
Base project creation:
- Open
STM32CubeIDE. - Press
File > New > STM32 Project. - Press
Board Selector. - Search
Commercial Part NumberwithNUCLEO-L432KC, then select it and press Next - Specify the
Project NameandLocation, then pressFinish. - Configure the peripheral in defaults state and open the configuration tool (or open
.iocfile). - Change the configuration of
PA0toReset_Stateas we don't have MCO clock source when theNUCLEO-L432KCis externaly powered from 3V3 (because MCO comes from the St-Link chip and it is not powered in this situation). - In
Clock Configuration:
- Select
System Clock Muxto usePLLCLK - Select
PLL Source MuxtoMSI - Configure the PLL with
X48and/4to get 48Mhz in SYSCLK and APBs
For the integration of CANopenNode stack see the README of CanOpenSTM32:
- From configuration tool configure the CAN interface:
- Activate
CAN1 - Activate all the interrupts of
CAN1 - Enable
Automatic Bus-Off Management - Enable
Automatic Wake-Up Mode - Enable
Automatic Retransmission - Configure the Bit timing parameters, you can use this generator. The clock for
CAN1isAPB1(datasheet). In my case with a clock of 48Mhz and desired bitrate of 250Kbit/s I set:- Prescaler: 12
- Time Quanta in Bit Segment 1: 13 Times
- Time Quanta in Bit Segment 2: 2 Times
- From configuration tool configure a timer for
CANopenNodestack:
- Activate
TIM16 - Enable the interrupt of
TIM16 - Configure
TIM16to get 1ms. Note thatTIM16useAPB2clock. In my case with a clock of 48Mhz I set:- Prescaler (PSC - 16 bits value): 48-1
- Counter Period (AutoReload Register - 16 bits value ): 1000-1
- Clone
CanOpenSTM32somewhere in your computer see here - Take
CANopenNodeandCANopenNode_STM32directories from the cloned repo and copy that in your project (from the IDE) - Add
CANopenNodeandCANopenNode_STM32toSource locationsinProject Properties -> C/C++ General -> Paths and Symbols -> Source Locations. Then add an exclusion filter forexample/folder forCANopenNodefolder - Add
CANopenNodeandCANopenNode_STM32toProject Properties -> C/C++ General -> Paths and Symbols -> IncludesunderGNU Citems - In your
main.c, add#include "CO_app_STM32.h":
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "CO_app_STM32.h"
/* USER CODE END Includes */- In the
main.cfile, callcanopen_app_interrupt()when the timer ticks at 1ms:
/* USER CODE BEGIN 4 */
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
// Handle CANOpen app interrupts
if (htim == canopenNodeSTM32->timerHandle) {
canopen_app_interrupt();
}
}
/* USER CODE END 4 */- In the
main.cfile, configure theCANopenNodestack and call thecanopen_app_process()function in the main loop:
int main(void)
{
// ...
/* Initialize all configured peripherals */
// ...
/* USER CODE BEGIN 2 */
CANopenNodeSTM32 canOpenNodeSTM32;
canOpenNodeSTM32.CANHandle = &hcan1;
canOpenNodeSTM32.HWInitFunction = MX_CAN1_Init;
canOpenNodeSTM32.timerHandle = &htim16;
canOpenNodeSTM32.desiredNodeID = 20;
canOpenNodeSTM32.baudrate = 250;
canopen_app_init(&canOpenNodeSTM32);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
canopen_app_process();- Flash the board and execute the CAN tests described in
PCB testing instructions.
Configure the object dictionary
- Find the last release of
CANopenEditorand download the binaries link - Extract the release binary archive
- Open
EDSEditor.exewith wine:
wine net481/EDSEditor.exe- Open the file
CANopenNode_STM32/DS301_profile.xpd
CANopenLinux
CANopenLinux can be used as a gateway to communicate with CANopen devices using socket/stdio commands.
Setup the CAN interface:
sudo apt-get install can-utils
sudo modprobe vcan
# Do it only if can0 is not already mounted!
#sudo ip link add dev can0 type vcan
sudo ip link set up can0 type can bitrate 250000Download and install CANopenLinux:
git clone https://github.com/CANopenNode/CANopenLinux.git
cd CANopenLinux
git submodule update --init --recursive
makeRead an OD entry from the computer:
./canopend can0 -i 1 -c "stdio"
20 r 0x1000 0
[0] 34 12 00 00Write an OD entry from the computer:
./canopend can0 -i 1 -c "stdio"
20 w 0x6001 0 U32 0
[0] OKIn my example, 0x6001 controls the LED!
Parts
26| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | Conn_01x15 | Connector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_Vertical | J1, J5, J6, J7 |
| 2 | 100n | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1, C10 |
| 2 | 10k | Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical | R2, R6 |
| 1 | 0R33 | Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical | R3 |
| 1 | 1000u | Capacitor_THT:CP_Radial_D10.0mm_P5.00mm | C6 |
| 1 | 100u | Capacitor_THT:CP_Radial_D10.0mm_P5.00mm | C5 |
| 1 | 120 | Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical | R4 |
| 1 | 470u | Inductor_THT:L_Radial_D8.7mm_P5.00mm_Fastron_07HCP | L1 |
| 1 | 680p | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C4 |
| 1 | 6k2 | Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical | R5 |
| 1 | Bus | custom:PhoenixContact_MSTBVA_2,5_4-G-5,08_1x04_P5.08mm_Vertical_custom | J3 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2 |
| 1 | Fuse | Fuse:Fuseholder_Clip-5x20mm_Littelfuse_100_Inline_P20.50x4.60mm_D1.30mm_Horizontal | F1 |
| 1 | Jumper_2_Open | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | JP1 |
| 1 | MC34063AD | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | PMEG4020CERX | Diode_SMD:Nexperia_CFP3_SOD-123W | D1 |
| 1 | PMEG6020CER | Diode_SMD:Nexperia_CFP3_SOD-123W | D5 |
| 1 | SM24CANB-02HTG | Package_TO_SOT_SMD:SOT-23_Handsoldering | D2 |
| 1 | SMAJ33CA | Diode_SMD:D_SMA | D4 |
| 1 | SMAJ4750A | Diode_SMD:D_SMA | D6 |
| 1 | SN65HVD230 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U3 |
Similar boards
- 4 layers189.4 × 59.1 mm

- 4 layers40 × 26.5 mm

StandardModuleV2
ilicmiljan/open-can-controller
Open-source CAN bus controller for BMW E9X instrument clusters (Firmware + PCB)
41 parts5GPL-3.0 - 2 layers170.6 × 121.1 mm

- 2 layers125 × 78.2 mm

RC ESP32 V2
Poent/RC-Snowblower
Working on designing the impeller and auger portion of the snowblower. Switched from using a worm gear assembly to a custom ring and pinion setup using a spiral bevel gear.
84 parts2 - 2 layers36 × 72 mm

HCP Bridge
JonasE99/HCP-Bridge
🚧 WIP – not yet manufactured or tested. KiCad PCB (one per door) connecting Hörmann series 4 garage door operators (ProMatic/SupraMatic, BUS/RJ12) to Loxone via ESP32-S3 and Wi-Fi.
53 parts1 - 2 layers95 × 40.5 mm

Esp32tester
Lathe-Mariel/CAN
回路 | 部品(Item) | 説明 | 数量(Qauntity) | Akizukiコード ---|---|---|---|--- U1 | ESP32-DevKitC | ESP32マイコン・ボード| 1 | 115673 IC1 | TJA1441AT | CANトランシーバ| 1 | 117464 R1, R2 | 60.4Ω 1608 | 終端抵抗 | 2 | R3, R4 | 120Ω 1608 | LED電流制限抵抗 |…
20 parts1 - 2 layers79.2 × 99.9 mm

- 6 layers55 × 35 mm

TACCO
Stab-Rabbit-coding/Serenity-UAV
A functional, security conscious, Unmanned Aerial Vehicle based on the Firefly Class spacecraft Serenity from the 2002 show..
163 parts1CERN-OHL-W-2.0
Questions
How big is the MCU Board PCB?
It measures 50.8 × 68.6 mm and has 2 copper layers, 1.6 mm thick.
What parts does the MCU Board use?
26 parts, built around the SN65HVD230D, MC34063AD, SM24CANB-02HTG and SMAJ33CA. 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 MCU Board KiCad files?
From the caipiblack/STM32-CAN-Bus-board repository on GitHub, at the commit this page was made from: the board is hardware/rev_a/MCU_Board.kicad_pcb and its schematic hardware/rev_a/MCU_Board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the MCU Board 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).