Skip to content

Commit a8db76e

Browse files
ejsearsjimmyjon711
andauthored
Add support for BoxTurtle (8-Lane) installation and configuration files (#449)
Adds support for AFC-Pro board. --------- Co-authored-by: jimmyjon711 <jcmadill1@gmail.com>
1 parent 888620c commit a8db76e

6 files changed

Lines changed: 303 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2025-06-15]
9+
### Added
10+
- Added support for the AFC-Pro board in the installer to install an 8-Lane Boxturtle.
11+
812
## [2025-06-10]
913
### Added
1014
- Ability to turn on print assist if spool falls below a certain weight

config/mcu/AFC_Pro.cfg

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[board_pins Turtle_1]
2+
mcu: Turtle_1
3+
aliases:
4+
M1_STEP=PE7 , M1_DIR=PG1 , M1_EN=PE10 , M1_UART=PE8 ,
5+
M2_STEP=PB2 , M2_DIR=PA3 , M2_EN=PG0 , M2_UART=PF15 ,
6+
M3_STEP=PA0 , M3_DIR=PC1 , M3_EN=PA2 , M3_UART=PA1 ,
7+
M4_STEP=PF9 , M4_DIR=PF8 , M4_EN=PC0 , M4_UART=PF10 ,
8+
M5_STEP=PF5 , M5_DIR=PF4 , M5_EN=PF7 , M5_UART=PF6 ,
9+
M6_STEP=PF1 , M6_DIR=PF0 , M6_EN=PF3 , M6_UART=PF2 ,
10+
M7_STEP=PE5 , M7_DIR=PE4 , M7_EN=PC13 , M7_UART=PE6 ,
11+
M8_STEP=PE1 , M8_DIR=PE0 , M8_EN=PE3 , M8_UART=PE2 ,
12+
13+
# suggested switch pin configurations
14+
HUB=PD0 ,
15+
TRG1=PD1 , TRG2=PD4 , TRG3=PD6 , TRG4=PG9 ,
16+
TRG5=PG11 , TRG6=PD3 , TRG7=PD2 , TRG8=PD5 ,
17+
EXT1=PD7 , EXT2=PG10 , EXT3=PG12 , EXT4=PG13 ,
18+
EXT5=PB7 , EXT6=PB6 , EXT7=PB5 , EXT8=PB4 ,
19+
TN_ADV=PB3 , TN_TRL=PG15 ,
20+
21+
# alternate names for endstop ports
22+
SW1=PD0 , SW2=PD1 , SW3=PD4 , SW4=PD6 , SW5=PG9 , SW6=PG11 ,
23+
SW7=PD3 , SW8=PD2 , SW9=PD5 , SW10=PD7 , SW11=PG10 , SW12=PG12, SW13=PG13 ,
24+
SW14=PB7 , SW15=PB6 , SW16=PB5 , SW17=PB4 , SW18=PB3 , SW19=PG15 , SW20=PG14 ,
25+
26+
MOT1_RWD=PE9 , MOT1_FWD=PE11 , MOT1_EN=PE15 ,
27+
MOT2_RWD=PE13 , MOT2_FWD=PE14 , MOT2_EN=PD9 ,
28+
MOT3_RWD=PB10 , MOT3_FWD=PB11 , MOT3_EN=PB13 ,
29+
MOT4_RWD=PB14 , MOT4_FWD=PB15 , MOT4_EN=PD11 ,
30+
MOT5_RWD=PD12 , MOT5_FWD=PD13 , MOT5_EN=PG3 ,
31+
MOT6_RWD=PD14 , MOT6_FWD=PD15 , MOT6_EN=PG5 ,
32+
MOT7_RWD=PC6 , MOT7_FWD=PC7 , MOT7_EN=PG7 ,
33+
MOT8_RWD=PC8 , MOT8_FWD=PA15 , MOT8_EN=PC11 ,
34+
35+
RGB1=PA5 , RGB2=PC14 , RGB3=PC15 , RGB4=PA4 ,

include/constants.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ current_install_version="1.0.0"
3636
min_version="1.0.0"
3737
files_updated_or_installed="False"
3838
test_mode="False"
39-
installation_options=("BoxTurtle (4-Lane)" "NightOwl" "HTLF" "QuattroBox")
39+
installation_options=("BoxTurtle (4-Lane)" "BoxTurtle (8-Lane)" "NightOwl" "HTLF" "QuattroBox")
4040
invalid_name="False"
4141
minimum_python_major="3"
4242
minimum_python_minor="8"

