Comparator Circuit Design

Below is a list of components and a proposed schematic strategy for your circuit. In this design a dual comparator is used (the LM393 contains two comparators) so that one comparator can signal when the input voltage is above 3 V (lighting the green LED) and the other – by swapping its inputs – can signal when the input voltage is below 3 V (lighting the red LED). A resistor divider is used to generate a 3 V reference from your 5 V supply. Each comparator output is pulled up with a resistor (required for the LM393’s open‐collector outputs) and then drives an LED branch that includes an LED and a current–limiting resistor. A ground component is added to all parts that require a common reference.
The proposed design includes the following components:

Table


ComponentDesignatorValue/NotesLink
Dual ComparatorU1LM393 ComparatorLM393 Comparator
Voltage Divider ResistorR12 kΩ (for 3 V divider; connected from 5 V to node)2k Resistor
Voltage Divider ResistorR23 kΩ (for 3 V divider; connected from node to ground)3k Resistor
Pull-Up Resistor (Comparator U1A)R_PU_G10 kΩ (pull–up for green LED branch)10k Resistor
Pull-Up Resistor (Comparator U1B)R_PU_R10 kΩ (pull–up for red LED branch)10k Resistor
Green LED BranchLED_G branchGreen LED with series 330 Ω resistorGreen LED and 330Ω Resistor
Red LED BranchLED_R branchRed LED with series 330 Ω resistorRed LED and 330Ω Resistor
Reference GroundGNDGround (added for all required connections)GND
Schematic Strategy:
  • Voltage Divider for 3 V Reference:
    Connect R1 (2 kΩ) from the 5 V supply to a node and R2 (3 kΩ) from that node to ground. That node will provide approximately 3 V.
  • Comparator A (U1A):
    • Connect its non–inverting input to the input voltage under test (Vin).
    • Connect its inverting input to the 3 V reference node from the divider.
    • Attach a pull–up resistor (R_PU_G, 10 kΩ) from U1A’s output to 5 V.
    • Route U1A’s output to the green LED branch so that when Vin exceeds 3 V the output goes high (via the pull–up) and the green LED (with its series 330 Ω resistor) turns on.
  • Comparator B (U1B):
    • Swap the inputs for complementary behavior: connect its non–inverting input to the 3 V reference and its inverting input to Vin.
    • Attach a pull–up resistor (R_PU_R, 10 kΩ) from U1B’s output to 5 V.
    • Route U1B’s output to the red LED branch so that when Vin is below 3 V U1B’s output goes high and the red LED (with its series 330 Ω resistor) turns on.
  • Common Ground:
    Connect all ground pins (from the comparator, divider, and LED branches) to the GND component.
This approach uses both comparators within the LM393 to provide complementary outputs, directly lighting the appropriate LED based on whether the input is above or below 3 V.
If you wish to proceed with adding these components and making the net connections in your schematic, the next step would be to add these parts to your project.
Component Selection
Comparator Selection
LED Selection
Resistor Sizing

To get started, talk to Flux or create a New Document.

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    No assets added.

    Supreme Apricot T-800

    Supreme Apricot T-800 thumbnail
    Welcome to your new project. Imagine what you can build here.

    Properties

    Properties describe core aspects of the project.

    Pricing & Availability

    Distributor

    Qty 1

    Controls