An Arduino Nano Shield to use with Klipper 3D printer firmware, as a auxiliary MCU.
Source files:
production directory contains Gerber file and BOM + Position file for JLCPCB assembly.
If you use JLC PCB to produce and assemble your board, configure PCBA for the bottom side, where most of the SMD
component are placed.
You'll have to solder by yourself the power indicator LED on the front of the board. It's a 0805, that can be soldered by hand.
However this LED is not mandatory for the board to work, you can skip soldering it if you want.
You'll also have to source and solder all the other non-SMD components:
Ref | Qty | Value | Description | Soldering | Footprint | LCSC Ref |
---|---|---|---|---|---|---|
C1, C8 | 2 | 10uF | Unpolarized ceramic capacitor | PCBA | 0805 | C17024 |
C2, C3 | 2 | 0.1uF | Unpolarized ceramic capacitor | PCBA | 0805 | C49678 |
C4, C5, C6, C7 | 4 | 4.7uF | Unpolarized ceramic capacitor | PCBA | 0805 | C1779 |
Q1, Q2, Q3 | 3 | IRLML6344TRPBF | MOSFET N-CH 30V 5A SOT23 | PCBA | SOT-23 | C20917 |
R1 | 1 | 1K | Resistor | PCBA | 0805 | C17513 |
R3, R6, R9, R15 | 4 | 100 | Resistor | PCBA | 0805 | C17408 |
R4, R7, R10 | 3 | 10K | Resistor | PCBA | 0805 | C17414 |
R11, R12, R13, R14 | 4 | 4.7K | Resistor | PCBA | 0805 | C17673 |
D3 | 1 | Any color | LED | PCBA | 0805 | C84256 |
A1 | 1 | Arduino Nano v3.x | Hand-soldered | |||
A1-a, A1-b | 2 | 15 pins female dupont header + 15 mins mal dupont header | Hand-soldered | P2.54 | ||
F1 | 1 | Fuse | Mini fuse holder + 2A or 5A mini fuse | Hand-soldered | 3544-2_FuseHolder | |
J1 | 1 | Screw terminal 2 pins P5.08mm | Hand-soldered | P5.08mm | ||
FAN0, FAN1, FAN2 | 3 | JST 2 pins P2.54mm | Hand-soldered | P2.54 | ||
T0, T1, T2, T3 | 4 | JST 2 pins P2.54mm | Hand-soldered | P2.54 | ||
Neopixel | 1 | JST 3 pins P2.54mm | Hand-soldered | P2.54 |
ONLY use 5V power supply! The Vin of the bord is connected to the 5V of the Arduino Nano, with no protection:
any power >5V may fry your Nano, and any power <5V may fry you power supply.
Powering on Vin with an external 5V power supply is only necessary if you device draw more current than the Nano can provide (800mA theorically, but with so many Nano clone out there it's safer to stick to 500mA max).
In doubt, power the board. You should already have a 5V power source if you use Klipper, to power the Pi.
FANx header are mosfet PWM output, driving the ground:
Once built and connected to your Klipper host, use the provided Klipper config file.
You need at least to set the serial
path in the [mcu ...]
of the provided klipper configuration file.
To find the serial of your Arduino Nano:
ls /dev/serial/by-id/
. Note the result.usb-1a86_USB2.0-Serial-if00-port0
: it represents your Arduino Nanoserial
setting value in the Klipper configuration using the full path to the serial file. e.g.: serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
Here is the pin mapping for reference:
The configuration file must be included in some way into the main printer.cfg
config filr of Klipper.
To flash the firmware, you do not need to have the configuration file ready, but you need:
sudo apt install gcc-avr avr-libc avrdude binutils-avr
To flash the Nano with Klipper:
klipper_config
directory in you home directory, if it not exists already: mkdir -p ~/klipper_config
.cd ~/klipper
).make clean KCONFIG_CONFIG=~/klipper_config/config.arduinonano
.make menuconfig KCONFIG_CONFIG=~/klipper_config/config.arduinonano
and configure as followed, and then save'n'quit:
Atmega AVR
atmega328p
make KCONFIG_CONFIG=~/klipper_config/config.arduinonano
to build the firmware.'.data' is not within region 'data'
, you may sufffer a known bug with AVR toolchain on Debian Bullseye (check your linux distribution codename with lsb_release -a
). If so, you can try a workaround describe here to install a previous and non-buggy AVR toolchain. Once installed, re-roll the current procedure from the make clean
step (a reboot of the Pi may be usefull between new toolchain installation and the retry).sudo systemctl stop klipper
)make flash KCONFIG_CONFIG=~/klipper_config/config.arduinonano FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
, _replacing the FLASH_DEVICE=
value with the full path of you Nano on your Pi!_ This will flash the firmware to the Arduino Nano.sudo systemctl start klipper
)If no error occurs, Klipper's firmware is now loaded into the Arduino Nano.
You can now configure Klipper to use the Nano Expander.
x2 3D printable mounts are provided (STL files):
Both mounts require x4 M2x3mm screw to secure the board to the mount.
Aside from Arduino Nano and its clone, this board may be compatible with other MCU boards using the same form factor than the Arduino Nano, and a compatible pinout.
Inspired by STM32-Klipper-Expander by Voron Design Team.
Temperature sensors and FAN output of Klipper Nano Expander are a copy of those of STM32-Klipper-Expander.
The Cytron Maker Nano RP2040 config is a contribution of tehmaze (#2).