1

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 current limits using two potentiometers.

Will this schematic work? Is there any IC that is used for such purpose?

schematic of the proposed window comparator circuit

Mehrdad
  • 21
  • 1
  • 1- what load, where is the load, what "voltage"? 2-What are the limits of current sensed, bidirectional? 3-You should also simulate it, as first try. – Antonio51 Mar 05 '22 at 08:11
  • @Antonio51 there is a relay to handle the load, voltage would be 12v and current limited between 5 and 30 mA – Mehrdad Mar 05 '22 at 11:04
  • 2
    Do you understand that when the relay opens, the current will fall to zero, which will cause the relay to stay open? – WhatRoughBeast Mar 05 '22 at 15:59
  • @WhatRoughBeast so you mean I should add a resistor ? – Mehrdad Mar 06 '22 at 01:48
  • No, it means that your basic approach is not going to work. At best, you can use a single comparator to detect high current levels, then trigger a flip-flop to open the relay and keep it open until you reset it. Responding to a low current by reducing the current to zero is simply not a useful approach. It's sort of like the saying, "The floggings will continue until morale improves. You can use your setup to drive an indicator lamp or LED, but not to interrupt the current which you are measuring. – WhatRoughBeast Mar 11 '22 at 16:10

2 Answers2

0

Your circuit "should" theoretical work ...
But some "choice" of components must be made !

Here is a DC Dynamics analysis for one current (20 mA) chosen.

enter image description here

And here a DC Analysis for current = 0 -> 50 mA, showing the behavior of the two comparators with references choosen.

enter image description here

The last part is up to you ...
You should need some "memory" ...

Antonio51
  • 11,004
  • 1
  • 7
  • 20
  • tnx @Antonio51, are all X1-X3 same as LM358? Does Vx1 & Vx2 come from pot or voltage divider?what do you mean some "memory"? also a person comment that "using transistors to control the coils of the "safety" relay is wrong as it can't predict the failure mode of the transistors. Both can fail short-circuit leaving relays permanently energised. also have Q2 and Q8 arranged as a very poor AND gate. At best, with a single NPN transistor that will work as a voltage follower .also once relay energised R30,R41 should provide enough base current to keep relay on via Q2 base-emitter – Mehrdad Mar 06 '22 at 01:56
  • X1-X3 all LM358. Vx1, Vx2 can come from pots. "memory" because of one comment to control coil. Control (manually ?) first coil at the beginning "ON" probably some time to allow current ... then reset if "current" not in the window. So driving relay must be "well thought". – Antonio51 Mar 06 '22 at 10:18
0

Since the currents involved are tiny, there's no need for a relay.

You can use a mosfet as a switching element, and its RDS(ON) resistance as a current sense resistor. It will be accurate to a couple % across a reasonable temperature range as long as you trim R1/R2.

The mosfet's body diode will function as an anti-kickback diode if the load is inductive (again: you didn't specify what your load is!).

The circuit as shown, with the suggested op-amps, will work up to about 30V supply voltage, although R4 can be increased for higher supply voltages to avoid excessive power dissipation on it.

  • For a positive-referenced load (i.e. connected to VCC), you'd use an N-mosfet and comparators/op-amps with common mode voltage that includes ground. E.g. LM2903B or LM393B comparators, or the LM358B or LM2904B op-amps.

  • For a negative-referenced load, the circuit looks identical, just reverse the supply voltage, reverse all diodes, and replace the N-mosfet with a P-mosfet, and use comparators/op-amps with common mode voltage that includes V+, e.g. TL071 op-amp for 30V operation, or LMC6772 comparator for operation up to 15V.

The diode D1 is a voltage reference. A TL431 set for 2.5V output could be used instead, of course after appropriately changing R3 and R4.

The diodes D2, D3 are only needed when using op-amps. When using the comparators (as you should be!), they are not necessary and should be bypassed.

In the circuit below, C3||R7 has a time constant of the order of 1ms, and that's the "override time" for start-up transient. After about 1ms, the load current must be between the limits set by R1 and R2, otherwise the load will be disconnected.

With the mosfet shown, the transresistance of the current sensor is 2Ohm, i.e. a 10mA current is equivalent to a 20mV threshold voltage. The R1 and R2 should be trimmed in-circuit, using a load resistor that produces the desired current in the mosfet, and shorting R6 to turn the mosfet on for the duration of trimming.

R1 sets the minimum current, R2 sets the maximum current. With components as shown, the current adjustment range is 0-50mA approximately.

The circuit will typically detect an out-of range current within microseconds. If a slower reaction is desired, add a capacitor from the left side of R5 to ground. The capacitor value would be set to the desired time constant of the low-pass filter thus created.

R8 provides a bias path for the comparators when the load is disconnected and mosfet is open.

schematic

simulate this circuit – Schematic created using CircuitLab

  • tnx @kuba-hasnt-forgotten-monica , actually Intend to design safety emergency button or sensor reading to activate the safety relay for higher load , so I must be sure input data correct and then drive two parallel safety relay such as following thread https://electronics.stackexchange.com/questions/244088/self-checking-circuit/244111#244111 https://electronics.stackexchange.com/questions/285812/how-do-these-safety-relays-work – Mehrdad Mar 06 '22 at 02:04
  • Not much changes in that case. M1 is then outside of this circuit and drives a relay, and in its place you put a 0.2Ohm sense resistor. – Kuba hasn't forgotten Monica Mar 06 '22 at 08:10