Latch Comparator - 0.264V above 1.65V or below 1.65V

mriksman

Joined Aug 31, 2010
109
I want to use a current sensor IC (like the AC712), but a Chinese one CC6903-10A because it works with 3.3V. There is a circuit in the ACS712 datasheet (page 12) which also appears in the CC6903 datasheet (page 5, middle/bottom right) that is meant to latch when a high current occurs.

Now, Vout equation is Vcc/2+0.132*I.
So 0A is 1.65V, -10A is 0.33V and +10A is 2.97V.

I'd like to trip/latch when the current is -2A or +2A. I mean, I assume that's how it will look when monitoring an AC load right?
Once tripped, it should latch until power is removed from Vdd.

My LTSpice does not seem to indicate this is what would happen...? It seems to reset itself?

Anyone able to help me with a simple latch?
1.65V is good.

mriksman

Joined Aug 31, 2010
109
Bonus points - any circuit ideas so that when the circuit above has tripped, either Vpulse is stopped, or power is cut to the AC load (a dimmable LED or incandescent globe)

eetech00

Joined Jun 8, 2013
3,232
I want to use a current sensor IC (like the AC712), but a Chinese one CC6903-10A because it works with 3.3V. There is a circuit in the ACS712 datasheet (page 12) which also appears in the CC6903 datasheet (page 5, middle/bottom right) that is meant to latch when a high current occurs.

Now, Vout equation is Vcc/2+0.132*I.
So 0A is 1.65V, -10A is 0.33V and +10A is 2.97V.

I'd like to trip/latch when the current is -2A or +2A. I mean, I assume that's how it will look when monitoring an AC load right?
Once tripped, it should latch until power is removed from Vdd.

My LTSpice does not seem to indicate this is what would happen...? It seems to reset itself?
View attachment 259562

Anyone able to help me with a simple latch?
1.65V is good.
It's been a while since I built mine, but if I remember correctly, the sensor output will always be a DC voltage that reflects the sensor sensitivity when detecting AC or DC current. I'm not sure whether the DC output value is reflects AC peak or AC RMS current (I think its peak).

Post your LTspice .asc file and model file(s) if any.

crutschow

Joined Mar 14, 2008
30,116
I'd like to trip/latch when the current is -2A or +2A
If it's an AC current you can trip at only one of those.
Is that acceptable?

If you want the comparator to latch, turn the diode around.

LowQCab

Joined Nov 6, 2012
2,171
There are cheap Chips specifically designed to act as an "Electronic-Circuit-Breaker".
.
.
.

Attachments

• 289.7 KB Views: 4

mriksman

Joined Aug 31, 2010
109

@eetech00 The sensor output is linear between 0.33V and 2.97V, which indicates a current of between -10A and 10A. 1.65V=0A. But forget about it being a current sensor, just treat this exercise like I have an analog voltage signal. 1.65V is 'normal. Anything above 1.914V is bad. Anything below 1.386V is bad.

@LowQCab I looked around for an IC that had the FAULT latch built in. But I couldn't find any that met my requirements.
* Must be cheap (like the Chinese one I found; \$0.90).
* Must be isolated. I have multiple back-to-back MOSFETs, so they need to be isolated from the uC signals.
So the only way forward I have found so far is implementing my own FAULT latch.
Plus, it'd be a great thing to learn I think; using comparators/op-amps.

@crutschow Always glad to see your name pop up! A veteran among these forums.
I tried flipping the diode - it made things worse.

What is interesting is, it 'works' as long as the Vout(sensor voltage) never gets below the Vf of the diode ~0.7V.

0.7V corresponds to a Vout of ~ -7.2A. But that seems like a poor design; it trips at 2A, and then when the AC waveform spins around, it resets at -7.2A. Now, granted this FAULT should have killed the power and thus it should never reach -7.2A, but, I still feel like this is poor design. Surely there are better ways to latch.

