I am running a simulation with multisim, the comparator(comp) is connected as the schematic with one Interactive DC voltage source to each input.
The DAC or set voltage is at 0,1V(at the inverting input), 0,1V translates to ~166mA.
Then I increase the voltage at the non-inverting input, representing the current sense voltage.
When the sense voltage is at 0,1V the comp output is low as I'd like it to be, when the sense voltage goes over 0,1V the comp output switches to high to pull a rail down to 0V.
Then I decrease the sense voltage to 0V, but the hysteresis causes the comp output to be maintained high until the DAC voltage is increased.
Which in my application is a really bad effect, I have read for hours about hysteresis but I find it very hard to get a grip of. The hysteresis in my circuit is not something that I theoretically deduced and then implemented but rather just tested to get it right, so I do understand that this reaction is expected but I can't figure out how to make a circuit to do what I want.
The sense circuit can sense down to 1mA(although at that level there are some major error margins to take into account, 1mA might be with a 50%+ error) but at 10mA the voltage would be about 4mV. I see now that the way of detecting those levels will not be possible with my current circuit, no?
Do somebody have any idea where I might begin to produce a circuit capable of this application?
- - - Updated - - -
The thing is also that(as I was informed about) that I need to watch out for oscillations at the output, oscillations would cause a lab power supply output to oscillate to. I have seen circuits that do very much what I'd like mine to do but they use a op-amp with a capacitor from the output to a input, but that current sense voltage is centered around 2,5V and I don't think that a circuit like that could achieve the small current accuracy that I'd like mine to have(but what do I know).
If its possible with the means at my disposal I'd Seattle for the capability to detect and limit a minimum current of 10mA, that's 4mV.
I'm really lost here.
- - - Updated - - -
The voltage is produced by a LT6105 and buffered with a precision, auto-zeroing, zero drift op-amp.
The limit function is as follows:
A adjustable voltage regulator is adjusted through a resistor voltage divider, a resistor from the output to the feedback pin and a resistor from the feedback to ground. To the feedback pin junction there is another resistor connected to a voltage output DAC that produces between 0 and 4,5V, at 0V the regulator output is at max and at 4,5V the regulator output is at 0V or 32mV.
From the comp output there goes a 1N4148 diode to a resistor that connect to the feedback pin junction, so as to force the regulator output to 0V when the comp is high(high output is 5V) just as if the DAC would have produced 4,5V.
The comp output just needs to go high so it all depends on the sensitivity of the circuit that switches from low to high, it doesn't need to be a comparator if anyone have any other suggestions?