As of May 31, 2023, we have updated our Code of Conduct.

# Questions tagged [comparator]

A comparator compares two voltages or currents and switches an output to indicate which is larger.

826 questions
Filter by
Sorted by
Tagged with
136 views

### How can I use a slide switch to reverse polarity of this comparator circuit?

This circuit is a simple photo-transistor switch with 2 independent threshold potentiometers. I've placed a switch to alter functionality of the comparator. Mode 1: Always ON. I simply connect the ...
• 1,705
90 views

### Problem replicating voltage regulator circuit in LTSpice

I'm new to voltage regulation circuits and have a circuit from https://www.ti.com/lit/an/snoaa20/snoaa20.pdf that I've used as inspiration: My circuit in LTSpice is below: The Zener diode is 7.5V. ...
• 105
99 views

### Help in understanding how this over-voltage regulator works

I found a circuit on the internet that's using a comparator to solve a similar problem to one I'm hoping to solve (voltage regulation). This is the circuit: (it's from https://www.ti.com/lit/an/...
• 105
103 views

### Comparator switching randomly

I cut a toroid in half, one half has unknown number of turns (50~80) which are fed to LM339 comparator which is pulled high by 500R to 3.3 V. simulate this circuit – Schematic created using ...
• 558
184 views

### LM393 window comparator not providing output when used with rail voltage

I have a pretty straightforward window comparator circuit using a 393 dual op amp. The below schematic simulates perfectly and goes HIGH to the 12V rail and LOW to the ground rail during sim. But the ...
1 vote
173 views

### Undervoltage Lockout TLV7031

I try to implement an undervoltage lockout trigger, when the supply voltage falls below a threshold voltage. The trigger itself should activate a gate driver, when there is enough voltage and below ...
1 vote
147 views

### Using two op-amps to measure the current in a predefined window

I've been trying to use an op-amp to measure the current and then use two op-amps as a comparator to detect the whether the measured current is within a window. The circuit defines the upper and lower ...
• 21
129 views

### Design safety relay with OpAmp

I intend to use a safety relay for my project, however I found industrial safety relay mostly work with 24 VCC and is very big, so I decided to make a safety relay based on my specifications. What I ...
• 195
101 views

### Zero Comparator with Hysteresis NOT working? [closed]

I tried to make a zero comparator with hysteresis but apparently it does not work. Any suggestions? My conditions of making the output to zero is the Hysteresis voltage level at 50mV to 2V. See the ...
• 21
67 views

I am wondering if the LM139AD comparator from TI can tolerate negative voltages at its inputs. I see that it can operate from a dual supply and that a supply rail can be negative? Is the same true for ...
103 views

### Using a 1-bit input to signal signed vs. unsigned comparison (in CircuitVerse)

Disclaimer, I'm a total electronics/circuit noob so sorry if this is really simple! But I've just built a 4-bit less-than comparator in CircuitVerse (outputs whether A < B), and I want to use a 1-...
122 views

### PWM output for DAC and using DAC as reference voltage

I would like to use a DAC as a programmable reference voltage for a window comparator. The input of the DAC would be the Arduino's PWM output. Can I connect the Arduino's PWM output directly to the ...
• 31
74 views

### ATmega analog comparator generates spurious interrupts

I'm experimenting with the comparator inside a ATmega328 to see if it can be used for zero detection of a DC 2.5V superimposed AC signal monitored on one of the ADC inputs. I use the code as shown ...
• 31
64 views

### More current in non-inverter comparator hysteresis using a photoresistor

I'm doing a small circuit where I need automatic LED's to turn ON in a low light environment. So I decided to use a photoresistor (more light less resistance) connected to a non-inverter hysteresis ...
• 23
112 views

### How to keep the reference voltage constant for comparator?

I want to build a circuit with a comparator, but the reference voltage is changing (CH3-purple) as seen in the oscilloscope image. I used the TL431 as in the image to keep the reference voltage ...
• 21
75 views

### Simple circuit that would close the circuit if it reached a higher voltage to a lower voltage, but not close the circuit from low voltage to high Volt

I'm currently trying to operate a supercapacitor that'd be charged up using footstep to energy system, then once the super caps are charged, it's energy is used somewhere to be stored via MPPT module. ...
98 views

### High-voltage chassis voltage detector using a comparator

I am planning on using a comparator together with a resistor divider network to detect when a chassis voltage is present. Please refer to the previous post here for more info if needed. So S1 is used ...
• 1,754
1 vote
137 views

### Comparator TLV3201 Output never goes high

I've put together the circuit from the TI document Comparator with Hysteresis Reference Design using the same reference voltage to the noninverting input (Vth 2.3V - 2.7V). The Inverting input is ...
• 145
228 views

### Why is the transistor in this dimming circuit getting very hot?

This is a fairly simple dimming circuit using a dual opamp (IC1) as a comparator to control the brightening and dimming of a light bulb. The switch (pin 2 IC1a) is a contact connection to ground. ...
• 181
96 views

### Can you use dynamic comparator in place of static comparator and vice versa?

According to the book, there are two types of comparators, static comparator and dynamic comparator. The dynamic comparator has clock. So can you use dynamic comparator in place of static comparator ...
• 414
153 views

### How does this circuit act as a half wave rectifier?

I'm having trouble to understand how this circuit operates exactly. The op amp is an LM339 from ST (datasheet link). The circuit in question is as follows: The op amp should be a comparator, but the ...
1 vote
154 views

### 333mV Current transducer - how to read it and protect the Atmega328p input

i have this CT current transducer: it outputs 333mV at 5A full scale. I'm planning to use it in my house/office in order to detect if a load is switched on or off, but i'm worried about how i can ...
• 549
147 views

### SCT-013-010 - Pulse on current threshold

I have an SCT-013-010 current sensor. It has a measuring range of 0-20 A and outputs 0-1 V. I need to create a circuit that uses this current sensor, and trimming a current threshold (using a trimmer) ...
• 549
126 views

### How do we justify small signal analysis of comparator while we know that the biasing condition for the input devices are different?

During the real operation of comparator, the input baseline is lower than the threshold voltage. How do we justify small signal analysis of comparator while we know that the biasing condition for the ...
93 views

### Photodiode pulse detect system

We have a laser signal detection system as shown in the figure below. In this system, we want to detect the incoming laser pulse. The MCU will detect the incoming pulse and perform its operations ...
• 13
89 views

### Fixed-direction voltage translators (level shifters) input voltages

I have a circuit that outputs a digital signal to an FPGA on an XEM6310 board. To digitize the signal, a comparator is used with a reference/threshold voltage of +12 V, with its positive rail tied to +...
100 views

### How to understand the next values of a comparator inverting with hysteresis (Schmitt Trigger)?

I have my test graded and I'm curious about a question, since I think it's badly graded and I may need to request a revision. I have been told there is a comparator inverter with hysteresis so \\$|V_{...
• 495
194 views

### Why does the comparator burn in this oscillator circuit?

I have the following circuit: Power filtering: The 330 μH chip inductor has about 10 Ω series resistance. I scoped the powerup to 5 V and the overshoot even with no load was minimal (maybe 300 mV). ...
• 17.7k
39 views

### Finding Diff Eqs for Variable Square Wave Oscillator of Theremin

For a project, I built a theremin using an LM311N as the basis for my fixed and variable oscillators. I wanted to find the period of the variable oscillator by finding the systems of diff eqs ...
356 views

### LM339 LED voltage indicator behaving opposite of expected

I have built the attached circuit and am pretty confident it is correct with no short circuits. When it's powered up with a 9V battery, all 4 LEDs light up with no input voltage. As the input voltage ...
420 views

### How can I choose the values of comparator resistors?

I have a circuit that I use as a thermostat: My comparator is an LM393. I calculated the reference voltage and the R3/R4 ratio using the hysteresis calculation tool on this site: calculator So I ...
104 views

### Are comparators essential in a negative feedback model, cybernetic system?

Since there are no cybernetics.stackexchange, I thought it would be meaningful to ask this to people who would possibly understand systems theory and cybernetics. Can there be a system, a negative ...
224 views

### Trying to implement a comparator with hysteresis

So here's the circuit: I need to design the comparator with hysteresis. So i saw this video: I was thinking of doing the same on my circuit. Vin will be connected to R1 and RNTC where it will form a ...
• 763
1 vote
109 views

### Measure dynamic comparator's offset voltage

I'm trying to characterize a comparator I built and I am wondering how I can plot offset voltage over time. I would like to eventually add a calibration block that will reduce the comparator offset ...
198 views

### I am planning to design comparator based on Opamp but I am not getting the exact pulse output in LTspice [closed]

I am trying to simulate this but I am not getting the exact "RECTANGULR" pulse output. Kindly help me to figure out where I am going wrong. I am going to use this circuit as pulse generator ...
166 views

### Zero-cross detector does not detect all the zeroes

I'm trying to do a zero-crossing detector but it is only able to mark half the number of zero passings. It seems to work fine with input voltages of 10-20V, but when using a +120VRMS it checks only on ...
• 520
1 vote
94 views

### Suggestions to clarify comparator circuit

I'm confused with the next issue from school that I can't figure out and wasn't able to solve (this is homework already graded, but the teacher refused to explain me). I was asked to design and ...
• 495
158 views

### Sequential LED turn signal

I am trying to build a 4 LED sequential turn signal using the ne555 timer module and some comparators. I am having trouble with my next steps when trying to figure out what is wrong with my design. ...
• 31
107 views

### Why does my output get supercompensated?

I have almost finished a project that was supposed to output a square wave signal with a certain frequency but when I tried to make a small change to the circuit something weird happened to my output. ...
64 views

### Analog to 3 bit digital converter noise immunity problem

This task, which at first glance seemed simple enough, caused my left eyelid to twitch nervously. And despite the habit of sorting out my simple things on my own, here I have to turn to the community. ...
• 291
55 views

### Improve conceptual intervalometer for rotating potted plants

I'm trying to avoid having my plants tilting or otherwise looking bad after only getting sunlight from one direction. To solve it, I want to make the pots rotate. I'm trying to design a cheap, stand ...
1 vote
1k views

### High voltage adjustable constant current source controlled by MCU

Background: I need a microcontroller adjustable high voltage (300V) constant current. Source: High voltage boost converter. Load: Gas discharge lamp (20mA max). Can only be switch from high side. ...
• 427
76 views

### LM339 window not switching

I made a pair of window comparators with a quad LM339, and LEDs on the outputs. The LEDs flickered near the switchover points. So I made a test setup on a plugboard. The LEDs didn't flicker (typical!),...
100 views

### PIR sensor amplifier with minimum component count

I'm new to opamps and I could use some help amplifying a PIR sensor and output to a microcontroller. Minimum component count without compromising performance (highly integrated solutions). Here is a ...
• 427
1k views

### Does it matter how big the pull up resistor is for a comparator?

Does it matter how big the pull up resistor is for a comparator? The datasheet of the LM339 mentions 5K1 for 5 V. The datasheet of the LM393 mentions 3K3 for 5 V. For a 12 V bi polar connected ...
• 307
231 views

### Lm393 output oscillation

So I have designed this circuit to operate a relay in an off grid circuit. When the solar panel charges the battery over 12.9 V the relay is supposed to kick in. But from 12.8 V to 13 V the relay ...
175 views

### Review my water sensor

Please review my water sensor circuit, let me know any problems, suggestions. I am not sure if it will work. Ref: https://www.homemade-circuits.com/anti-corrosion-probes-for-water-level/
• 23
1 vote
186 views

### ACS712 over current switch

The circuit is from here. The output logic is LOW at over current. Is it correct? If U2B pin 5 is set to 2V, U2B pin 6 is 2.5V (zero current), OUT is low. Higher current –> Lower U2B pin 6 ...
• 23
209 views

### Switching on and off at different voltage while maintaining states

I am designing my own circuit to switch on / off a 9V motor via solar panel. I am connecting 2 sets of 3.7V 18650 batteries in series, that means the circuit runs on 7.4V. I am also using a generic ...
• 123