Reheat A0

From iagent
Jump to: navigation, search

Reheat is a 6 output heater board with temperature sensors and fans for multi material printing.

Schematics

Config tool

pin description

This is temporary while waiting for a proper pinout

Features

  • RP2354B microcontroller (ARM Cortex-M33, 150 MHz)
  • 6x heater outputs (24 V, MOSFET-switched)
  • 6x fan outputs (24 V PWM) with tachometer inputs
  • 6x thermistor/temperature sensor inputs
    • Supports: NTC 10K, NTC 100K, PT100, PT1000, Type K thermocouple
    • Jumper-selectable per channel
  • 12x endstop inputs (5 V tolerant, TVS-protected)
    • ENDSTOP-12 supports a bidirectional signal (e.g. filament encoder)
  • USB-C interface (USB 2.0)
  • 24 V power input with onboard 5 V (3 A) and 3.3 V regulation
  • Overcurrent detection on fan bus

Pinout

GPIO Signal Connector
GPIO0 HEATER-1 J2
GPIO1 HEATER-2 J3
GPIO2 HEATER-3 J6
GPIO3 HEATER-4 J11
GPIO4 HEATER-5 J12
GPIO5 HEATER-6 J13
GPIO6 FAN-1 J34
GPIO7 FAN-2 J35
GPIO8 FAN-3 J36
GPIO9 FAN-4 J37
GPIO10 FAN-5 J38
GPIO11 FAN-6 J39
GPIO12 TACH-1 J34
GPIO13 TACH-2 J35
GPIO14 TACH-3 J36
GPIO15 TACH-4 J37
GPIO16 TACH-5 J38
GPIO17 TACH-6 J39
GPIO18 ENDSTOP-1 J14
GPIO19 ENDSTOP-2 J15
GPIO20 ENDSTOP-3 J16
GPIO21 ENDSTOP-4 J17
GPIO22 ENDSTOP-5 J18
GPIO23 ENDSTOP-6 J19
GPIO24 ENDSTOP-7 J20
GPIO25 ENDSTOP-8 J21
GPIO26 ENDSTOP-9 J22
GPIO27 ENDSTOP-10 J23
GPIO28 ENDSTOP-11 J24
GPIO29 ENDSTOP-12 J25
GPIO30 MUX-S0 Internal
GPIO31 MUX-S1 Internal
GPIO32 MUX-S2 Internal
GPIO33 PWM-GAIN Internal
GPIO34 PWM-OFFSET Internal
GPIO35 PWM-CURRENT Internal
GPIO36 EN-PULLUP Internal
GPIO37 ENDSTOP-12-DIR J25
GPIO38 FAN-OC (overcurrent) Internal
GPIO40 / ADC0 THERM-1 J27
GPIO41 / ADC1 THERM-2 J28
GPIO42 / ADC2 THERM-3 J29
GPIO43 / ADC3 THERM-4 J30
GPIO44 / ADC4 THERM-5 J31
GPIO45 / ADC5 THERM-6 J32
GPIO46 / ADC6 ADC (MUX output) Internal
GPIO47 / ADC7 CURRENT sense Internal

Hardware connections

Power

The board takes 24 V DC on a 4-pin connector (J33). A fuse (F1) and a 2 mΩ current-sense resistor (R98) protect the input. Onboard regulators provide +5 V (TPS54302 buck converter, 3 A) and +3.3 V (AMS1117-3.3, 1 A) for logic and sensor pull-ups.

Heaters

Six heater outputs use 2SK3019 N-channel MOSFETs driven from GPIO0–GPIO5. Each output has a 2-pin female connector and a flyback Schottky diode. The heater voltage is 24 V.

Fans

Six fan outputs (GPIO6–GPIO11) use N-channel MOSFETs with a 24 V supply. Each has a 3-pin connector (V+, GND, TACH). Tachometer signals are read on GPIO12–GPIO17. An LM393 comparator monitors the fan bus for overcurrent and signals FAN-OC on GPIO38.

Thermistors

Each thermistor channel has a 3-pin connector (J27–J32) with a jumper (JP1–JP6) to select the measurement mode. An analog MUX (CD4051) and op-amp signal conditioning chain feed the ADC inputs (GPIO40–GPIO45). The signal conditioning supports:

Sensor type Measurement method
NTC 10K Voltage divider with 4.7 K pull-up
NTC 100K Voltage divider with 4.7 K pull-up
PT100 1 mA constant current source (Kelvin connection)
PT1000 1 mA constant current source (Kelvin connection)
Type K thermocouple ×101 gain amplifier, buffered

For NTC thermistor or PT1000 measurements, close jumpers JP1–JP6 to connect the 4.7 K pull-up resistors. With the jumpers closed, ADC0–ADC5 (GPIO40–GPIO45) can be used as standard thermistor inputs with a 4.7 K pull-up to 3.3 V, without the need for any additional signal conditioning.

Errata

  1. DP/DM USB data lines are swapped.
  2. RUN pin is hardwired to ground, preventing software reset.
  3. U11 and U15 (LMV321 op-amps in thermistor circuit) have V+ and V- supply pins reversed.
  4. Pull-up resistor footprints (JP1–JP6) use a 1 mm pin pitch instead of the standard 2.54 mm.
  5. VUSB is unconnected, so the board requires 24 V power to operate even when connected over USB.

