|
Description of the Discrete LM393-Like Comparator
This circuit is a fully discrete differential comparator, closely mimicking the internal topology of the LM393 (open-collector, dual NPN differential comparator). The design reproduces the essential analog building blocks found in the IC:
• Differential input pair
• Current mirror active loads
• Level shifting diodes
• A multi-stage gain / limiting transistor chain
• Open-collector output
• Output pull-up LED network
Below is a functional breakdown.
⸻
1. Differential Input Stage (Left Side)
→ Purpose: sense the difference between the two input voltages.
You have two NPN transistors forming the differential pair.
Their emitters are tied together and biased via a transistor below, acting as a current source tail transistor.
• Each base is fed by a 10 kΩ input resistor from the signal source.
• The pair compares the voltage at the blue input node vs. the other input node.
• Input protection diodes are present, just like in the LM393 input stage.
This block provides the initial voltage-to-current conversion with high differential gain.
⸻
2. Active Load / Current Mirror (Above the Input Pair)
The collectors of the two differential transistors feed into an NPN current mirror:
• Two mirrored NPN transistors above form the active load
• This converts differential current into single-ended output
• Provides large gain just like inside the LM393
This is a textbook LM393 internal block.
⸻
3. Level-Shifting and Intermediate Gain Stage
After the current mirror, the signal passes through diodes and another NPN pair, giving:
• Level shifting
• Additional gain
• Protection from saturated nodes
This is almost identical to the LM393’s internal multi-stage amplifier chain.
The diodes between stages prevent deep saturation and improve switching speed.
⸻
4. Output Transistor and Pull-Down Stage (Open Collector)
On the right side, you can see:
• The final NPN transistor with its collector brought out to the output node
• A 22 kΩ resistor setting the bias of the intermediate stage
• Multiple diodes forming clamp networks similar to the LM393 output stage
This is the open collector transistor, which only pulls output LOW.
It cannot drive HIGH by itself (just like the LM393).
Instead, an external 1 kΩ resistor to +12 V pulls the LED up.
⸻
5. Output LED and Pull-Up (Right Side)
You included:
• A 1 kΩ pull-up resistor
• A visible output LED (green trace highlighted)
When the comparator output transistor turns ON → the LED turns off (node pulled to ground).
When the comparator output transistor turns OFF → the LED turns on (node pulled high).
This exactly matches LM393 behavior.
⸻
6. Power Rails and Reference Grounding
• The top rail is +12 V
• The bottom rail is ground
• The tail current source uses a resistor and transistor to regulate the differential pair current, mimicking the internal bias network of the LM393.
⸻
Overall Behavior
This discrete comparator will:
• Compare two input voltages
• Provide a fast digital-like output
• Pull LOW strongly (open collector)
• Require an external pull-up for HIGH level
• Drive an LED or logic load easily
• Exhibit LM393-like switching thresholds and behavior
Because it is built from discrete BJTs, it will:
• Be slower than an IC version
• Have more input offset
• Be more temperature-dependent
• But electrically behave the same way
✅ Why it is a negative comparator
Look at the final output transistor on the right:
• It is an NPN transistor
• Its collector is the output node
• Its emitter is tied to ground
This means the output stage can only do one thing:
Pull the output DOWN (LOW)
when the transistor turns ON.
When it is OFF, the output rises HIGH only because of the external pull-up resistor (your 1 kΩ + LED chain).
This output style is called:
Open-collector, negative-logic output
⸻
✅ What the logic means
• If the non-inverting input > inverting input
→ differential pair steers current → output transistor TURNS ON
→ OUTPUT = LOW
• If the non-inverting input < inverting input
→ differential pair steers current away from output stage
→ output transistor TURNS OFF
→ OUTPUT = HIGH (via the pull-up)
This is exactly the same logic as the LM393.
|