adc_scaled: Add support for Duet2 Maestro "vref monitoring"

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-09-09 21:32:03 -04:00
parent 9b2816477b
commit 1f5848fc1a
3 changed files with 103 additions and 2 deletions

View File

@@ -2222,6 +2222,23 @@
# communication. The pin must have a valid pinmux configuration
# for the given SERCOM peripheral. This parameter must be provided.
# Duet2 Maestro analog scaling by vref and vssa readings. Defining an
# adc_scaled section enables virtual adc pins (such as "my_name:PB0")
# that are automatically adjusted by the board's vref and vssa
# monitoring pins. Be sure to define this config section above any
# config sections that use one these virtual pins.
#[adc_scaled my_name]
#vref_pin:
# The ADC pin to use for VREF monitoring. This parameter must be
# provided.
#vssa_pin:
# The ADC pin to use for VSSA monitoring. This parameter must be
# provided.
#smooth_time: 2.0
# A time value (in seconds) over which the vref and vssa
# measurements will be smoothed to reduce the impact of measurement
# noise. The default is 2 seconds.
# Replicape support - see the generic-replicape.cfg file for further
# details.
#[replicape]

View File

@@ -59,6 +59,11 @@ microsteps: 16
run_current: 0.800
stealthchop_threshold: 30
# Support analog sensor adjustments using VREF/VSSA pins
[adc_scaled vref_scaled]
vref_pin: PA17
vssa_pin: PA19
[extruder]
step_pin: PC4
dir_pin: PB7
@@ -69,7 +74,7 @@ filament_diameter: 1.750
heater_pin: !PC1
sensor_type: EPCOS 100K B57560G104F
pullup_resistor: 2200
sensor_pin: PB0
sensor_pin: vref_scaled:PB0
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@@ -110,7 +115,7 @@ stealthchop_threshold: 5
heater_pin: !PC0
sensor_type: EPCOS 100K B57560G104F
pullup_resistor: 2200
sensor_pin: PA20
sensor_pin: vref_scaled:PA20
control: watermark
min_temp: 0
max_temp: 130