Student Zone—ADALM2000 Experiment: Using Window Comparator to Implement Temperature Control

Publisher:EE小广播Latest update time:2023-07-21 Source: EEWORLDAuthor: Doug Mercer,顾问研究员 Antoniu Miclaus,系统 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Target


The goal of this experiment is to use two high-speed voltage comparators as window comparators and use this method to program the TMP01 low-power programmable temperature controller.


A window comparator is a circuit configuration, usually consisting of a pair of voltage comparators (inverting and non-inverting), where the output indicates whether the input signal is within a voltage range defined by two different thresholds: one threshold triggers the op amp comparator when a certain upper voltage limit, VREF(HIGH), is detected, and the other threshold triggers the op amp comparator when a certain lower voltage limit, VREF(LOW), is detected. The voltage level between the upper and lower reference voltages is called a window.


Material


►ADALM2000 active learning module

►Solderless Breadboard and Jumper Wire Kit

► Two AD8561 comparators

► One 2N3904 NPN transistor

►Two 1N914 small signal diodes

► One LED (any color)

► Three 10 kΩ resistors

► One 20 kΩ resistor

► One 470 Ω resistor


Window Comparator


Background


Consider the circuit shown in Figure 1.


This circuit uses a voltage divider network consisting of three equal value resistors: R1 = R2 = R3. The voltage drop across each resistor will be equal to one-third of the reference voltage (VREF). Therefore, the upper reference voltage limit (VREF(HIGH)) is set to 2/3 VREF and the lower reference voltage limit is set to 1/3 VREF.


If VIN is lower than the voltage lower limit, that is, VREF(LOW) is equal to 1/3 VREF, the output will be high and D2 will be forward biased. Since the base of the NPN transistor is a positive voltage, Q1 enters saturation. Therefore, the output voltage is zero, and the supply voltage generates a voltage drop across R5 and D3, thereby lighting the LED.


When VIN is higher than the lower voltage limit of 1/3 VREF and lower than 2/3 VREF (VREF(HIGH)), the outputs of both comparators are low and the diodes are reverse biased. There is no voltage at the base of Q1, the transistor is in the cut-off state, and no collector current flows through R6 or R5, D3. The output voltage is the power supply voltage V+.


If VIN is higher than the upper voltage limit, that is, VREF(HIGH) is equal to 2/3 VREF, the output will be high and D1 will be forward biased. Since the base of the NPN transistor is a positive voltage, Q1 enters saturation. Therefore, the output voltage is zero, and the supply voltage generates a voltage drop across R5 and D3, thereby lighting the LED.


image.png

Figure 1. Window comparator.


image.png

Figure 2. Window comparator breadboard circuit.


Hardware Setup


Build the following breadboard circuit for the window comparator circuit.


Procedure


A first waveform generator (W1) is used as a signal source to provide a triangle wave signal with a peak-to-peak value of 5V, a frequency of 100Hz, and a DC bias of 2.5V.


Use the second waveform generator (W2) as a 5 V constant reference voltage.


Use a 5 V power supply to power the circuit.


Configure the oscilloscope to display the output signal on channel 2 and the input signal on channel 1.


The resulting waveform is shown in Figure 3.


image.png

Figure 3. Window comparator waveform.


When the input voltage is between the upper and lower reference voltage limits, a window can be observed in the figure.


Temperature control


Background


An example of a window comparator application is a simple temperature controller circuit (Figure 2). The temperature sensor TMP01 uses the dual comparator configuration shown in Figure 1. After selecting appropriate values ​​for R1, R2, and R3, the circuit can monitor whether the temperature remains within the desired range (15°C to 35°C).


The TMP01 is a linear voltage output temperature sensor with a window comparator that the user can program to activate one of two open-collector outputs when a predetermined temperature set-point voltage is exceeded. A low drift reference voltage source can be used to set the set point. By connecting the two open-collector outputs together as a single-wire OR output, we can obtain a signal that is a logic high when the ambient temperature is within the target window.


image.png

Figure 4. Temperature sensor window comparator.


Programming the TMP01


In a basic fixed set point application using a simple resistor ladder divider, the desired temperature set point is programmed as follows:


►Select the desired hysteresis temperature.

►Calculate the hysteresis current IVREF.

►Select the desired set point temperature.

►Calculate the resistor divider ladder resistor values ​​required to produce the desired comparator setpoint voltages (SET HIGH and SET LOW).