Also; I guess tripping on just the positive 2A is OK? Or I could implement a Window Comparator. My issues are still;
* How do I latch
* The best way to kill the back-to-back MOSFETs driving the Load; kill the drive gate signal? Or cut the AC to the Load completely with another MOSFET (although, I don't have much PCB space for another MOSFET).

Alec_t

Joined Sep 17, 2013
12,897

Q1 pulls the comparator input lower than a diode would. Q2 shorts the opto-LED.
Comparator choice is not critical (LT1711 was selected randomly, for its low supply voltage spec).

Edit:
Actually, if you did choose the LT1711 (or similar) the circuit would be simpler, because it has an internal latch which could be used, as below.

Edit 2:
This would also allow Q2 to be replaced by a PNP transistor in series with the opto-LED to shut off the LED current. The PNP base would be driven, via R4, by the inverting output of the LT1711.

Attachments

• 2.1 KB Views: 1
Last edited:

mriksman

Joined Aug 31, 2010
109
@Alec_t Awesome - you're the second name I was waiting for haha.

Your schematic works. However, why the LT1711? I tried the LT1017 and LM393 with no luck. I am particularly interested in getting the LM393 to work because it is cheap/'basic component' on the Chinese PCB site that does SMD placement.

I am also wondering if it possible to do a 'Window Comparator'? I have read that, although rare, a failure can occur in one polarity. So overcurrent could occur to the negative side.
I have spent a few hours playing around, and I am worried about the initial power up. The current sensor Vout will probably start at 0V and quickly go to 1.65V (no current, I=0A). But in that brief moment it is below the low trip point, it could cause the FAULT latch to trigger...

How could you do a Window Comparator, but delay the latch circuit for a few micro or milli seconds to allow Vout to stabilise first?

Attachments

• 28.1 KB Views: 2

Alec_t

Joined Sep 17, 2013
12,897
However, why the LT1711?
Did you see my two edits in post #7?
How could you do a Window Comparator, but delay the latch circuit for a few micro or milli seconds to allow Vout to stabilise first?
I'd try your window comparator as is, but with an RC delay to the Vdd pin.
Edit: scrap that suggestion.

Last edited:

mriksman

Joined Aug 31, 2010
109
Did you see my two edits in post #7?
I did thanks, yes - but my query still stands. I tried a LM393 and LT1017 and neither of them worked. The PCB site doesn't have an LT1711 available in their available parts list, so I am trying to use one of their available components; particularly the LM393 if feasible. But I'd like to validate it on LTSpice first.

crutschow

Joined Mar 14, 2008
30,116
Post you .asc file.

sghioto

Joined Dec 31, 2017
3,315
I'd like to trip/latch when the current is -2A or +2A. I mean, I assume that's how it will look when monitoring an AC load right?
The 1.65vdc level will not change using AC current you need a peak detector to extract any voltage difference.
The output from the sensor will look like this.

Last edited:

mriksman

Joined Aug 31, 2010
109
This is with the LT1017.
If you have the massive 'ZZZ' library there is the LM393 in there as well. It too, doesn't work.

Edit: Sorry - R4 needs to be 100k. It REALLY doesn't work with 10k. Have updated ASC file.

This is with LT1017

This is with LM393

And working correctly with LT1711

Attachments

• 2.1 KB Views: 1
Last edited:

mriksman

Joined Aug 31, 2010
109
Also - with 'startup' on, it doesn't work.

Is 'startup' flag more realistic?

sghioto

Joined Dec 31, 2017
3,315

Alec_t

Joined Sep 17, 2013
12,897
Did you read my post #12?
Yes, but don't see how that affects the comparator circuit, which trips on the waveform +ve peak (not average).

mriksman

Joined Aug 31, 2010
109
mriksman
Did you read my post #12?
Yes. But I don't think I understand.
This is what Vout from the current sensor will look like right?

I am feeding that into the non-inverting input of the comparator. As soon as the comparator sees 1.65+2*0.132=1.914 (which is derived from the voltage divider), the output of the comparator should latch. Which is what alec_t and crutshow are helping me with.

sghioto

Joined Dec 31, 2017
3,315
This is what Vout from the current sensor will look like right?
Yes but the DC portion does not change when measuring AC current meaning the comparator will not activate.

mriksman

Joined Aug 31, 2010
109
Yes but the DC portion does not change when measuring AC current meaning the comparator will not activate.
I’ll be honest. I have no idea what you’re talking about.
I am pretty sure that the Vout on that CC6903 current sensor will be a sine wave, centred around 1.65V.
And if that goes too high, I want to trigger/latch.

sghioto

Joined Dec 31, 2017
3,315
And if that goes too high, I want to trigger/latch.
I apologize, I missed the part about the latch.