ECE Undergraduate Laboratory
ECE 371 - Electronic Circuits Design

ECE 371 - Electronic Circuits Design

Lab 2: Comparators
Nonlinear Applications

Part I: Basic Applications


OBJECTIVES

Introduction to comparators-based nonlinear circuits under open loop and positive feedback configurations.


INTRODUCTION

Comparators and operational amplifiers are very similar in design. However, operational amplifiers are usually operated under negative feedback configuration, whereas comparators are operated under positive feedback or no feedback (open loop). This is the reason that operational amplifiers are equipped with a compensating capacitor that prevents them from oscillating. This compensating capacitor also makes the operational amplifiers slower than comparators. Hence, even though one can use an operational amplifier as a comparator, the operational amplifier will react slower than a comparator.

Many comparators have been designed with an open collector output stage to allow the coupling of multiple outputs yielding a logical operation. In most operations, one needs to add a pullup resistor to generate the required outputs. The outputs of comparators are usually high or low (one can see it as a binary digital signal, with some OpAmps even offering TTL outputs). Just like in the case of operational amplifiers, the output may be 1 to 2 volts off the rails.

The LM series is associated with integrated circuits made by National Semiconductor. LM stands for linear monolithic, describing how the analog components were fabricated onto a single piece of silicon.

Differential comparators

Part number Predecessor Obsolete? Description
LM306     High speed differential comparator with strobes
LM111
LM211
LM311
LM106
LM710
  High speed differential comparator with strobes
LM119
LM219
LM319
    High speed dual comparators
LM139
LM239
LM339
LM2901
    Quadruple wide supply range comparators
LM160
LM360
μA760   High speed comparator with complementary TTL outputs
LM161
LM361
  only LM161 High speed comparator with strobed complementary TTL outputs
LM193
LM293
LM393
LM2903
    Dual wide supply range comparators
LM397     General purpose comparator with an input common mode that includes ground
LM613     Dual op-amps, dual comparators, and adjustable reference
Table 2.1 List of some of the comparators fabricated by National Semiconductor

PRELAB

Design by simulating and building a level detector, a window detector and a power supply monitor using the components shown in the figures below as inspiration for other values that you decide and confirm through calculations, simulation, and realization.

References:

S. Franco "Design with Operational Amplifiers and Analog Integrated Circuits", McGraw-Hill 1988. Chapter 8.

LABORATORY


  1. Level Detector


    Figure 2.1.1.  Level detector
    Figure 2.1.1: Level detector

    This is a sample of how one can build a level detector. It is up to the user to figure out how this circuit can be adapted to a concrete application, like a charging level, the flood level of a river, the maximum temperature that a system can handle, etc.

    Build this circuit with your own choice of Zener diodes replacing D1 and V2 with appropriate Zener diodes and figure out what temperature will be exceeded based on a given choice of the setting of the potentiometer and based on the temperature-controlled Zener diode of your choice (replacing V2). Refer to the lecture notes for the evaluation of the appropriate components’ values.

    Another application could be realized by replacing V2 with a water level detector, and based on the setting of the potentiometer, one can show that the LED will switch when the flood level is exceeded, or when the drought level is reached.


  2. Window Detector


    Figure 2.1.2  Window detector
    Figure 2.1.2: Window detector

    Build this window detector by replacing V2 and V3 with appropriate Zener diodes and confirm the thresholds of the window detector based on the choice of the diodes. Do not forget to protect those diodes with resistors that would limit the current in the diodes.


  3. Power Supply Monitor


    Figure 2.1.3  Power supply monitor
    Figure 2.1.3: Power supply monitor

    Design this supply monitor to make the LED turn ON if the voltage is either as close as possible inside the range 10V to 15V, or outside this range. Your choice.


REPORT

Besides the usual circuit information, schematics, and other relevant information, discuss the reason for your choices, and how your choices were achieved in terms of calculations related to the components’ values, observation, comments, and which components are most important in the way they affect the specifications.


Part II: Schmitt Triggers


OBJECTIVES


Introduction to Schmitt triggers with dual and single power supplies.


INTRODUCTION



Figure 2.2.1  Different hystereses in Schmitt trigger
Figure 2.2.1: Different hystereses in Schmitt triggers

PRELAB

Design by simulating the two circuits presented in the lab section of this part of lab 2 using the components of your choice and confirm through calculations and simulation that your implementation will be viable.


References:

S. Franco "Design with Operational Amplifiers and Analog Integrated Circuits", McGraw-Hill 1988. Chapter 8.

Equipment needed from the stockroom: scope probe, leads.

LABORATORY


  1. Simple Inverting Schmitt Trigger



    Figure 2.2.2  Simple Inverting Schmitt trigger
    Figure 2.2.2: Simple Inverting Schmitt trigger

    Based on the values of the resistors R1 and R2, the thresholds are

    $$ V_T = ± {R_1 \over{R_1 + R_2}} V_{CC} $$

    Hence VT = ±4V

    R3 is just a pullup resistor.

    Build this circuit with your own choice of thresholds. Calculate, simulate, and measure the relevant parameters. Discuss any discrepancies that may result from the implementation.


  2. Single Power Supply Noninverting Schmitt Trigger



    Figure 2.2.3  Single Power Supply Noninverting Schmitt trigger
    Figure 2.2.3: Single Power Supply Noninverting Schmitt trigger

    Do not use the values of the resistors presented in Figure 2.2.3 Choose your own values, and confirm through calculations, simulation, and implementation that the circuit performs as required. If there are any discrepancies, discuss the reasons. Suggest one application for this circuit. In the design process, you are given the thresholds, and you would have had to choose the resistors that will satisfy the requirements.


REPORT


In your reports, present an introduction to each circuit, the circuit, the steps involved in the choices you made, the simulation results, and the implementation. Discuss any difficulty you may have encountered, any steps in resolving problems, discussion of the results, and finally, a summary for part 2.


Part III: Lab 2 Project


Design, simulate and implement a 4-level bargraph display driver similar to the LM3914, using 4 comparators, 4 sets of LEDs and current-limiting resistors, and hopefully a Zener diode and a protecting resistor to generator a level that is adequate representative of some application. Test your circuit, and show what levels are involved in the turning levels for each LED. You can test your circuit with a DC voltage source, but for extra credit you can show your design by including a voice signal through a microphone and appropriate interface, the signal generated by a source like a smart phone, or a voltage signal generated by a sensor.


REPORT

In your reports, present an introduction to each circuit, the circuit, the steps involved in the choices you made, the simulation results, and the implementation. Discuss any difficulty you may have encountered, any steps in resolving problems, discussion of the results, and finally, a summary for part 3, and finally a conclusion for the three parts.