Pmod TMP2 Reference Manual

The Digilent Pmod TMP2 (Revision B) is a temperature module allowing users to detect ambient temperatures ranging from -40 °C to 150 °C.

Download This Reference Manual

Features

  • 16-bit ambient temperature sensor
  • Typical accuracy better that 0.25 ºC
  • 240 ms continuous conversion time
  • Programmable over and under-temperature control pins
  • No calibration required
  • 2×4-pin connector with I2C interface

Functional Description

The Pmod TMP2 utilizes the Analog Devices ADT7420. Users may measure the ambient temperature at a default resolution of 0.0625 °C.


Interfacing with the Pmod

The Pmod TMP2 communicates with the host board via the I²C protocol. Users may select one of the four I²C addresses based on the status of the JP1 and JP2 jumper blocks. A table listing the various settings and resulting address is provided below.

I²C Address Selection

I²C 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 Pmod TMP2, 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 Pmod TMP2 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 Jumper Blocks
Pin Signal Description Jumper Block State Description
1 & 5 SCL Serial Clock JP1 Open/Shorted Address bit 0 high/low
2 & 6 SDA Serial Data JP2 Open/Shorted Address bit 1 high/low
3 & 7 GND Power Supply Ground User Outputs
4 & 8 VCC Positive Power Supply Header Name Pin Name Description
J2 CT Critical Threshold Output
J3 INT Interrupt Output

By default, the Pmod TMP2 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:

Temperature Calculation for 13-bits of resolution

* 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 Pmod TMP2 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.


Additional Information

The schematics of the Pmod TMP2 are available here. Additional information about the ADT7420 including communication modes and specific timings of the chip can be found by checking out its datasheet here.

Example code demonstrating how to get information from the Pmod TMP2 can be found here.

If you have any questions or comments about the Pmod TMP2, feel free to post them under the appropriate section (“Add-on Boards”) of the Digilent Forum.