Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BTT SB2209 USB Toolhead #664

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Mark and Manage Stale Issues and Pull Requests
# name: Mark and Manage Stale Issues and Pull Requests

on:
schedule:
- cron: '30 7 * * *'
# on:
# schedule:
# - cron: '30 7 * * *'

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
# jobs:
# stale:
# runs-on: ubuntu-latest
# permissions:
# issues: write
# pull-requests: write

steps:
- uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 14
stale-issue-message: >
📌 **This issue has been marked as stale because it has not had activity in the past 30 days.**
# steps:
# - uses: actions/[email protected]
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# days-before-stale: 30
# days-before-close: 14
# stale-issue-message: >
# 📌 **This issue has been marked as stale because it has not had activity in the past 30 days.**

To keep it open, please respond to this message or add new information. Otherwise, this will be closed in 14 days.
# To keep it open, please respond to this message or add new information. Otherwise, this will be closed in 14 days.

Thank you for your contributions!
stale-pr-message: >
📌 **This pull request has been marked as stale because it has not had activity in the past 30 days.**
# Thank you for your contributions!
# stale-pr-message: >
# 📌 **This pull request has been marked as stale because it has not had activity in the past 30 days.**

Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
# Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.

We appreciate your contribution!
stale-issue-label: 'stale'
stale-pr-label: 'stale, reviewer-needed'
exempt-issue-labels: 'tracking'
exempt-pr-labels: 'tracking'
close-issue-message: 'This issue was closed due to inactivity for 14 days. Feel free to reopen it if you think it was an error or if you have new information or progress to share'
close-pr-message: 'This pull request was closed due to inactivity for 14 days. Please reopen it if you think it was an error or if you wish to continue the contribution.'
exempt-all-milestones: true
exempt-all-assignees: true
exempt-draft-prs: true
# We appreciate your contribution!
# stale-issue-label: 'stale'
# stale-pr-label: 'stale, reviewer-needed'
# exempt-issue-labels: 'tracking'
# exempt-pr-labels: 'tracking'
# close-issue-message: 'This issue was closed due to inactivity for 14 days. Feel free to reopen it if you think it was an error or if you have new information or progress to share'
# close-pr-message: 'This pull request was closed due to inactivity for 14 days. Please reopen it if you think it was an error or if you wish to continue the contribution.'
# exempt-all-milestones: true
# exempt-all-assignees: true
# exempt-draft-prs: true
23 changes: 23 additions & 0 deletions config/mcu_definitions/toolhead/BTT_SB2209_USB_v1.0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[board_pins toolhead_manufacturer]
mcu: toolhead
aliases:

MCU_E0_STEP=gpio18 , MCU_E0_DIR=gpio19 , MCU_E0_EN=gpio17 , MCU_E0_UART=gpio20 ,

MCU_ENDSTOP=gpio13 ,
MCU_PROBE1=gpio21 , MCU_PROBE2=gpio22 ,

MCU_HE0=gpio7 ,
MCU_TH0=gpio26 ,
MCU_NTC=gpio27 ,

MCU_IND=gpio6 , MCU_FAN=gpio5 ,
MCU_FAN1_PWM=gpio14 , MCU_FAN2_PWM=gpio4 ,
MCU_4WFAN_TACH=gpio12 , MCU_4WFAN_PWM=gpio16 ,

MCU_LIS2DW_MISO=gpio0 , MCU_LIS2DW_CS=gpio1 , MCU_LIS2DW_CK=gpio2 ,
MCU_LIS2DW_MOSI=gpio3 , MCU_LIS2DW_INT1=gpio25 , MCU_LIS2DW_SPI=spi0a ,

MCU_I2C_SCL=gpio29 , MCU_I2C_SDA=gpio28 ,

MCU_RGB=gpio15 , MCU_STATUS=gpio24
116 changes: 116 additions & 0 deletions user_templates/mcu_defaults/toolhead/BTT_SB2209_USB_v1.0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#--------------------------------------------#
##### BTT SB2209 USB v1.0 MCU definition #####
#--------------------------------------------#

