I'm trying to get a temperature sensor (TMP36) working with a Pi running VenusOS, using the MCP3208 A/D, which is recommended for this application.
I'm using a 1.8v vRef, 3.3v supply to the A/D.
Within dbus-adc.conf I have:
device iio:device0
vref 1.84
scale 4095
I have the A/D working, in that I can see the analogue inputs in VenusOS. Using the TMP36 sensors, I can get sensible looking temperatures with a scale of 0.3 and offset of 17 set.
HOWEVER.... if I try to use a sensor on my HW tank, after it passes around 50 degrees, Venus reports 'unknown'.
From experimentation, i've found that it's only happy with a voltage input in the range of ~0.65v to 1.05v, regardless what 'scale' and 'offset' are set to. The displayed voltage in the GUI is always higher than this however (see below).
The temp sensor outputs around 1.27 volts at 65 degrees C.
I've tried using a pot to reduce the output voltage of the sensor a bit, but it skews the voltage (and therefore temp) too much so doesn't work.
I've also tried a LM335 (which is the sensor that Victron use with the GX), but it's voltage output is even higher.
Can anyone offer any suggestions? I'm puzzled why the voltage reported in Venus is too high, and why it's only happy with such a small voltage window, which makes the offset a bit pointless.
This seems like a software config issue or bug, but I can't see what!
Here's my observed info (scale & offset set to 0)
Temperature | Actual voltage | Displayed voltage | Displayed temperature |
---|---|---|---|
19.1 | 0.691 | 2.66 | -7 |
25 | 0.77 | 2.98 | 23 |
30 | 0.828 | 3.18 | 44 |
35 | 0.886 | 3.41 | 66 |
40 | 0.942 | 3.61 | 88 |
45 | 0.998 | 3.84 | 108 |
50 | 1.045 | 4.01 | 127 |
55 | 1.104 | 4.23 | --- |
60 | 1.160 | 4.45 | --- |
65 | 1.27 | 4.86 | --- |
What to try next?