Klipper configuration

The Reheat A0 connects to the host over USB and is configured as an MCU in Klipper. Find the serial path with ls /dev/serial/by-id/ and add to printer.cfg:

[mcu reheat]
serial: /dev/serial/by-id/usb-Klipper_rp2350_XXXXXXXXXXXX-if00

Heaters

[heater_generic heater1]
heater_pin: reheat:gpio0
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: reheat:gpio40
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114

[heater_generic heater2]
heater_pin: reheat:gpio1
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: reheat:gpio41
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114

Fans

[fan_generic fan1]
pin: reheat:gpio6

[fan_generic fan2]
pin: reheat:gpio7

Endstops

Endstop pins can be referenced in the relevant stepper sections:

[stepper_x]
endstop_pin: reheat:gpio18

Flashing Klipper

  1. Put the board in BOOTSEL mode: hold the BOOT button while plugging in USB (or hold BOOT, press RESET, then release BOOT).
  2. Build and flash from the Klipper source directory:
make menuconfig
# Processor model: rp2350
# Bootloader offset: No bootloader
# Communication interface: USBSERIAL
make
picotool load out/klipper.uf2 --force
picotool reboot

The board will reboot and appear as /dev/ttyACM0 (or similar).

Full config file

# ======================================================================
#  Reheat_A0.cfg  —  Complete Klipper configuration for the Reheat A0
#  MCU: RP2354B (RP2350 family, ARM Cortex-M33, 150 MHz, 48 GPIO, 8 ADC)
#  Source: https://wiki.iagent.no/wiki/Reheat_A0
#
#  Board functions:
#    6x heater outputs (24V MOSFET)        GPIO0..GPIO5
#    6x fan outputs (24V PWM)              GPIO6..GPIO11
#    6x fan tachometer inputs              GPIO12..GPIO17
#    12x endstop inputs (5V tolerant)      GPIO18..GPIO29 (+ GPIO37 dir)
#    6x thermistor/temperature ADC inputs  GPIO40..GPIO45 (ADC0..ADC5)
#    analog mux + PWM bias control         GPIO30..GPIO35
#    endstop pull-up enable                GPIO36
#    fan over-current flag                 GPIO38
#    ADC mux output / input-current sense  GPIO46/GPIO47 (ADC6/ADC7)
#
#  Each fan is paired with its matching heater (FAN1<->HEATER1, ...).
#
#  Build firmware:  RP2350 (ARM) processor, USB communication.
#  Flash:  hold BOOT while plugging in USB-C to enter BOOTSEL.
#  ERRATA: RUN pin is hardwired -> Klipper cannot software-reset the MCU
#          (re-enter BOOTSEL manually to reflash). USB DP/DM are swapped.
# ======================================================================


# ----------------------------------------------------------------------
#  MCU
# ----------------------------------------------------------------------
[mcu reheat]
# USB-C, enumerates over USB. Use the stable by-id path:
#   ls /dev/serial/by-id/*
serial: /dev/serial/by-id/usb-Klipper_rp2350_21745F8FD0431B3A-if00
restart_method: command


# ----------------------------------------------------------------------
#  Endstop pull-up enable (GPIO36)
#  Drive high at boot so the 12 endstop inputs read correctly.
# ----------------------------------------------------------------------
[static_digital_output endstop_pullup_enable]
pins: reheat:gpio36


# ======================================================================
#  HEATERS  (24V MOSFET outputs, paired with ADC thermistors)
#  Sensor types supported by the board: NTC 10K, NTC 100K, PT100,
#  PT1000, Type-K thermocouple. NTC 100K -> "Generic 3950".
#  Pairing of heater<->thermistor is arbitrary; reassign as needed.
# ======================================================================

[heater_generic heater1]                # HEATER1 / THERM1
heater_pin: reheat:gpio0
sensor_pin: reheat:gpio40               # ADC0
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114
min_temp: -272
max_temp: 300

[heater_generic heater2]                # HEATER2 / THERM2
heater_pin: reheat:gpio1
sensor_pin: reheat:gpio41               # ADC1
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114
min_temp: -272
max_temp: 300

[heater_generic heater3]                # HEATER3 / THERM3
heater_pin: reheat:gpio2
sensor_pin: reheat:gpio42               # ADC2
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: -272
max_temp: 300

[heater_generic heater4]                # HEATER4 / THERM4
heater_pin: reheat:gpio3
sensor_pin: reheat:gpio43               # ADC3
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: -272
max_temp: 300

[heater_generic heater5]                # HEATER5 / THERM5
heater_pin: reheat:gpio4
sensor_pin: reheat:gpio44               # ADC4
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: -272
max_temp: 300

[heater_generic heater6]                # HEATER6 / THERM6
heater_pin: reheat:gpio5
sensor_pin: reheat:gpio45               # ADC5
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: -272
max_temp: 300


