150 likes | 515 Views
Comparators. B. Furman 15APR2014. Learning Objectives. Explain the basic comparator action considering inputs to an op-amp Construct an inverting or non-inverting comparator using a comparator with open collector output
E N D
Comparators B. Furman 15APR2014
Learning Objectives • Explain the basic comparator action considering inputs to an op-amp • Construct an inverting or non-inverting comparator using a comparator with open collector output • Explain the concept of hysteresis to avoid ‘chatter’ around a reference level
PowerSource SignalConditioning PowerInterface UserInterface Actuator Sensor System toControl ME 110 ME 136 ME 154 ME 157 ME 182 ME 189 ME 195 Mechatronics Concept Map ME 106 ME 120 Controller(Hardware & Software) ME 106 ME 190 ME 187 ME 106 INTEGRATION ME 106 ME 120 ME 106 ME 154 ME 157 ME 195 ME 120 ME 297A BJ Furman 22JAN11
The Comparator • A specially designed op-amp, optimized to switch Voutfast • If V+ > V-, then Vout Vs • If V- > V+, then Vout 0 V • But usually output is ‘open collector’ • Can pull low, but… • Needs external resistor (pull-up) to go high Intro to Mechatronic Design, Fig. 11.17, p. 245 Open collector output stage (typical of most comparators, such as LM339) Typical op-amp output stage and some comparators (Push-Pull (Totem Pole)) http://www.ermicro.com/blog/?p=1578 Intro to Mechatronic Design, Fig. 11.18, p. 245
Inside the LM339 comparator www.national.com/ds/LM/LM339.pdf
Simple Non-inverting Comparator Intro to Mechatronic Design, Fig. 11.19, p. 246 Intro to Mechatronic Design, Fig. 11.20, p. 247
Inverting Comparator with Hysteresis • Add hysteresis (i.e., a change in Vref that depends on Vout by feeding back to the non-inverting terminal • When the input voltage rises to the threshold, the threshold drops to a lower value • When the input voltage drops to the threshold, the threshold is raised to a higher value • See equations and method in the Intro to Mechatronics text, pp. 247-248 http://www.ermicro.com/blog/wp-content/uploads/2010/03/comp_10.jpg
Window comparator • Two comparators with two Vrefs: VrefHigh and VrefLow • One non-inverting (IC1A) • One inverting (IC1B) http://www.sparkfun.com/datasheets/Widgets/Window%20Comparator-v15.pdf
The ATmega328 implements an analog comparator ATmega328 datasheet, p. 239
A comparator is at the heart of a successive approximation analog-to-digital converter From Necsulescu, D., (2002). Mechatronics, Prentice-Hall, New Jersey.