AXIOM Beta/Temperatures

From apertus wiki
Jump to: navigation, search

1 Different Temperature Sensors

The AXIOM Beta hardware contains several temperature sensors (some dedicated sensors some integrated in other chips) the different chips and components are also operating at different temperature ranges. The Zynq for example has a rather hot operation range but the image sensor is meant to be as cold as possible meaning just a few degrees above room temperature. This page is a collection of information related to reading the different temperatures throughout the hardware.

1.1 MicroZed™ Zynq 7020

The Zynq 7020 has a maximum operating temperature of 85°C and has a special heat sink attached.

The temperature can be read with the

axiom-zynq-info.sh

script (AXIOM Beta Firmware Version 2.0) which contains the following code lines:

ZTO=`cat /sys/devices/soc0/amba/*.adc/iio*/in_temp0_offset` 
ZTR=`cat /sys/devices/soc0/amba/*.adc/iio*/in_temp0_raw` 
ZTS=`cat /sys/devices/soc0/amba/*.adc/iio*/in_temp0_scale` 

ZT=`dc -e "5k $ZTR ${ZTO/-/_} + $ZTS * 1000 / p"`

printf "%-14.14s\t%8.4f °C\n" "Temp" $ZT

1.2 Power Board

The AXIOM Beta Power Board contains a dedicated LM75 digital thermometer (datasheet) which can be read with the following command:

cat /sys/class/hwmon/hwmon0/temp1_input 

The output divided by 1000 is provided in °C.

The normal operation range of the Power Board goes until 60°C but should not exceed 75°C.

1.3 CMV12000 Image Sensor

The image sensor contains an integrated temperature sensor, see CMV12000 datasheet chapter 7.6.5 Temperature Sensor for reference.

This value can be read by running (AXIOM Beta Firmware Version 2.0):

axiom-cmv-reg.sh 127

The return value needs to be processed to acquire the temperature in degrees (the 𝐶𝐿𝐾_𝐼𝑁 is currently 20.833):

temperature [°C] = (RETURN_VALUE - 572.92) / 2.43

The CMV12000 is meant to operate as cool as possible as a temperature increase means visible image noise increase. In normal operation the image sensor is just a few degrees above room temperature.

1.4 Logging Script

The following bash script can be run inside the AXIOM Beta and captures Zynq, Power Board and CMV12000 temperatures every 10 seconds and logs them into a file (tab separated values) if run like:

./temperature_record.sh | tee temperature.log

Script:

#!/bin/bash

# make sure axiom-start.sh has been run before the script 
# otherwise this will crash the camera when trying to read image sensor 
# registers.

echo "Time  Zynq    Power Board     Image Sensor"

while true; do
# Power Board
PBTEMPRAW=`cat /sys/class/hwmon/hwmon0/temp1_input`


# Zynq
ZTO=`cat /sys/devices/soc0/amba/*.adc/iio*/in_temp0_offset`
ZTR=`cat /sys/devices/soc0/amba/*.adc/iio*/in_temp0_raw`
ZTS=`cat /sys/devices/soc0/amba/*.adc/iio*/in_temp0_scale`
ZT=`dc -e "5k $ZTR ${ZTO/-/_} + $ZTS * 1000 / p"`


# CMV12000
CMVTEMP=`axiom-cmv-reg.sh 127`

# CLK_IN = 250/12 MHz = 20.8333

# cmv12000 offset formular:
# 825*freq/30 = 572.92

# cmv12000 slope formular:
# 3.5*freq/30 = 2.43

CMVTEMPDEC=`printf "%d" $CMVTEMP`
CMVTEMPFLOAT=`bc <<< "scale=3;($CMVTEMPDEC - 572.92) / 2.43"`

# Output
printf "%d\t%8.2f\t%8.2f\t%8.2f\n" $SECONDS $ZT $(($PBTEMPRAW/1000)) $CMVTEMPFLOAT

#repeat reading every 10 seconds
sleep 10

done