Strange input port choice for temperature sensor
-
Hi. I'd like to add an analog sensor to my configuration. As there are no generic analog sensors defined, I've chosen to add a temperature sensor and define the type as 'linear analog' as this comes closest to what I need. Here, I also have to choose an input port obviously. I understand that the only analog input ports on the DUET 3-6HC board are the z-probe inputs io0 .. io4 and the thermistor inputs temp0 .. temp3. However, for the analog input port, the config tool gives me the options: out4, out4.tach or out5.tach. That sounds very wrong to me; I need an input port, not an output port, so I was expecting to be able to choose from temp0 .. temp3. What am I missing here?
In addition, if I choose e.g. out5, the input field in the tool does not get a green outline. Furthermore, the relevant section in the configtool.json file still reads as if no port has been assigned:
"analog": [{
"beta": null,
"c": null,
"lastReading": null,
"name": "position sensor",
"port": null,
"r25": null,
"rRef": null,
"state": "ok",
"type": "linearanalog"
} -
@TNO_Marc When installing custom hardware, it is very possible that you are going to have to edit the config.g yourself. Unfortunately, the configuration tool cannot cover all eventualities without becoming overly complex.
If you know what port you want to connect your analog sensor, add an M308 line to your config.g. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m308-set-or-report-sensor-parameters. Note there are some extra parameters for analog sensors:
Additional parameters for linear analog sensors
- Fn F0 = unfiltered (fast response), F1 = filtered (slower response, but noise reduced and ADC oversampling used to increase resolution). F1 is only available when using a port intended for thermistors, not when using a general input port.
- Bnnn The temperature or other value when the ADC output is zero
- Cnnn The temperature or other value when the ADC output is full scale
The output of the sensor should show on the 'Extra' part of the 'Tools and Extra' in DWC, and can then be graphed on the Temperature Chart. It should also be possible to read the value in the Object Model.
Ian
-
@droftarts Thanks Ian for your quick response. I understand, and I kinda figured that out in the mean time. But because of the strange choices in the config tool, I thought I was doing something wrong. I'm gonna try it...
-
@TNO_Marc Can you provide your configtool template (configtool.json) or exact instructions how this can be reproduced? It looks OK on my setup:
Certain
io
ports must be selected with other sensor types (BME/DHT for example) because they're digital and not analog. -
@chrishamm configtool.json
here ya go