USB link neatly measures temperature

-October 26, 2000

Figure 1 shows a convenient and neat way to measure temperature using the USB of a PC. An ADM1023 IC senses the temperature, and an Anchor Chips EZ-USB AN2131SC µC provides control. The ADM1023 is a low-cost device with an accuracy of 1°C and a resolution of 0.125°C. The IC is a two-channel device that can measure its own local temperature and the temperature of a remote location. You obtain remote-temperature sensing by connecting a remote thermal diode between the D+ and D– pins of the µC. You can locate this remote diode (for example, a diode-connected 2N3906) in a hot spot that can be as far as 100 ft from the ADB1023. However, for distances greater than 12 in., you should use twisted-pair cable. For distances greater than 12 ft, you should use shielded twisted-pair cable, such as microphone cable.

The EZ-USB µC includes an integrated I2C controller. This feature is useful in that the µC communicates via I2C, thereby simplifying both the circuit and the µC's firmware. The µC takes care of the lower level I2C signals. The firmware needs only to place the data destined for the I2C data register and to tell the µC to send it. A second advantage of this µC is the availability of on-chip RAM. You can write Windows drivers such that the firmware automatically downloads to the RAM when you plug in the board. The µC then simulates a disconnect and reconnects the board as a new device. This feature of the µC is called renumeration. The circuit in Figure 2 works as follows: The SDATA and SCLK pins of the ADM1023 connect to the corresponding pins of the µC. You need a 2.2-k? pullup resistor on both lines, because these pins have open-drain outputs. Also connected to these lines is a 24LC00, a 16-byte EEPROM. This ROM stores the board's device descriptors (the vendor and product IDs). Windows uses this information to identify which device driver to use.

The remote thermal diode (or diode-connected transistor) connects between the D+ and D– lines of the ADM1023. The ADM1023 can also signal an Alert. You can program the IC with high and low temperature limits for both the local and the remote channels. If any of the measured values of temperature are beyond the temperature limits, then the ADM1023 signals an Alert. The

is active-low; an LED tied to the pin lights whenever an Alert signal arises. The USB port supplies power to the circuit. The port can supply as much as 500 mA at 5V. Because both chips in Figure 2 operate at 3.3V, the circuit uses a 78033 regulator to generate the required 3.3V. The USB Master, which in this case is the application running on the PC, maintains control of the circuit. The master initiates all USB communications. The temperature-measurement circuit is the slave. It responds only when the master requests it to do so. When the master requests data (via the PC application), the request travels down the USB cable to the µC. This request consists of the device address of the ADM1023 and the address of the register that stores the data. It also tells the µC whether a read or a write is required. The µC then uses this information to interrogate the ADM1023 over the I2C interface.

Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES