Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Comparator circuit quirk

Status
Not open for further replies.

ACharnley

Member
Hi all,

I've a zero-cross detect circuit of sorts, which detects at around the 300mV point. It was simulated in LTSpice. Once built it works 50% of the time on start-up and the other 50% of the time the output remains in a high state and sometimes 'self-corrects' after a minute. Here's the circuit (please note there is a 14k 3V pull up not shown on the output).

The comparator is diven by a 5V supply. AC is 1-200Hz of varying voltage. The first diode protects against any reverse flow as the bridge the ground flows through is not rated to the potential voltage of ac2. I chose a silicon instead of a zener mostly to get the crossover point <1v.


Screenshot_2020-09-23_19-17-51.png


And the simulation across a increasing voltage/frequency spectrum.

Screenshot_2020-09-23_19-15-19.png


When it works the scope shows:

Non inverted -

pic_39_4.png


Inverted -

pic_39_2.png


Output

pic_39_3.png



When it's not working the inputs are the same but it's latched high.

Any suggestions are most welcome!
 
There is nothing to pull pin 5 to ground when the input is negative; the positive feedback from the output can hold it at 0.6V

Add a resistor from pin 5 to 0V, that should make is stable.
 
Agreed. A 10k resistor does the trick.
 
It was the first thing I tried yesterday but it didn't work, yet I've just redone it and it's working great. Thanks!
 
Having a bit of an issue, I've blown two LM339's, in each case the comparator from the above circuit out of the four in the I.C. Anything spring to mind?
 
The AC input voltage of 110V peak is enough to zap any IC. Rectify and reduce the AC input voltage.
The datasheet of the LM339 says the absolute maximum negative input voltage is only -0.3V.
 
Try removing the rectifier and use two 1N4148 parallel diodes forward/reverse to limit the input voltage.

Add a resistor from there to the comparator input and another from input to +3.3V.
Make both of those and both the reference divider resistors the same value, eg. all 10K.

It should switch at around 0V on the diodes, but with the IC inputs always safely within the common mode range.
 
D13 is rated higher than the AC and prevents backflow?
The capacitance of the diode when reverse biased may allow enough current to flow briefly to cause damage. Just a guess.
 
I was wondering if it could be that, it's relatively slow although I'm only dealing with < 100Hz AC.

I replaced the lower with a 2.7v zener and modified the reference to suit, so far the 3rd chip hasn't blown.
 
If the circuit was built on solderless breadboard then the high amount of stray capacitance will couple the high voltage past the diodes and all over the place.
 
No it's all smd work, tight prototype. It's working so far with the zener so it looks like it's a reverse spike. The question now is what else is quicker for protecting up to 80v because the other side of the bridge it goes through is rated to 30v and could be damaged by the reverse pull. I wasn't expecting an issue given the AC is so low Hz.

iirc it's a 1N4148 (the one rated to 80v) not a 1N4001.
 
I don't follow what you mean by "reverse pull" ??

The output voltage of a bridge can be increased by an additional forward source applied to the output, but the diodes conduct and limit the voltage if the output is reverse biassed.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top