Board Sensor Calibration
ed at tanous.net
Fri Aug 21 02:23:13 AEST 2020
On Wed, Aug 19, 2020 at 10:41 AM Maxim Sloyko <maxims at google.com> wrote:
> Hi OpenBMC!
> We would like to have a value reported by a certain sensor changed
according to our calibration results. This is a temperature sensor and the
calibration has nothing to do with the sensor itself -- so no need to
change the driver or anything -- but with a sensor placement on the board.
Basically we want to infer the temperature at a different location by
calibrating the sensor.
Do you have more details on what the transfer function is? Is it a simple
offset, or is it a more complicated lookup table? Does it include multiple
sensors to generate this new value, or is it a single sensor? Is it
intended to "replace" the existing value, or is it intended to complement
The ideas I've heard before that this might be:
1. The temp sensor isn't that accurate, so we want to calibrate it to a
better transfer function that we determined empirically.
2. The temp sensor is adjacent to the thing we really want to measure, so
we want to create an offset including the CFM that approximates the
temperature of the thing we can't measure directly.
3. I want to transform the value of the sensor into different units, (Power
+ CFM to exit air air, or power + time to energy)
> Are there any tools in OpenBMC that would allow us to add the calibration
curve to, say, phosphor-hwmon and have it report the value different from
the one reported by the underlying sensor? Did anybody else have to deal
with something like this and what was your solution? Do people more
familiar with sensor architecture have any recommendations on how best to
The closest examples that come to mind for dbus-sensors type architectures
CFM sensor and Exit air temp sensor. Both pull in a number of other
sensors, and run them through a math transform to come up with a "new"
sensor value derived from the other inputs. This sounds similar to what
you want, although it's probably more complex than you're looking for.
The "virtual sensor" proposal currently in review, which I personally have
technical issues with, and have left comments as such. I don't believe
there's a working implementation of this yet, but there are those working
If it were me, and I wanted to add a simple lookup table to dbus sensors,
I'd probably model it in an entity manager config for the temperature
sensor, similar to how the stepwise controller models it, and add that into
the Hwmon temp sensor daemon. The below example adds a +5 celcius offset
to the bmc temp sensor as an example. Bear in mind, this wouldn't work
today, you'd have to adjust hwmontempsensor to take this into account.
"Name": "BMC Temp",
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openbmc