A hands-on lab guide for building and testing an LM311 voltage comparator and a positive peak-detector circuit.
This laboratory guide from the University of Illinois teaches how to build a voltage comparator with the LM311 IC, using a potentiometer-based voltage divider on the inverting input and a function generator and oscilloscope to observe the output. It also asks you to build a positive peak-detector circuit with less guidance, using an LM358 op amp as a voltage follower and an nMOS transistor to reset the capacitor.
The guide covers breadboarding, oscilloscope operation, and circuit construction, and includes parts lists, test procedures, and design questions for the peak detector.
| Comparator IC | LM311 |
|---|---|
| Op amp | LM358 |
| Function generator setting | 2 V peak-to-peak sinusoid at 1 kHz with 1 V offset |
The output jumps up to the battery supply voltage value. When IN+ falls below IN-, the output voltage drops quickly to the ground voltage.
An nMOS transistor is placed across the capacitor; applying a voltage greater than its threshold voltage between gate and source causes a rapid discharge of the capacitor and resets it.