include/install_functions.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ copy_unit_files() {
7474
cp "${afc_path}/templates/AFC_Turtle_1.cfg" "${afc_config_dir}/AFC_${boxturtle_name}.cfg"
7575
;;
7676

77+
"BoxTurtle (8-Lane)")
78+
cp "${afc_path}/templates/AFC_Hardware-AFC.cfg" "${afc_config_dir}/AFC_Hardware.cfg"
79+
cp "${afc_path}/templates/AFC_Pro_Turtle_1.cfg" "${afc_config_dir}/AFC_${boxturtle_name}.cfg"
80+
;;
81+
7782
"NightOwl")
7883
cp "${afc_path}/templates/AFC_Hardware-NightOwl.cfg" "${afc_config_dir}/AFC_Hardware.cfg"
7984
cp "${afc_path}/templates/AFC_NightOwl_1.cfg" "${afc_config_dir}/AFC_NightOwl_1.cfg"
@@ -132,8 +137,7 @@ install_afc() {
132137
update_config_value "${afc_file}" "hub_cut" "${hub_cutter}"
133138
update_config_value "${afc_file}" "kick" "${kick_macro}"
134139
update_config_value "${afc_file}" "wipe" "${wipe_macro}"
135-
echo "$toolhead_sensor"
136-
echo "$toolhead_sensor_pin"
140+
137141
if [ "$toolhead_sensor" == "Sensor" ]; then
138142
update_switch_pin "${afc_config_dir}/AFC_Hardware.cfg" "${toolhead_sensor_pin}"
139143
elif [ "$toolhead_sensor" == "Ramming" ]; then

include/menus/install_menu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ install_menu() {
4848

4949
while true; do
5050
clear
51-
if [ "$installation_type" == "BoxTurtle (4-Lane)" ]; then
51+
if [ "$installation_type" == "BoxTurtle (4-Lane)" ] || [ "$installation_type" == "BoxTurtle (8-Lane)" ]; then
5252
printf " \e[49m \e[38;2;2;2;2;49m▄\e[38;2;1;1;1;49m▄\e[38;2;1;1;1;48;2;0;0;0m▄▄\e[38;2;1;1;1;48;2;2;2;2m▄\e[48;2;1;1;1m \e[38;2;1;1;32;48;2;1;1;1m▄\e[38;2;1;1;36;48;2;1;1;1m▄▄\e[48;2;1;1;1m \e[38;2;1;1;1;48;2;0;0;0m▄▄\e[38;2;1;1;1;49m▄\e[38;2;0;0;0;49m▄▄\e[49m \e[m
5353
\e[49m \e[38;2;0;0;0;49m▄\e[38;2;1;1;1;48;2;0;0;0m▄\e[48;2;1;1;1m \e[38;2;61;1;105;48;2;1;1;1m▄\e[38;2;74;1;127;48;2;1;1;1m▄\e[38;2;11;1;19;48;2;1;1;1m▄\e[38;2;1;1;36;48;2;1;1;79m▄\e[38;2;1;1;183;48;2;1;1;242m▄\e[38;2;1;1;156;48;2;1;1;252m▄\e[38;2;1;1;124;48;2;1;1;252m▄\e[38;2;1;1;156;48;2;1;1;252m▄\e[38;2;1;1;1;48;2;1;1;233m▄\e[38;2;1;79;1;48;2;1;1;1m▄\e[38;2;1;252;1;48;2;1;36;1m▄\e[38;2;1;252;1;48;2;1;183;1m▄\e[38;2;1;243;1;48;2;1;124;1m▄\e[38;2;1;156;1;48;2;1;36;1m▄\e[48;2;1;1;1m \e[38;2;1;1;1;48;2;2;2;2m▄\e[38;2;1;1;1;48;2;0;0;0m▄▄\e[38;2;1;1;1;49m▄\e[38;2;2;2;2;49m▄\e[38;2;0;0;0;49m▄\e[49m \e[m
5454
\e[49m \e[38;2;0;0;0;49m▄\e[38;2;1;1;1;49m▄\e[38;2;1;1;1;48;2;2;2;2m▄\e[38;2;25;1;41;48;2;1;1;1m▄\e[38;2;74;1;127;48;2;1;1;1m▄\e[38;2;75;1;129;48;2;50;1;86m▄\e[48;2;75;1;129m \e[38;2;61;1;105;48;2;75;1;129m▄\e[38;2;1;1;1;48;2;69;1;119m▄\e[38;2;33;33;1;48;2;11;1;19m▄\e[38;2;170;170;0;48;2;1;1;1m▄\e[38;2;249;249;0;48;2;1;1;1m▄\e[38;2;254;254;0;48;2;33;33;1m▄\e[38;2;254;254;0;48;2;1;1;1m▄\e[38;2;245;245;0;48;2;1;1;1m▄\e[38;2;37;37;1;48;2;1;1;1m▄\e[38;2;1;1;1;48;2;1;169;1m▄\e[38;2;1;1;1;48;2;1;247;1m▄\e[38;2;1;1;1;48;2;1;113;1m▄\e[38;2;1;18;1;48;2;1;1;1m▄\e[38;2;0;97;0;48;2;1;1;1m▄\e[38;2;0;119;0;48;2;1;1;1m▄\e[38;2;0;119;0;48;2;1;59;1m▄▄\e[38;2;0;119;0;48;2;0;80;0m▄▄\e[38;2;0;119;0;48;2;1;38;1m▄\e[38;2;0;119;0;48;2;1;18;1m▄\e[38;2;0;110;0;48;2;1;1;1m▄\e[38;2;1;18;1;48;2;1;1;1m▄\e[48;2;1;1;1m \e[38;2;1;1;1;48;2;0;0;0m▄\e[38;2;0;0;0;49m▄\e[49m \e[m

templates/AFC_Pro_Turtle_1.cfg

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
[include mcu/AFC_Pro.cfg]
2+
3+
[mcu Turtle_1]
4+
canbus_uuid: <replace with your can UUID>
5+
#serial: <replace with your /dev/serial/by-id/...> and comment out canbus_uuid above
6+
7+
[AFC_BoxTurtle Turtle_1]
8+
hub: Turtle_1
9+
extruder: extruder
10+
# buffer: <buffer_name> # If not defined below from the install script, uncomment and add buffer name if using a buffer
11+
12+
[temperature_sensor Turtle_1]
13+
sensor_type: temperature_mcu
14+
sensor_mcu: Turtle_1
15+
16+
[AFC_stepper lane1]
17+
unit: Turtle_1:1
18+
step_pin: Turtle_1:M1_STEP
19+
dir_pin: !Turtle_1:M1_DIR
20+
enable_pin: !Turtle_1:M1_EN
21+
microsteps: 16
22+
rotation_distance: 4.65
23+
dist_hub: 155.0
24+
park_dist: 10
25+
led_index: AFC_Indicator:1
26+
afc_motor_rwd: Turtle_1:MOT1_RWD
27+
afc_motor_fwd: Turtle_1:MOT1_FWD
28+
afc_motor_enb: Turtle_1:MOT1_EN
29+
rwd_speed_multiplier: 0.5
30+
fwd_speed_multiplier: 0.5
31+
pwm: True
32+
prep: ^!Turtle_1:TRG1
33+
load: ^Turtle_1:EXT1
34+
35+
[tmc2209 AFC_stepper lane1]
36+
uart_pin: Turtle_1:M1_UART
37+
uart_address: 0
38+
run_current: 0.8
39+
sense_resistor: 0.110
40+
41+
[AFC_stepper lane2]
42+
unit: Turtle_1:2
43+
step_pin: Turtle_1:M2_STEP
44+
dir_pin: !Turtle_1:M2_DIR
45+
enable_pin: !Turtle_1:M2_EN
46+
microsteps: 16
47+
rotation_distance: 4.65
48+
dist_hub: 80
49+
park_dist: 10
50+
led_index: AFC_Indicator:2
51+
afc_motor_rwd: Turtle_1:MOT2_RWD
52+
afc_motor_fwd: Turtle_1:MOT2_FWD
53+
afc_motor_enb: Turtle_1:MOT2_EN
54+
rwd_speed_multiplier: 0.5
55+
fwd_speed_multiplier: 0.5
56+
pwm: True
57+
prep: ^!Turtle_1:TRG2
58+
load: ^Turtle_1:EXT2
59+
60+
[tmc2209 AFC_stepper lane2]
61+
uart_pin: Turtle_1:M2_UART
62+
uart_address: 0
63+
run_current: 0.8
64+
sense_resistor: 0.110
65+
66+
[AFC_stepper lane3]
67+
unit: Turtle_1:3
68+
step_pin: Turtle_1:M3_STEP
69+
dir_pin: !Turtle_1:M3_DIR
70+
enable_pin: !Turtle_1:M3_EN
71+
microsteps: 16
72+
rotation_distance: 4.65
73+
dist_hub: 90.0
74+
park_dist: 10
75+
led_index: AFC_Indicator:3
76+
afc_motor_rwd: Turtle_1:MOT3_RWD
77+
afc_motor_fwd: Turtle_1:MOT3_FWD
78+
afc_motor_enb: Turtle_1:MOT3_EN
79+
rwd_speed_multiplier: 0.5
80+
fwd_speed_multiplier: 0.5
81+
pwm: True
82+
prep: ^!Turtle_1:TRG3
83+
load: ^Turtle_1:EXT3
84+
85+
[tmc2209 AFC_stepper lane3]
86+
uart_pin: Turtle_1:M3_UART
87+
uart_address: 0
88+
run_current: 0.8
89+
sense_resistor: 0.110
90+
91+
[AFC_stepper lane4]
92+
unit: Turtle_1:4
93+
step_pin: Turtle_1:M4_STEP
94+
dir_pin: !Turtle_1:M4_DIR
95+
enable_pin: !Turtle_1:M4_EN
96+
microsteps: 16
97+
rotation_distance: 4.65
98+
dist_hub: 145.0
99+
park_dist: 10
100+
led_index: AFC_Indicator:4
101+
afc_motor_rwd: Turtle_1:MOT4_RWD
102+
afc_motor_fwd: Turtle_1:MOT4_FWD
103+
afc_motor_enb: Turtle_1:MOT4_EN
104+
rwd_speed_multiplier: 0.5
105+
fwd_speed_multiplier: 0.5
106+
pwm: True
107+
prep: ^!Turtle_1:TRG4
108+
load: ^Turtle_1:EXT4
109+
110+
[tmc2209 AFC_stepper lane4]
111+
uart_pin: Turtle_1:M4_UART
112+
uart_address: 0
113+
run_current: 0.8
114+
sense_resistor: 0.110
115+
116+
[AFC_stepper lane5]
117+
unit: Turtle_1:5
118+
step_pin: Turtle_1:M5_STEP
119+
dir_pin: !Turtle_1:M5_DIR
120+
enable_pin: !Turtle_1:M5_EN
121+
microsteps: 16
122+
rotation_distance: 4.65
123+
dist_hub: 155.0
124+
park_dist: 10
125+
led_index: AFC_Indicator:5
126+
afc_motor_rwd: Turtle_1:MOT5_RWD
127+
afc_motor_fwd: Turtle_1:MOT5_FWD
128+
afc_motor_enb: Turtle_1:MOT5_EN
129+
rwd_speed_multiplier: 0.5
130+
fwd_speed_multiplier: 0.5
131+
pwm: True
132+
prep: ^!Turtle_1:TRG5
133+
load: ^Turtle_1:EXT5
134+
135+
[tmc2209 AFC_stepper lane5]
136+
uart_pin: Turtle_1:M5_UART
137+
uart_address: 0
138+
run_current: 0.8
139+
sense_resistor: 0.110
140+
141+
[AFC_stepper lane6]
142+
unit: Turtle_1:6
143+
step_pin: Turtle_1:M6_STEP
144+
dir_pin: !Turtle_1:M6_DIR
145+
enable_pin: !Turtle_1:M6_EN
146+
microsteps: 16
147+
rotation_distance: 4.65
148+
dist_hub: 80
149+
park_dist: 10
150+
led_index: AFC_Indicator:6
151+
afc_motor_rwd: Turtle_1:MOT6_RWD
152+
afc_motor_fwd: Turtle_1:MOT6_FWD
153+
afc_motor_enb: Turtle_1:MOT6_EN
154+
rwd_speed_multiplier: 0.5
155+
fwd_speed_multiplier: 0.5
156+
pwm: True
157+
prep: ^!Turtle_1:TRG6
158+
load: ^Turtle_1:EXT6
159+
160+
[tmc2209 AFC_stepper lane6]
161+
uart_pin: Turtle_1:M6_UART
162+
uart_address: 0
163+
run_current: 0.8
164+
sense_resistor: 0.110
165+
166+
[AFC_stepper lane7]
167+
unit: Turtle_1:7
168+
step_pin: Turtle_1:M7_STEP
169+
dir_pin: !Turtle_1:M7_DIR
170+
enable_pin: !Turtle_1:M7_EN
171+
microsteps: 16
172+
rotation_distance: 4.65
173+
dist_hub: 90.0
174+
park_dist: 10
175+
led_index: AFC_Indicator:7
176+
afc_motor_rwd: Turtle_1:MOT7_RWD
177+
afc_motor_fwd: Turtle_1:MOT7_FWD
178+
afc_motor_enb: Turtle_1:MOT7_EN
179+
rwd_speed_multiplier: 0.5
180+
fwd_speed_multiplier: 0.5
181+
pwm: True
182+
prep: ^!Turtle_1:TRG7
183+
load: ^Turtle_1:EXT7
184+
185+
[tmc2209 AFC_stepper lane7]
186+
uart_pin: Turtle_1:M7_UART
187+
uart_address: 0
188+
run_current: 0.8
189+
sense_resistor: 0.110
190+
191+
[AFC_stepper lane8]
192+
unit: Turtle_1:8
193+
step_pin: Turtle_1:M8_STEP
194+
dir_pin: !Turtle_1:M8_DIR
195+
enable_pin: !Turtle_1:M8_EN
196+
microsteps: 16
197+
rotation_distance: 4.65
198+
dist_hub: 145.0
199+
park_dist: 10
200+
led_index: AFC_Indicator:8
201+
afc_motor_rwd: Turtle_1:MOT8_RWD
202+
afc_motor_fwd: Turtle_1:MOT8_FWD
203+
afc_motor_enb: Turtle_1:MOT8_EN
204+
rwd_speed_multiplier: 0.5
205+
fwd_speed_multiplier: 0.5
206+
pwm: True
207+
prep: ^!Turtle_1:TRG8
208+
load: ^Turtle_1:EXT8
209+
210+
[tmc2209 AFC_stepper lane8]
211+
uart_pin: Turtle_1:M8_UART
212+
uart_address: 0
213+
run_current: 0.8
214+
sense_resistor: 0.110
215+
216+
[AFC_hub Turtle_1]
217+
switch_pin: ^Turtle_1:HUB # Pin for the hub switch
218+
afc_bowden_length: 1725 # Length of the Bowden tube from the hub to the toolhead sensor in mm.
219+
move_dis: 50 # Distance to move the filament within the hub in mm.
220+
#hub_clear_move_dis: 25 # Distance after hub switch becomes fast to retract to insure hub is clear
221+
cut: False # Hub cutter installed (e.g. Snappy)
222+
223+
#--=================================================================================--#
224+
######### Hub Cut #####################################################################
225+
#--=================================================================================--#
226+
assisted_retract: False # If True, retracts are assisted to prevent loose windows on the spool
227+
cut_cmd: AFC #CMD to use
228+
cut_dist: 50 # How much filament to cut off (in mm).
229+
cut_clear: 120 # How far the filament should retract back from the hub (in mm).
230+
cut_min_length: 300.0
231+
cut_servo_pass_angle: 10 # Servo angle to align the Bowden tube with the hole for loading the toolhead.
232+
cut_servo_clip_angle: 180 # Servo angle for cutting the filament.
233+
cut_servo_prep_angle: 80 # Servo angle to prepare the filament for cutting (aligning the exit hole).
234+
235+
#[AFC_screen Turtle_1]
236+
#mac_address: None
237+
238+
[AFC_led AFC_Indicator]
239+
pin: Turtle_1:RGB1
240+
chain_count: 4
241+
color_order: GRBW
242+
243+
#[neopixel Extra2]
244+
#pin: Turtle_1:RGB2
245+
#chain_count: 6
246+
#color_order: GRB
247+
248+
#[neopixel Extra3]
249+
#pin: Turtle_1:RGB3
250+
#chain_count: 6
251+
#color_order: GRB
252+
253+
#[neopixel Extra4]
254+
#pin: Turtle_1:RGB4
255+
#chain_count: 4
256+
#color_order: GRB

0 commit comments

Comments
 (0)