Hey guys!
I'm charging an unknown inductor from 0 to a certain current, then discharging it down to another current, recharging etc.. using the comparators to measure how long this takes (effectively working out L), but changing the thresholds to slowly increase the currents starting point, until it saturates... soo.. with say a 10uH inductor, at 1V... probably around 10+30us = 40us.
Nike Odem, I had something similar but not as precise as that ( I had no biasing the diodes), I'll simulate that on LTspice though and breadboard... because the window will (probably) be fixed, that would be a neat solution! thanks
And Alec, thanks man, that looks like a sort of summing amplifier which is the idea I had just after I posted :/ Its typical, one spends 3 days thinking of a problem, finally posts... and then I think of a simple solution (with your guys help) whilst drinking tea...
I was far too busy thinking about the 'centre' voltage, which the window being 'window/2' either side of it. But, I could just set the lower threshold, then add a voltage to that with a summing amplifier (like your current source and resistor there!). ergo.. a classic opamp summing amp. Two input voltages: one sets the lower threshold (reference), the second is the window width (going for 1v, but of course this is adjustable as well).
Just in case this helps anyone, here's a quick schematic - note this is just a proof of concept, won't be using these components in the design, and in fact will use each output of the comparator separately. But the idea of having two voltages, fixed window (V1 in the schem, set by trimmer) and a variable reference (V2) suits me just fine. Sorry if I didn't explain it well at first