throbscottle
Well-Known Member
After spending far too many hours trying to cobble together an absolute value peak detector with a full wave precision rectifier, which would work up to 1MHz, I gave up on the precision rectifier part (which isn't really needed since I just want to detect input voltages over 1v ± peak) and did this way instead. One comparator is triggered if the input is over +1v, the other if it's under -1v. R1 would be adjustable in real life to set the threshold. I've tried simulating it down to 10Hz and up to 1MHz. The output is rather rough at low frequencies and the response time isn't very good, but it about does what I want it to do.
Can anyone help me improve it? I would like:
*Better symmetry when using real-world resistors
*Faster response to changes in input voltage
*Some proper hysteresis. Once the output has gone high, I don't want it to just follow the input when it drops a little. C5 provides the effect to some extent but real hysteresis would be better, since logic level output is lost when the input amplitude varies at 1 or 2 Hz - it needs to be immune to amplitude drops below the threshold down to about 0.5Hz. Increasing C5 makes the overall response too sluggish. Hope that doesn't sound contradictory!
*Neutralising the diode drops of D3 and D4 would be nice, but speed is more important.
*Not sure yet, this might actually need to be a window comparator
Thanks in advance, as always
Can anyone help me improve it? I would like:
*Better symmetry when using real-world resistors
*Faster response to changes in input voltage
*Some proper hysteresis. Once the output has gone high, I don't want it to just follow the input when it drops a little. C5 provides the effect to some extent but real hysteresis would be better, since logic level output is lost when the input amplitude varies at 1 or 2 Hz - it needs to be immune to amplitude drops below the threshold down to about 0.5Hz. Increasing C5 makes the overall response too sluggish. Hope that doesn't sound contradictory!
*Neutralising the diode drops of D3 and D4 would be nice, but speed is more important.
*Not sure yet, this might actually need to be a window comparator
Thanks in advance, as always