Digilent PmodTMP2 - Temperature Sensor
The PmodTMP2 is an ambient temperature sensor powered by the Analog Devices ADT7420. Through the I
2C interface, users may appreciate a resolution of 0.0078°C through 16 bits of data.
Interfacing with the Pmod
The PmodTMP2 communicates with the host board via the I
2C protocol. Users may select one of the four I
2C addresses based on the status of the JP1 and JP2 jumper blocks. A table listing the various settings and resulting address is provided below.
I2C Address Selection
I2C Addresses |
JP2 |
JP1 |
Device Address |
Open |
Open |
0x4B (0b10001011) |
Open |
Shorted |
0x4A (0b1001010) |
Shorted |
Open |
0x49 (0b1001001) |
Shorted |
Shorted |
0x48 (0b1001000) |
To read the temperature data from the PmodTMP2, users must first call the Analog Devices chip by whichever slave address you have set with the jumper blocks and then write the register address of the most significant byte of the temperature data (0x00).
Then, issue a restart condition and perform a read for two bytes of data (the register address is auto-incremented). Users may also notice that because the register address for the temperature data is 0x00, they may read the two data registers upon power-up without having to write to the address register because it is already in the correct location. The address register will need to be written to for subsequent readings.
The PmodTMP2 can also be set up to trigger two external output pins, CT (critical temperature) and INT (overtemperature or undertemperature interrupt). The CT pin is triggered whenever the critical temperature is reached which starts out at a default temperature of 147 °C. The INT pin by default triggers whenever the high temperature defined by the THIGH or the low temperature defined by TLOW is detected. Users may also enable a comparator mode so that status of each of the pins will not change until the hysteresis value has been passed.
Pinout Description Table
Header J1 |
Pin |
Signal |
Description |
1 & 5 |
SCL |
Serial Clock |
2 & 6 |
SDA |
Serial Data |
3 & 7 |
GND |
Power Supply Ground |
4 & 8 |
VCC |
Positive Power Supply |
Jumper Blocks |
Jumper Block |
State |
Description |
JP1 |
Open/Shorted |
Address bit 0 high/low |
JP2 |
Open/Shorted |
Address bit 1 high/low |
User Outputs |
Header Name |
Pin Name |
Description |
J2 |
CT |
Critical Threshold Output |
J3 |
INT |
Interrupt Output |
By default, the PmodTMP2 collects data with 13 bits of resolution including the sign bit. Users may calculate the corresponding decimal temperature by reading the 13 bits (with the most significant bit as the sign bit) in a two's complement format and dividing by 16 (for 13-bit resolution). Thus, one equation that could be used to determine the measured temperature could be:
* The 212 comes from the fact that there are 12 bits of integer data in the 13-bits of resolution.
Any external power applied to the PmodTMP2 must be within 2.7V and 5.5V; however, it is recommended that Pmod is operated at 3.3V.
Physical Dimensions
The pins on the pin header are spaced 100 mil apart. The PCB is 1 inch long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header.