Grundsätzlich kann das ZPM überall da eingesetzt werden, wo CAN mit einem Raspberry zusammen benötigt wird. Bei den Druckern passt es besonders gut in die kleinen High-End DIY Drucker wie den Voron V0, aber natürlich auch in den Micro oder den Salad Fork. Generell kann man sagen eignet sich das ZPM überall da, wo der Platz eher knapp ist und ein Fullsize Raspberry + CAN Adapter + 5V Netzteil nur schwer unter zubekommen ist.
sudo apt update && sudo apt upgrade -y && sudo apt install -y git silversearcher-ag wavemon hexedit sudoku tcpdump iptraf mc htop dcfldd nano usbutils ranger tldr ncdu can-utils multitail fd-find && mkdir -p ~/.local/share && tldr -u
sudo apt autoremove -y modem* cups* pulse* avahi* triggerhappy*
sudo raspi-config
sudo nano /boot/config.txt
[all]
folgenbden Eintrag hinzufügen dtoverlay=disable-bt
sudo reboot
ls -lR /dev/ | grep -v '\->\s../tty' | grep -e 'tty[[:alpha:]]' -e serial
sudo systemctl stop klipper
~/klippy-env/bin/python ~/klipper/klippy/console.py /dev/ttyAMA0
sudo systemctl stop klipper
ls -lR /dev/ | grep -v '\->\s../tty' | grep -e 'tty[[:alpha:]]' -e serial
sudo systemctl stop klipper
~/klippy-env/bin/python ~/klipper/klippy/console.py /dev/ttyAMA0
sudo systemctl stop klipper
dmesg |grep '251\|can\|spi'
pi@TestPi:~ $ ip a 2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10 link/can
sudo ip link set can0 up type can bitrate 500000
sudo nano /etc/network/interfaces.d/can0
auto can0 iface can0 can static bitrate 500000 up ifconfig $IFACE txqueuelen 128
pi@TestPi:~ $ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0 Found canbus_uuid=5b5a812a7283, Application: Klipper Total 1 uuids found
printer.cfg
eintragen [mcu] restart_method : command canbus_uuid : 5b5a812a7283
sudo systemctl stop klipper
~/klippy-env/bin/python ~/klipper/klippy/console.py -c can0 5b5a812a7283
sudo systemctl stop klipper
cd ~/klipper/
sudo cp ./scripts/klipper-mcu.service /etc/systemd/system/
sudo systemctl enable klipper-mcu.service
make menuconfig
[*] Enable extra low-level configuration options Micro-controller Architecture (Linux process) ---> () GPIO pins to set at micro-controller startup
sudo usermod -a -G tty pi
sudo service klipper stop
make flash -j4
sudo service klipper start
PIN | Funktion | Position |
---|---|---|
GPIO2 / SDA | Generel IO / I2C | J1 |
GPIO3 / SCL | Generel IO / I2C | J1 |
GPIO4 | Generel IO | J8 |
GPIO5 | Generel IO | J5 |
GPIO6 | Generel IO | J6 |
GPIO7 | NC | - |
GPIO12 / PWM0 | Generel IO / PWM | J3 / J6 |
GPIO13 / PWM1 | Generel IO / PWM | J3 / J5 |
GPIO14 / TXD0 | UART | J1 |
GPIO15 / RXD0 | UART | J1 |
GPIO16 | LED | D6 |
GPIO17 | Generel IO | J8 |
GPIO18 / SPI1_CS0 | Generel IO / SPI | J4 |
GPIO19 / SPI1_MISO | Generel IO / SPI | J4 |
GPIO20 / SPI1_MOSI | Generel IO / SPI | J4 |
GPIO21 / SPI1_SCLK | Generel IO / SPI | J4 |
GPIO22 | Generel IO | J8 |
GPIO23 | Generel IO | J2 |
GPIO26 | LED | D1 |
GPIO27 | Generel IO | J8 |
[mcu RPi] serial : /tmp/klipper_host_mcu [fan_generic RPiFan_0] pin : RPi:gpio12 max_power : 1.0 cycle_time : 0.0010 hardware_pwm : false #true kick_start_time : 0.100 [fan_generic RPiFan_1] pin : RPi:gpio13 max_power : 1.0 cycle_time : 0.0010 hardware_pwm : false #true kick_start_time : 0.100 [output_pin RPi_GPIO_4] pin : RPi:gpio4 [output_pin RPi_GPIO_5] pin : RPi:gpio5 [output_pin RPi_GPIO_6] pin : RPi:gpio6 [output_pin RPi_GPIO_16_LED] pin : RPi:gpio16 [output_pin RPi_GPIO_17] pin : RPi:gpio17 [output_pin RPi_GPIO_22] pin : RPi:gpio22 [output_pin RPi_GPIO_23] pin : RPi:gpio23 [output_pin RPi_GPIO_26_LED] pin : RPi:gpio26 [output_pin RPi_GPIO_27] pin : RPi:gpio27 [temperature_sensor BME_280] sensor_type : BME280 i2c_address : 118 i2c_mcu : RPi i2c_bus : i2c.1 [gcode_macro QUERY_BME280] gcode: {% set sensor = printer["bme280 BME_280"] %} {action_respond_info( "Temperature: %.2f C\n" "Pressure: %.2f hPa\n" "Humidity: %.2f%%" % ( sensor.temperature, sensor.pressure, sensor.humidity))}