I am an Electrical Engineering student and I'm making a relay test for dad because I want to design stuff. Basically, there is an oscillator switching the relay constantly, and there is a \$ 1\text{A}_{rms} \$ passing through the 6 switches. Then I have a circuit which is looking at the voltage across the 6 switch (and if that voltage is too high, that means that the contact resistance of the switches is too high and the relay is buggered). Anyway, the circuit looking at the voltage consists of two op-amps to make a precision full wave rectifier, and then a single stage passive RC filter on the end to make smooth it.

Now, I wanted to replace the passive RC filter with a Sallen-Key one, so I did the design and found that to get a corner frequency of 10Hz and Q of 0.5, use 1.59Mohm resistors and 0.01uF capacitors (or 159kohm and 0.1uF or 15.9kohm and 1uF etc...).

Then I did the simulation and I'm getting unexpected results. I'd appreciate if someone could perhaps advise me as to what the problem is or what I've done wrong.

For some reason, if I lower R and increase C, the filter doesn't seem to work properly.

As far as I can tell, both filters should be exactly the same, they have (as far as I know) the same corner frequency and Q factor.


Pic1 Pic2

  • \$\begingroup\$ Are you trying to design a low-pass filter? \$\endgroup\$ – abdullah kahraman Feb 12 '13 at 9:06
  • \$\begingroup\$ Yes. A 10Hz low pass filter. I have designed it, the values I used are supposed to give a 10Hz corner frequency and a Q of 0.5. For some reason, the rise and fall time of the first picture are much poorer than the second, despite them having the same Q factors. \$\endgroup\$ – user968243 Feb 12 '13 at 9:10
  • \$\begingroup\$ To test the frequency response of your filter, you can run an "AC analysis" by editing the simulation command. You should give a input voltage source that is configured as "small signal AC analysis" with an AC amplitude of 1. Have a look at this and this image. \$\endgroup\$ – abdullah kahraman Feb 12 '13 at 9:19
  • 2
    \$\begingroup\$ What I am guessing is that settling time is changed, however the response is the same. Try running the simulation for 2 seconds and see if they are stable at the same value. \$\endgroup\$ – abdullah kahraman Feb 12 '13 at 9:42
  • 1
    \$\begingroup\$ You can create different voltage sources, first to run from 1 to 10 cycles, second to wait 15 or 20 for example then run for 10 etc., if there isn't more elegant way to do it. \$\endgroup\$ – zzz Feb 12 '13 at 12:28

One ting that jumps out is you have not selected a model for the diode - right click and select one from the list. Otherwise it may not simulate correctly.

I think what you are seeing may be to do with the rectifier not being able to sink current (only a small amount will flow through the 200k resistor), so the input signal will not look as it would unloaded, it will "charge" to it's peak. Then the larger the cap, the longer the fall time when the signal stops. Try putting a non-inverting buffer in between the rectifier and Sallen Key input. This should make both filters respond in the same way.

  • 2
    \$\begingroup\$ My thoughts exactly. The rectifier has an output resistance of 200k when it's output voltage exceeds the op-amp (U3) output. \$\endgroup\$ – MikeJ-UK Feb 12 '13 at 13:58
  • 1
    \$\begingroup\$ I'd add that if you put in a noninverting buffer, give it a reasonably small input impedance via a shunt resistor to ground, so that that stage's input offset current does not have to return via the diode network. \$\endgroup\$ – Kaz Feb 12 '13 at 17:06
  • \$\begingroup\$ Yep, the non-inverting buffer does the trick! Thanks. I thought that when I put that Sallen Key filter on the end of the rectifier, it would just filter what it sees on the rectifier... I guess I can see that the capacitors have no discharge path though... I guess I was viewing the output of the rectifier as a voltage source, which I guess it's not... \$\endgroup\$ – user968243 Feb 13 '13 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.