Skip to content

Commit

Permalink
feat: add sht v3 toolhead board
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x authored Jan 6, 2025
2 parents a1201ca + b2e33bb commit 517f7d5
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 0 deletions.
23 changes: 23 additions & 0 deletions config/hardware/accelerometers/generics/lis2dw_software_spi.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This LIS2DW file is dedicated to be used with LIS2DW boards
# connected over the software SPI bus of the MCU boards

# This include toolhead boards such as Mellow SHTv3 boards
# If using a toolhead board, be sure to have the pin override in your mcu.cfg (toolhead:LIS2DW_CS)

[lis2dw]
cs_pin: LIS2DW_CS
spi_software_sclk_pin: LIS2DW_SCLK
spi_software_mosi_pin: LIS2DW_MOSI
spi_software_miso_pin: LIS2DW_MISO
axes_map: x,y,z

[resonance_tester]
accel_chip: lis2dw
probe_points:
-1,-1,-1


# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../scripts/K-ShakeTune/K-SnT_*.cfg]
7 changes: 7 additions & 0 deletions config/hardware/accelerometers/lis2dw_sht_v3.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[include generics/lis2dw_software_spi.cfg]

[lis2dw]
cs_pin: toolhead:LIS2DW
spi_software_sclk_pin: toolhead:SCK
spi_software_mosi_pin: toolhead:MOSI
spi_software_miso_pin: toolhead:MISO
20 changes: 20 additions & 0 deletions config/mcu_definitions/toolhead/Mellow_SHT36_v3.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[board_pins toolhead_manufacturer]
mcu: toolhead
aliases:
MCU_EXT_EN=gpio14 , MCU_EXT_STEP=gpio7 , MCU_EXT_DIR=gpio6 , MCU_EXT_UART=gpio15 , MCU_EXT_DIAG= ,

MCU_LIMIT_0=gpio20 , MCU_LIMIT_1=gpio16 ,

MCU_PROBE_1=gpio22 , MCU_PROBE_2=gpio24 ,

MCU_FAN0=gpio13 , MCU_FAN1=gpio21 ,

MCU_TH0=gpio27 , MCU_PT100=gpio17 , MCU_TC0= ,

MCU_HE0=gpio23 ,

MCU_RGBLED=gpio26 ,

MCU_SW_SCK=gpio2 , MCU_SW_MISO=gpio4 , MCU_SW_MOSI=gpio3 ,
MCU_LIS2DW_CS=gpio12 ,
MCU_MAX31865_CS=gpio17 ,
69 changes: 69 additions & 0 deletions user_templates/mcu_defaults/toolhead/Mellow_SHT36_v3.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

#--------------------------------------------#
#### Mellow SHT36 v3.x MCU definition ########
#--------------------------------------------#

[mcu toolhead]
##--------------------------------------------------------------------
canbus_uuid: change-me-to-the-correct-canbus-id
##--------------------------------------------------------------------

# If you want to override the wiring of the Mellow SHT, 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/Mellow_SHT36_v3.x.cfg] # Do not remove this line
[board_pins sht_mcu]
mcu: toolhead
aliases:
E_STEP=MCU_EXT_STEP , E_DIR=MCU_EXT_DIR , E_ENABLE=MCU_EXT_EN , E_TMCUART=MCU_EXT_UART ,

X_STOP=MCU_LIMIT_0 , Y_STOP=MCU_LIMIT_1 ,
PROBE_INPUT=MCU_PROBE_1 ,
TOOLHEAD_SENSOR=MCU_PROBE_2 ,

E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 ,

PART_FAN=MCU_FAN0 , E_FAN=MCU_FAN1 ,

STATUS_NEOPIXEL=MCU_RGBLED ,

LIS2DW=MCU_LIS2DW_CS ,
SCK=MCU_SW_SCK , MISO=MCU_SW_MISO , MOSI=MCU_SW_MOSI ,


#----------------------------------------#
# Mellow SHT36 v3.x pins remapping #
#----------------------------------------#

# These pins overrides are automatically added when you select a CANbus
# toolhead MCU during the installation process. They should provide a
# good base to work with. Feel free to adapt to your board if needed!

[extruder]
step_pin: toolhead:E_STEP
dir_pin: toolhead:E_DIR
enable_pin: !toolhead:E_ENABLE
heater_pin: toolhead:E_HEATER
sensor_pin: toolhead:E_TEMPERATURE

[probe]
pin: ^toolhead:PROBE_INPUT

[fan]
pin: toolhead:PART_FAN

[heater_fan hotend_fan]
pin: toolhead:E_FAN

## Uncomment the following line if not using sensorless homing
## and having the X endstop plugged to the toolhead MCU
# [stepper_x]
# endstop_pin: ^toolhead:X_STOP

[neopixel status_leds]
pin: toolhead:STATUS_NEOPIXEL

[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

1 change: 1 addition & 0 deletions user_templates/printer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
# [include config/hardware/accelerometers/adxl345_Fysetc_SB_Can_TH.cfg] # For ADXL plugged in Fysetc SB Can TH boards
# [include config/hardware/accelerometers/adxl345_nitehawk_sb.cfg] # For built in ADXL sensor on the Nitehawk SB board

# [include config/hardware/accelerometers/lis2dw_sht_v3.x.cfg] # Mellow SHT36 v3
# [include config/hardware/accelerometers/lis2dw_usb_rp2040_spi1.cfg] # For BTT S2DW V1.0, ...

# [include config/hardware/accelerometers/beacon_accelerometer.cfg] # For Beacon Rev H make sure Beacon. Do not forget to include the beacon_virtual_probe in the PROBE section!
Expand Down

0 comments on commit 517f7d5

Please sign in to comment.