First question, why are you trying to use a comparator as a replacement or G element
in an active filter configuration ?
The reason why this is not a good idea is a comparator has no phase margin compensation ,
the internal comp cap normally seen in second stage of OpAmp is removed. So an active
filter config will typically turn into an oscillator because of this. Even worse, under the
right conditions, is you could get a phase reversal of output if an input is driven outside
its CM range, actual latchup can occur. Depends on the way the OpAmp/Comparator
I'm not trying to use a comparator to replace an element in an active filter. Indeed, I was trying to do a similar project to this http://www.edn.com/design/medical/4421721/Product-how-to--Heart-rate-monitor-using-a-programmable-SoC
In the attached picture, you can see that the comparator is used to "translate" the analog signal pulses into "digital" (low level and high level) signal pulses, so I can use the rising edge of the pulses to count it into the psoc.
I tried to use the comparator, and the output were just an unchanged level noise, whenever input voltage I put in the inputs. So just to check if I was doing anything wrong, I tried to use the op amp that was really configured and well working as a comparator (I disconnected all the active filter components, and just used the op amp with the 2 input voltages and 1 output pin plug in to the oscilloscope).
So my question is still alive, there's some known problem with the psoc 4 ble internal low power comparator or the op amps in order to use it as comparators? (I was measuring the voltage applied to the inputs, so there's no wireling or linking error)
psoc4f4.jpg 185.0 K
You have a cascaded G ~= 250 x 200 = 50,000.
The offset is 1 mV, so due to offset alone you would saturate the output of the 2'ond
opamp. Possibly AC couple stage 1 to 2.
One possibility is convert first stage into a TIA configuration. Might be able to take
more effective G there thereby lower stage 2 G, and overall noise.....
One approach to minimizing offset and noise
Thanks Dana. The above project was just a reference. I changed resistance and capacitor values.
The point is, that even with a new blank project, with only one op amp connected to three analog pins (V+, V- and Vout) in order to route in and out from the psoc, I'm unable to get it work as a comparator. (A comparator just need 2 input voltages and it generates 1 output). So please, don't focus my problem in if I'm using a wrong resistance or capacitance value, because I don't used it when I tested the most simple comparator case (3 analog pins and 1 op amp).
Just to be sure that I'm not making something wrong, could you please upload a simple project for the PSoC 4 BLE, placing just 1 op amp and 3 analog pins (I will power the 2 inputs and graph the output in an oscilloscope) that you tested yourself and you're sure it work? I don't know a simple comparator project more than this, but it doesn't work when I test it.
Thank you again.
Yeah, I tried the example project, the low power comparator, the comparator, and a standalone op amp, and I couldn't get it work.
So forget it, there must be something wrong in somewhere. I will use an external op amp (LM2904) that I tested as a comparator and worked fine in the oscilloscope output.