adc_temperatures: Add "PT100 INA826" sensor type

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-04-09 15:11:12 -04:00
parent b2caa486c5
commit c463893a5e
2 changed files with 18 additions and 5 deletions

View File

@ -146,9 +146,10 @@ heater_pin: ar10
# periods) to the heater. The default is 1.0.
sensor_type: EPCOS 100K B57560G104F
# Type of sensor - this may be "EPCOS 100K B57560G104F", "ATC
# Semitec 104GT-2", "NTC 100K beta 3950", or "AD595". Additional
# sensor types may be available - see the example-extras.cfg file
# for details. This parameter must be provided.
# Semitec 104GT-2", "NTC 100K beta 3950", "AD595", or "PT100
# INA826". Additional sensor types may be available - see the
# example-extras.cfg file for details. This parameter must be
# provided.
sensor_pin: analog13
# Analog input pin connected to the sensor. This parameter must be
# provided.
@ -158,7 +159,7 @@ sensor_pin: analog13
# thermistor. The default is 4700 ohms.
#adc_voltage: 5.0
# The ADC comparison voltage. This parameter is only valid when the
# sensor is an AD595. The default is 5 volts.
# sensor is an AD595 or "PT100 INA826". The default is 5 volts.
control: pid
# Control algorithm (either pid or watermark). This parameter must
# be provided.

View File

@ -81,9 +81,21 @@ AD595 = [
(440., 4.476), (460., 4.686), (480., 4.896)
]
PT100 = [
(0, 0.00), (1, 1.11), (10, 1.15), (20, 1.20), (30, 1.24), (40, 1.28),
(50, 1.32), (60, 1.36), (70, 1.40), (80, 1.44), (90, 1.48), (100, 1.52),
(110, 1.56), (120, 1.61), (130, 1.65), (140, 1.68), (150, 1.72), (160, 1.76),
(170, 1.80), (180, 1.84), (190, 1.88), (200, 1.92), (210, 1.96), (220, 2.00),
(230, 2.04), (240, 2.07), (250, 2.11), (260, 2.15), (270, 2.18), (280, 2.22),
(290, 2.26), (300, 2.29), (310, 2.33), (320, 2.37), (330, 2.41), (340, 2.44),
(350, 2.48), (360, 2.51), (370, 2.55), (380, 2.58), (390, 2.62), (400, 2.66),
(500, 3.00), (600, 3.33), (700, 3.63), (800, 3.93), (900, 4.21),
(1000, 4.48), (1100, 4.73)
]
def load_config(config):
# Register default sensors
pheater = config.get_printer().lookup_object("heater")
for sensor_type, params in [("AD595", AD595)]:
for sensor_type, params in [("AD595", AD595), ("PT100 INA826", PT100)]:
func = (lambda config, params=params: Linear(config, params))
pheater.add_sensor(sensor_type, func)