The hysteresis current is easily calculated. For example, if 2 degrees of hysteresis is desired, IVREF = 17 μA. Next, determine the set point voltages VSETHIGH and VSETLOW using the VPTAT scale factor of 5 mV/K = 5 mV/(°C + 273.15) (1.49 V at 25°C). Then, calculate the voltage divider resistors based on these set points. The equation for calculating the resistors is:


VSETHIGH = (TSETHIGH + 273.15) (5 mV/°C)

VSETLOW = (TSETLOW + 273.15) (5 mV/°C)

R1 (in kΩ) = (VVREF − VSETHIGH)/IVREF = (2.5 V − VSETHIGH)/IVREF

R2 (in kΩ) = (VSETHIGH − VSETLOW)/IVREF

R3 (in kΩ) = VSETLOW/IVREF


The sum of R1 + R2 + R3 equals the load resistance required to draw the desired hysteresis current (i.e., IVREF) from the reference.


image.png

Figure 5. Temperature measurement.


IVREF = 2.5 V/(R1 + R2 + R3)


With VREF = 2.5 V, the base load resistor is 357 kΩ or greater (output current is 7 μA or less), resulting in a temperature set point hysteresis of 0 degrees. Larger load resistor values ​​will simply reduce the output current below 7 μA without affecting the operation of the device. The amount of hysteresis is determined by the choice of the load resistor value for VREF.


Task


1. Build the following circuit:


Measure the VPTAT output and calculate the measured temperature in degrees Kelvin and Celsius.


2. Build the following circuit:


2a. Identify the components and try to draw a circuit schematic.


2b. Using the information provided by the breadboard circuit, calculate the following parameters:


►IVREF

►VSETHIGH

►VSETLOW

►TSETHIGH

►TSETLOW


2c. What is the temperature set point hysteresis? How can I change this value?


2d. How does the circuit work? When do LED1 (red light) and LED2 (blue light) light up? Explain your answer.


question:


1. For the circuit in Figure 1, express the dependence of VREF(LOW) and VREF(HIGH) on R1, R2, R3, and W2. If all resistors are equal, what is the ratio of VREF(HIGH) to VREF(LOW)?


You can find answers to your questions in the StudentZone forum.


image.png

Figure 6. Temperature control.



About the Author


Doug Mercer graduated from Rensselaer Polytechnic Institute (RPI) in 1977 with a bachelor’s degree in electrical engineering. Since joining Analog Devices in 1977, he has contributed directly or indirectly to more than 30 data converter products and holds 13 patents. He was named an ADI Fellow in 1995. In 2009, he transitioned from full-time employment and continues to serve as a consultant to ADI as a Fellow Emeritus, contributing to the Active Learning Program. In 2016, he was named Engineer-in-Residence for the ECSE Department at RPI.


Antoniu Miclaus is a system applications engineer at Analog Devices, working on ADI educational projects and developing embedded software for Circuits from the Lab®, QA automation, and process management. He joined Analog Devices in February 2017 in Cluj-Napoca, Romania. He is currently a Master of Science student in the Master of Software Engineering program at Bebis Bolyai University. He holds a Bachelor of Science degree in Electronics and Telecommunications Engineering from the Technical University of Cluj-Napoca.


Reference address:Student Zone—ADALM2000 Experiment: Using Window Comparator to Implement Temperature Control

Previous article:Student Area—ADALM2000 Experiment: Heartbeat Monitoring Circuit
Next article:RAQ #215: Are there truly glitch-free voltage supervisor ICs?

Recommended ReadingLatest update time:2024-11-16 09:53

ADALM2000 Experiment: BJT Multivibrator
background knowledge This article explains the three main types of multivibrator circuits and how to build each. Multivibrator circuits generally consist of two inverting amplifier stages. Two amplifiers are connected in series or cascade with a feedback path from the output of the second amplifier back to the inpu
[Analog Electronics]
ADALM2000 Experiment: BJT Multivibrator
Student Zone - ADALM2000 Experiment: Floating (2-port) Current Source/Sink
Target This experiment investigates how to use the ΔVBE concept to produce a stable (less sensitive to changes in input voltage levels) output current. Use feedback to build a circuit that produces a constant or regulated output current over a range of supply voltages. Material ► ADALM2000 active learning modul
[Power Management]
Student Zone - ADALM2000 Experiment: Floating (2-port) Current Source/Sink
Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号