Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 12

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

Mechatronics Concept Map


Power
Source

User
Interface

ME 106
ME 120

Controller
ME 106

(Hardware & Software)

Power
Interface
INTEGRATION

ME 106
ME 154
ME 157
ME 195

Signal
Conditioning

ME 106
ME 190
ME 187

ME 106
ME 120

Actuator
Sensor
System to
Control ME 110

ME 182
ME 136 ME 189
ME 154 ME 195
ME 157

ME 120
ME 297A

BJ Furman 22JAN11

The Comparator
A specially designed op-amp,
optimized to switch Vout fast

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

Typical op-amp output stage


and some comparators
(Push-Pull (Totem Pole))

Open collector output stage (typical


of most comparators, such as LM339)

Intro to Mechatronic Design, Fig. 11.18, p. 245

Intro to Mechatronic Design, Fig. 11.17, p. 245

http://www.ermicro.com/blog/?p=1578

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

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

Non-inverting comparator with hysteresis

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.

You might also like