[mcu toolhead]
##--------------------------------------------------------------------
serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path
##--------------------------------------------------------------------

# If you want to override the wiring of the BTT SB, keep in mind that this
# board is defined using the "toolhead" name. So you should use "pin: toolhead:PIN_NAME"
# in your own overrides.cfg files.

[include config/mcu_definitions/toolhead/BTT_SB2209_USB_v1.0.cfg] # Do not remove this line
[board_pins sb2209_usb_mcu]
mcu: toolhead
aliases:

E_STEP=MCU_E0_STEP , E_DIR=MCU_E0_DIR , E_ENABLE=MCU_E0_EN , E_TMCUART=MCU_E0_UART ,

X_STOP=MCU_ENDSTOP ,
PROBE_INPUT=MCU_PROBE1 , PROBE_SENSE=MCU_PROBE2 ,

E_HEATER=MCU_HE0 ,
E_TEMPERATURE=MCU_TH0 ,
TH_MCU_NTC=MCU_NTC ,

IND_NPN=MCU_IND , FAN0=MCU_FAN ,
FAN1=MCU_FAN1_PWM , FAN2=MCU_FAN2_PWM ,
FAN3_TACH=MCU_4WFAN_TACH , FAN3=MCU_4WFAN_PWM ,

LIS2DW_MISO=MCU_LIS2DW_MISO , LIS2DW_CS=MCU_LIS2DW_CS , LIS2DW_CK=MCU_LIS2DW_CK ,
LIS2DW_MOSI=MCU_LIS2DW_MOSI , LIS2DW_INT1=MCU_LIS2DW_INT1 ,

I2C_SCL=MCU_I2C_SCL , I2C_SDA=MCU_I2C_SDA ,

TOOLHEAD_RGB=MCU_RGB , STATUS_LED=MCU_STATUS


#----------------------------------------#
# BTT SB2209 v1.0 pins remapping #
#----------------------------------------#

[extruder]
step_pin: toolhead:E_STEP
dir_pin: !toolhead:E_DIR
enable_pin: !toolhead:E_ENABLE
heater_pin: toolhead:E_HEATER
pullup_resistor: 2200 # 2.2K
sensor_pin: toolhead:E_TEMPERATURE

[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART


[fan] # fan1
pin: toolhead:FAN1

[heater_fan hotend_fan] # fan2
pin: toolhead:FAN2
heater: extruder
heater_temp: 50.0

### IND or FAN connector
## Cannot be used with NPN or PNP proximity sensor
## Set jumper on board to FAN
[fan_generic fan0] # IND or FAN connector
pin: toolhead:FAN0

[fan_generic 4W_FAN]
pin: toolhead:FAN3
tachometer_pin: toolhead:FAN3_TACH
#tachometer_ppr: 1

[neopixel hotend_rgb]
pin: toolhead:TOOLHEAD_RGB

[temperature_sensor toolhead_mcu]
sensor_type: Generic 3950
sensor_pin: toolhead:TH_MCU_NTC
min_temp = 0
max_temp = 100

## Uncomment the following line if not using sensorless homing
## and having the X endstop plugged to the toolhead MCU. Make sure
## X endstop is plugged in to IO.1 on the board.
# [stepper_x]
# endstop_pin: ^toolhead:X_STOP

#### LIS2DW Input Shaper ####
# Change probe_points to best location for resonance testing
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[lis2dw]
cs_pin: toolhead:LIS2DW_CS
spi_bus: spi0a
axes_map: x,y,z

[resonance_tester]
accel_chip: lis2dw
probe_points: 100,100,20

[include ./macros/helpers/resonance_override.cfg]
[include ./scripts/K-ShakeTune/K-SnT_*.cfg]

### Uncomment if using bltouch ####
#[bltouch]
#sensor_pin: ^toolhead:PROBE_SENSE
#control_pin: toolhead:PROBE_INPUT

#### Uncomment if using NPN or PNP proximity sensor
## NPN and PNP proximity switch types can be set by jumper
## Cannot be used at the same time as FAN0, set jumper on
## board to IND
#[probe]
#pin: ^toolhead:IND_NPN