Why Interface Circuits?
Computers don't exist in a vacuum. They
have to interface with the world in many ways. You can sit at a keyboard and
type and you're using a computer interface. You click a mouse button and that's
another interface.
Measurement devices often need to
communicate with computers also.
A computer control system
needs temperature values in order to compute whether a valve should be
opened.
A computer control system
needs to be able to set a voltage in order to control the speed of a motor.
These kinds of needs - and many others - show why
interface circuits are necessary.
Goals
You'll need to use a comparator, sooner or
later. Here's what you'll need to learn about comparators.
What Is A Comparator?
A comparator is the simplest circuit that
moves signals between the analog and digital worlds. What does a comparator do?
Just to give you an idea of how a comparator
works, here is a simulation of using a comparator. Set the voltages on the
control panel to adjust the voltage inputs to the comparator.
What About Real Comparators?
Real comparators may work like the one in
the simulation, but there are sometimes other considerations. For example, a
common comparator is the LM339, which come on a chip with four comparators. The
four comparators are all open collector outputs. We need to discuss that.
In this situation, you don't need to know
a lot about transistors (although it's a good idea to learn that if you don't
know it!). What you need to know is that, in this situation, the transistor
acts like a switch. A transistor doesn't always act that way, but it does in
this situation.
When the output of the
comparator is a 1, current flows from the comparator through the base of the
transistor, out the emitter to ground, as shown.
When that current flows, the
transistor acts like a switch that permits current to flow from the collect
to the emitter to ground.
The way you connect the comparator is to
put your load between five volts and the collector connection on the chip - like
this.
Finally, if you want to use an LM339, you'll need
this pin-out.
|