# ======================================================================
#  FANS  (24V PWM)
#  Each fan follows its matching heater (FAN1<->HEATER1, FAN2<->HEATER2,
#  ... FAN6<->HEATER6) and turns on when that heater is active.
# ======================================================================

[heater_fan fan1]                       # FAN1 -> HEATER1
pin: reheat:gpio6
heater: heater1
heater_temp: 50.0

[heater_fan fan2]                       # FAN2 -> HEATER2
pin: reheat:gpio7
heater: heater2
heater_temp: 50.0

[heater_fan fan3]                       # FAN3 -> HEATER3
pin: reheat:gpio8
heater: heater3
heater_temp: 50.0

[heater_fan fan4]                       # FAN4 -> HEATER4
pin: reheat:gpio9
heater: heater4
heater_temp: 50.0

[heater_fan fan5]                       # FAN5 -> HEATER5
pin: reheat:gpio10
heater: heater5
heater_temp: 50.0

[heater_fan fan6]                       # FAN6 -> HEATER6
pin: reheat:gpio11
heater: heater6
heater_temp: 50.0


# ======================================================================
#  ENDSTOPS  (11 inputs, 5V tolerant)  +  NeoPixel on EP12
#  This board has no stepper drivers, so endstops are exposed as
#  runtime-readable buttons. To use one as a homing endstop instead,
#  reference its pin from a stepper on your motion board, e.g.:
#     [stepper_x]
#     endstop_pin: reheat:gpio18
#  Endstop 12 (GPIO29) is wired to a NeoPixel data line (see below).
# ======================================================================

# Each endstop is exposed as a button so its state is queryable. The
# press/release gcode is intentionally empty (just reads the input).
[gcode_button endstop1]
pin: reheat:gpio18
press_gcode:
release_gcode:

[gcode_button endstop2]
pin: reheat:gpio19
press_gcode:
release_gcode:

[gcode_button endstop3]
pin: reheat:gpio20
press_gcode:
release_gcode:

[gcode_button endstop4]
pin: reheat:gpio21
press_gcode:
release_gcode:

[gcode_button endstop5]
pin: reheat:gpio22
press_gcode:
release_gcode:

[gcode_button endstop6]
pin: reheat:gpio23
press_gcode:
release_gcode:

[gcode_button endstop7]
pin: reheat:gpio24
press_gcode:
release_gcode:

[gcode_button endstop8]
pin: reheat:gpio25
press_gcode:
release_gcode:

[gcode_button endstop9]
pin: reheat:gpio26
press_gcode:
release_gcode:

[gcode_button endstop10]
pin: reheat:gpio27
press_gcode:
release_gcode:

[gcode_button endstop11]
pin: reheat:gpio28
press_gcode:
release_gcode:

# NeoPixel on the EP12 connector (GPIO29 data line).
[neopixel reheat_led]
pin: reheat:gpio29
chain_count: 1
color_order: GRB
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 0.0

# EP12 direction line (GPIO37) — drive the level-shifter towards the
# NeoPixel (output direction).
[static_digital_output endstop12_dir]
pins: reheat:gpio37


# ======================================================================
#  ANALOG MUX + PWM BIAS  (board-internal sensor front-end)
#  MUX_S0..S2 select one of the multiplexed analog channels, read back
#  on ADC_MUX (GPIO46/ADC6). PWM_GAIN/OFFSET/CURRENT set the analog
#  amplifier bias used for PT100/thermocouple measurement.
#  These are exposed as raw pins; exact scaling is board-specific.
# ======================================================================

[output_pin mux_s0]
pin: reheat:gpio30

[output_pin mux_s1]
pin: reheat:gpio31

[output_pin mux_s2]
pin: reheat:gpio32

[output_pin pwm_gain]
pin: reheat:gpio33
pwm: True
cycle_time: 0.001
value: 0

[output_pin pwm_offset]
pin: reheat:gpio34
pwm: True
cycle_time: 0.001
value: 0

[output_pin pwm_current]
pin: reheat:gpio35
pwm: True
cycle_time: 0.001
value: 0


# ======================================================================
#  PROTECTION / MONITORING
# ======================================================================

# Fan over-current flag (GPIO38) — reads active on an over-current event.
[gcode_button fan_overcurrent]
pin: reheat:gpio38
press_gcode:
release_gcode:

# Input-current sense (GPIO47 / ADC7) via the 2 mΩ shunt.
# Scale: 1 A = 0.1 V  ->  3.3 V full-scale = 33 A. The reported
# "temperature" value is therefore the input current in amps.
[adc_temperature reheat_current]
temperature1: 0
voltage1: 0
temperature2: 33
voltage2: 3.3

[temperature_sensor input_current]
adc_voltage: 3.3
sensor_pin: reheat:gpio47
sensor_type: reheat_current
min_temp: -1
max_temp: 40

Errata

  1. DP/DM USB data lines are swapped.
  2. RUN pin is hardwired to ground, preventing software reset.
  3. U11 and U15 (LMV321 op-amps in thermistor circuit) have V+ and V- supply pins reversed.
  4. Pull-up resistor footprints (JP1–JP6) use a 1 mm pin pitch instead of the standard 2.54 mm.