Temperature monitoring | the RECS use case

The FP7 European project CoolEmAll tackles energy efficiency in datacenters. The RECS platform developped by our partner Christmann is a 1U ComputeBox hosting up to 18 boards.

Context

The RECS2.0 is a 1U compute box that hosts up to 18 nodes splitted in two lanes. On each lane there are 9 fans. Fans on a lane are either on the inlet or the outlet airflow side.

As shown in figure above, current temperature sensors are located under the compute boards. However, these sensors exhibit a 1°c resolution that is not enough for our purposes.
Hence, we decided to add new temperature sensors to both evaluate airflow output temperature and to increase its intrinsic resolution.

Objectives

In an attempt to collect airflow temperature at the outlets and to increase temperature precision, we want to add temperature sensors.

On each of the nine output, we'll add a temperature sensor. In addition, we'll also add two temperature sensors at the air intake side. This will lead to a total of eleven temperature sensors.
We then want that these values to be sent to a Zabbix monitoring system using JSON frames format. This way, it will be easily to collect, synthesize and show the evolution of temperature within the RECS platform while running experiments.

Hardware | Sensors & Board

In order to reduce the overall development time, we will make use of off-the-shelf hardware. Therefore, the whole system will be composed of:

While popular and very cheap, the TCN75A temperature sensor is shipped uncalibrated ⇒ This means that it will require some calibration process. On the other hand, there exists some already calibrated temperature sensors but they cost ten times the price :|

I2C address issue

An I2C bus enables users to connect up to 128 devices. However, integrated circuit manufacturers tend to reduce the pin count of their devices. This leads to a partially user configurable I2C address. Hence, each I2C device address has a fixed part set by the manufacturer along with a user configurable part.

As you may have noticed, the TCN75A only features 3 bits of address [A0, A1, A2] to differentiate sensors from each others … which means up to 8 sensors :(

To overcome this limitation, we'll make use of the hidden second I2C bus.
Basically, the second I2C bus (I2C0) is intended to drive the camera connected to the CSI header. However, the Raspberry Pi version 2.0 board features an unpopulated P5 header whose pinout gives access to additional I/O .

Care must be taken because the P5 header features an unconventionnal pinout numbering. This came from the fact that this unpopulated P5 header is intended to be soldered from the rear side of the RPi board.

Moreover, to enable this hidden I2C0 bus, 1K8 pull-up resistors ought to be added on the SDA and SCL lines (already soldered on the I2C1/P1 header. Additionnally, some code is required to re-map functionnalities of the BCM 2835 to the P5 header.

Sensors to RPi board interconnect

According to address configuration capabilities of the TCN75A, I2C address of these devices will range from 0x48 to 0x4F.

You can check I2C sensors availability through the i2cdetect shell command:

Below is a description of the interconnection between the various devices and the I2C0 and I2C1 bus of the RPi board:

I2C bus

0x48

0x49

0x4A

0x4B

0x4C

0x4D

0x4E

0x4F

I2C0

recs9

recs18

recs10

I2C1

recs1

recs2

recs3

recs4

recs5

recs6

recs7

recs8

Below are pictures of the sensors interconnect.Interconnection details

VCC (3.3v)

SDA

SCL

GND

Notes

I2C0

beige(noir)

noir(beige)

beige(blanc)

blanc(beige)

2 paires torsadées

I2C1

rouge

orange

jaune

vert

Software | Python and JSON frame formatting

The expected behaviour of our temperature monitoring system is to collect values from sensors on the RECS platform and then to forward these values to a Zabbix monitoring system.

Figure on the right side shows what has been obtained from the Zabbix server regarding the various monitored parameters tied to the RECS18 node:

temperature are values from sensor under the board,

ext_temperature are values from our TCN75A sensor.

In order to spread the load on the Zabbix server, we collect sensors values every second and after of 45s harvesting, we send a JSON frame. Such frame contains all values and timestamps from all sensors tied to a peculiar I2C bus.

Python code @ RPi

The Python code executed on the RPi board is mainly composed of 3 parts:

Extension | Humidity sensor

To extend capabilities of our monitoring system, we'd like to add a humidity sensor. The Honeywell HIH6130 device is a calibrated temperature and humidity sensor featuring an I2C interface (note that it is also configurable as a SPI interface —command mode).