
5.7. Temperature Sensor
The Armadillo-IoT temperature sensor uses the i.MX 7Dual's TEMPMON (Temperature Monitor).
5.7.1. Obtaining the Temperature
By reading the value from the
/sys/class/thermal/thermal_zone1/temp
file, it is possible to obtain the
measured temperature of the i.MX 7 Dual.
[armadillo ~]# cat /sys/class/thermal/thermal_zone1/temp
50000
Temperature is displayed in units of milli °C. In this example it shows 50.000 °C.
Figure 5.50. Obtaining the measurement temperature of the i.MX 7 Dual
5.8. AD Converter
Armadillo-IoT G3 can acquire the power supply voltage and the voltage of the external battery connected to the RTC
backup interface (CON13) with the AD converter function of the BMIC (Board Management IC).
5.8.1. Obtaining the Voltage
The power supply voltage is divided and input to the AD converter. In order to acquire the power supply voltage, it is
necessary to first acquire the input voltage to the AD converter. Since the voltage of the external battery is not divided, the
input voltage of the AD converter will be the voltage of the external battery as-is.
The AD converter is implemented as an IIO (Industrial I/O) device. The input voltage can be calculated from the file
under
/sys/bus/iio/devices/iio:device0/
directory.
The IIO device will be named iio:deviceN (N is a sequential number from '0') in the
order in which the devices are detected. IIO devices can be identified from the IIO
device name. The IIO device name of the BMIC's AD converter is "3-0012".
[armadillo ~]# cat /sys/bus/iio/devices/iio:device0/name
3-0012
The input voltage to the AD converter can be calculated from the AD conversion value and the minimum input voltage
variation.
[Input voltage (mV) to the AD converter] = [in_voltage_raw] × [in_voltage_scale]
Figure 5.51. Calculation Formula of Input Voltage to the AD Converter
The files under
/sys/bus/iio/devices/iio:device0/
which are needed for calculating the input voltage are
shown below.
Armadillo-IoT Gateway G3Product Manual - INTL
Operational Checks
77