====== Rook - Elektronik & Software ======
===== YouTube Video #60 =====
{{youtube>ZW_aBN9PKdQ?half}}
\\
===== Vorgehen =====
* Heizbett verkabeln
* 230V Matte, Thermistor
* Z Endschalter
* Schutzleiter ans Bet
* Anschluss für SSR raus legen
* Z Stepper mit raus legen
* 24V Verkabeln
* Pi und 5V Versorgung anbauen
* Pi mit Strom
* Druckerboard mit Strom
* Pi Test inkl. Druckerboard per USB
* Stepper verkabeln
* Durckkopf
* RGB später
* Touch Sensor später
* Lüfter, Hotend, Thermistor Hotend
* Einbau EBB42
* Einbau U2C
* CAN verkabeln inkl. 24V
* Kopfsensoren auflegen
===== Software =====
* Image von BTT auf SD Karte \\ https://github.com/bigtreetech/CB1
* Anpassen für Wlan
* CAN Modul mit candelight neu flaschen \\ http://www.drklipper.de/doku.php?id=videos:49_-_klipper_faq_-_can_-_usb_buskoppler \\ -> candelight (STM32G0B1)
* EBB42 neu flashen mit 1000000 CAN bus speed \\ https://github.com/bigtreetech/EBB
* CAN einrichten \\ ''sudo nano /etc/network/interfaces.d/can0'' \\
allow-hotplug can0
iface can0 can static
bitrate 1000000
up ifconfig $IFACE txqueuelen 1024
* Board suchen \\
biqu@BTT-CB1:~/klipper$ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
Found canbus_uuid=539892be834d, Application: Klipper
Total 1 uuids found
* Updates einspielen
* printer.cfg grundlegend aufbauen
* Extra cfg für Pi MCU \\ https://www.klipper3d.org/RPi_microcontroller.html \\ https://github.com/Klipper3d/klipper/blob/master/config/sample-raspberry-pi.cfg
* Extra cfg für EBB42 \\ [[https://github.com/bigtreetech/EBB/blob/master/EBB%20CAN%20V1.0%20(STM32F072)/sample-bigtreetech-ebb-canbus-v1.0.cfg]]
* Extra cfg für SKR MINI E3 V2.0 \\ Konfig vorhanden in ''~/klipper/config/generic-bigtreetech-skr-mini-e3-v2.0.cfg'' \\ [[https://github.com/Klipper3d/klipper/blob/master/config/generic-bigtreetech-skr-mini-e3-v2.0.cfg]]
* Wichtig: Extruder aus der SKR Mini Konfig raus sonst -> Fehler ''TMC uart rx and tx pins must be on the same mcu''
*
===== Motoren =====
## Connected to X-MOT (B Motor)
[stepper_x]
## Connected to Y-MOT (A Motor)
[stepper_y]
===== Inbetriebnahme =====
==== Heizbett ====
* :!: Sicherung vom Bett raus! :!:
* Prüfen, ob der Thermistor im Heizbett funktioniert.
* Richtigen Typen für Thermistor in der Config eintragen.
* Erst dann einschalten und schauen, ob das SSR richtig schaltet, wenn das Bett heizen sollte.
* :!: sieht man an der LED vom SSR
* Wenn das geht, ausschalten und Sicherung für das Heizbett rein (1A Flink)
==== Z Endstop ====
* Z Endstop testen mit ''QUERY_ENDSTOPS''
* Der Endstop muss z:open sein im nicht geschalteten Zustand
* Wenn hier z:TRIGGERED steht, den Pin in der Konfig mit ! drehen
* Endstops X / Y bleiben erstmal ungeachtet wegen Sensorloess Homing auf X / Y
==== Schrittmotoren testen ====
* Verkabelung überprüfen bezüglich der Spulen
* Nachsehen was die Motoren haben und wie das Board verdrahtet ist!
* STEPPER_BUZZ STEPPER=stepper_x \\ STEPPER_BUZZ STEPPER=stepper_y \\ STEPPER_BUZZ STEPPER=stepper_z \\ STEPPER_BUZZ STEPPER=extruder
* :!: Die Motoren müssen ruckelfrei laufen. Wenn dem nicht so ist, sind sie vermutlich falsch verkabelt. In dem Fall leifern die TMC Treiber auch einen Error.
==== Schrittmotoren Richtung testen ====
TBD
* force_move aktivieren \\ [force_move]
enable_force_move: true
# Set to true to enable FORCE_MOVE and SET_KINEMATIC_POSITION
# extended G-Code commands. The default is false.
* ''G91'' absetzen für Inkrementellen Stepper Betrieb
* FORCE_MOVE STEPPER=stepper_x DISTANCE=1 VELOCITY=20
* eher mit SET_KINEMATIC_POSITION X=0 Y=0 testen -> setzt absolute Pos auf den Wert und enabled die Motoren
* dann G0 X10, G0 Y10, G0 Z1 ...
* mit Bild vergleichen ob die Bewegung stimmt \\ {{youtube_ideen:pasted:20230828-065308.png}}
* ggf. stepper_x und stepper_y in der Konfig tauschen um die Stepper zu tauschen (anstatt Kabel tauschen)
==== XY Sensorless Homing ====
* Links \\ https://docs.vorondesign.com/community/howto/clee/sensorless_xy_homing.html \\ https://mmone.github.io/klipper/Sensorless_Homing.html \\
* **Vorbereitungen**
* X und Y Endstops dürfen nicht am Board angeschlossen sein (sonst funktioniert Sensorless Homing nicht !)
* Die DIAG Jumper für X und Y Achse müssen gesetzt sein \\ {{youtube_ideen:pasted:20230909-050149.png}}
* **Klipper Config Änderungen** (immer für X und Y Stepper !)
* Der angegebene Pin von ''endstop_pin'' wandert in den TMC2209 Bereich vom Stepper mit Pullup:
* ''[stepper_x] endstop_pin: PC0'' -> ''[tmc2209 stepper_x] diag_pin: ^PC0''
* ''endstop_pin'' wird virtuell
* vorher : ''[stepper_x] endstop_pin: PC0'', nachher : ''[stepper_x] endstop_pin: tmc2209_stepper_x:virtual_endstop''
* Neuer Eintrag in ''[tmc2209 stepper_x] driver_SGTHRS: 255''
* ''homing_retract_dist'' auf 0 setzen : ''[stepper_x] homing_retract_dist: 0'' \\ https://www.klipper3d.org/TMC_Drivers.html?h=homing_retract_dist#configure-printercfg-for-sensorless-homing
* ''homing_speed'' auf die Hälfte der rotation_distance setzen : ''[stepper_x] homing_speed: 20''
* **StallGuard threshold ermitteln**
* For TMC2209, start with ''SET_TMC_FIELD FIELD=SGTHRS STEPPER=stepper_x VALUE=255'' in the console. Start with the most sensitive value for the StallGuard threshold based on which kind of TMC driver you’re using (255 for TMC2209, or -64 for TMC2130/TMC2660/TMC5160).
* Try running ''G28 X0'' to see if the toolhead moves along the X axis.
* If your toolhead moves all the way to the end of the rail, IMMEDIATELY HIT THE EMERGENCY STOP BUTTON. \\ Go back and double-check that you have configured your hardware and the Klipper sections above correctly. Ask on Discord if you need help.
* When running the G28 X0 or G28 Y0 command, the toolhead WILL move a millimeter or so before it triggers the virtual endstop. This is normal.
* Assuming that the toolhead moved a millimeter or so and then stopped, change the VALUE to decrease the sensitivity by 5-10, try again, and keep going until you find the first value that successfully homes your printer. The toolhead should gently tap the edge of travel and then stop.
* Follow the Klipper instructions on fine-tuning the value once your toolhead is homing successfully on this axis. Make sure you run
* ''G91''
* ''G1 X-10'' to back the toolhead off after hitting the end of the rail (assuming you’re homing to the maximum X value) or else homing the other axis will not work properly.
* Update the driver_SGTHRS or driver_SGT value with your new StallGuard threshold.
* TBD
==== Rest einstellen ====
* Prüfen das der Hotend Lüfter richtig rum läuft
* Bauteil Lüfter Funktionstest
* Thermistor Temperatur checken
* Hotend PID
* Bauteil Kühler auf 25% setzen -> ''M106 S64''
* ''PID_CALIBRATE HEATER=extruder TARGET=210'' (vorwiegend PLA)
* Speichern -> ''SAVE_CONFIG''
* Bett PID
* ''PID_CALIBRATE HEATER=heater_bed TARGET=60'' (vorwiegend PLA)
* Speichern -> ''SAVE_CONFIG''
* Extruder Richtung prüfen
* Extruder Kalib -> TBD von Doku übernehmen
* Bettr leveln
* ''[stepper_z]'' die Endwerte hoch setzen größer als es ist
* ''position_endstop : 150.0''
* ''position_max : 150''
* :!: Achtung: In [homing_override] die Position anpassen! -> ''G1 Z140''
* Jetzt kann man das Bett nahe an die Nozzel fahren :!: **VORSICHTIG** :!:
* G1 Z140 ... Und dann die Zahl runter ...
* Dann den Wert der über bleibt vom Max abziehen ...
* Beim Max Endwert +2mm
* MANUAL_PROBE
* Printerstartpla einfügen ! TBD