Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature moniting #22

Open
VasylSamoilov opened this issue Dec 15, 2024 · 1 comment
Open

Temperature moniting #22

VasylSamoilov opened this issue Dec 15, 2024 · 1 comment

Comments

@VasylSamoilov
Copy link

Is there a way to monitor cpu and other relevant components temperatures? Maybe even some voltages, if sensors are present.
Because while overclock works, it's hard to tell if we are withing temperature envelope, given that device can operate remotely, in different environments - it would be nice to have at least cpu temperature monitored.

@DF3AK
Copy link

DF3AK commented Jan 8, 2025

Yes, that is possible. We can read two temperatures remotely from the iio deamon. Take a look into here.

E.g., if one calls

iio_attr -u ip:[IP of the Libre] -c ad9361-phy temp0 input 

you get an integer. Divide it by 1000 and you get the current temperature of the AD9364.

For the Zynq, we get a raw value and two coefficients that form a linear equation. E.g.,

iio_attr -u ip:[IP of the Libre] -c xadc temp0 raw  # 2560
iio_attr -u ip:[IP of the Libre] -c xadc temp0 offset  # -2219
iio_attr -u ip:[IP of the Libre] -c xadc temp0 scale  # 123.040771484

The Zynq temperature is then

(raw+offset)*scale/1000 = (2560-2219)*123.040771484/1000 = 41.96 °C (rounded).

The 41.96°C are a result of running the pre-built image from this repo with max overclock and an ambient temperature of approx. 25°C.

Note that the latter seems to be the temperature of an ADC which is integrated into the Zynq's FPGA fabric, and therefore this is not actually the CPU temperature. But since both components are integrated into one chip, I would assume there is virtually no temperature difference.

I guess both readings are uncalibrated, please consult the datasheets if calibration is relevant. Further, regarding the AD936X temperature, this document states that

"The temperature sensor has inaccuracies and even with a onetime calibration the sensor is typically not useful for accurate measurements."

How accurate is it? I do not know :) One could of course do some temperature ramps and observe the reading, but for most purposes this would be an overkill. Accuracy will be more of an issue if, e.g., you would like to digitally trim/ regulate the VCXO based on the given readings.

To call iio_attr you will need to have libiio installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants