Hysteresis or Not?

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,347
The circuit below is and audio amplifier/filter (IC1B) followed by a comparator (IC1D) to make a square wave from the audio signal. The comparator works from a lower reference voltage than the amplifier so that if the audio signal is too small there is no output.

Now the question: R6 would appear to be there to provide hysteresis. However, the presence of C2 seems to me to defeat that by filtering out any signal coming back through R6. Is this correct? If it is correct does R6 have any other function?
upload_2017-12-17_23-10-51.png
 

DbLoud120

Joined May 26, 2014
91
The circuit below is and audio amplifier/filter (IC1B) followed by a comparator (IC1D) to make a square wave from the audio signal. The comparator works from a lower reference voltage than the amplifier so that if the audio signal is too small there is no output.

Now the question: R6 would appear to be there to provide hysteresis. However, the presence of C2 seems to me to defeat that by filtering out any signal coming back through R6. Is this correct? If it is correct does R6 have any other function?
View attachment 141909
R5 along with C2 may be creating a high pass filter.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,347
R6 still provides hysteresis though with high frequency filtering from C2.
The circuit is supposed to be processing audio signals and the time constant of R6, C2 is one second so there isn't going to much audio left. Even without the capacitor, there wouldn't be much hysteresis as R6 and R5 reduce the feedback by a factor of over 2000.
 

Alec_t

Joined Sep 17, 2013
14,337
Could the hysteresis be to stabilise the comparator reference voltage against any residual 5V supply ripple/noise getting past the R12C1 filter?
 

AnalogKid

Joined Aug 1, 2013
11,056
R6 would appear to be there to provide hysteresis. However, the presence of C2 seems to me to defeat that by filtering out any signal coming back through R6. Is this correct? If it is correct does R6 have any other function?
No, R6 has no other function.

Yes, C2 defeats the hysteresis created by R6.

But the hysteresis ratio is approx. 0.02%. That is less than the hysteresis created by fingerprint oil on the pc board. IOW, there is no hysteresis.

Without C2, hysteresis is created by the ratio of R6 to the parallel combination (Thevenin equivalent) of R5 and R2. They form a voltage divider between the IC1D output voltage and whatever is at the R2-R5 node. Adding C1 to the reference divider string means that the DC voltage is based on R1-R2-R5, but the instantaneous Thevenin equivalent impedance is based on R2-R5 only.

ak
 

Robin Mitchell

Joined Oct 25, 2009
819
Just a thought, assuming that the op-amp input current consumption is tiny would R2 not feed some of the output signal back into the positive input of IC1B? When that happens, the output of that amp would increase which would result in a larger voltage input on the negative input of IC1D which would reduce the output (i.e. acting as negative feedback)?
 

AnalogKid

Joined Aug 1, 2013
11,056
With R6 =10M, the feedback would be tiny-to-trivial, but yes, there is a path there. C1 is supposed to prevent that but it should be much larger, especially if R6 is reduced to something that allows hysteresis to happen. The corner freq now is 300 Hz. I would add a 100 uF in parallel with C1.

Also, note that the input highpass filter corner freq is 2.8 kHz. Unless you are trying to detect only high frequency events like claps and transients, that's high.

ak
 
Last edited:

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,347
It is supposedly flatish from 500Hz to 9kHz and 'sharply attenuate' <300Hz and >15kHz so I think I may need to LTspice it.
 

MrAl

Joined Jun 17, 2014
11,496
Hi,

It looks like an auto zeroing circuit, which compensates for any input offset voltage of the op amp.

If the op amp has 2mv input offset, then that will produce a larger output error and thus the square wave will not switch at the zero crossing of the input sine. If the input offset can be adjusted, it will be more precise. The feedback looks like it can do that automatically.
It's interesting that the passive filter is a decent averaging network, and that the output to input ratio results in an error signal of about 2mv or so, which is about what the spec is for this op amp.

I have not analyzed this circuit yet though, and there is always the chance it is not designed right either. Knowing the source of the circuit might help here.
 

AnalogKid

Joined Aug 1, 2013
11,056
IC1B has a forward gain of 38.5 dB. That gain intersects the gain-bandwidth curve at around 9-10 kHz, which introduces a single pole lowpass filter caused by the internal compensation; that filter is independent of any feedback networks. Also it means that the amp is running "wide open" at that frequency and above, as in no negative feedback to stabilize gain, lower output impedance, create a virtual ground at pin 6, etc. Overall, not good.

The LM324 is an indestructible workhorse, but it is old and has relatively low gain and bandwidth, high crossover distortion, etc. If you need a quad amp and you need that much gain, newer opamps from just about everybody can out-perform it.

Where did you get this circuit (or is it your own design?) and what is it a part of?

ak
 

MrAl

Joined Jun 17, 2014
11,496
Hi again,

On page 56 they talk a little about the offset voltage but they mean the DC offset due to a single supply. They do say that it should be adjusted as close as possible to 2.5v which means maybe they did use the feedback to help keep that more precise. Maybe a good analysis would help here too. IT could be that the voice chip needs a somewhat accurate signal to work right and so the offset has to be adjusted carefully.
 

MrAl

Joined Jun 17, 2014
11,496
Hi,

Nice sims.

Any chance you can show the node voltage at "Y".

To see this properly, we would have to first see "Y" with some higher frequency like 1kHz or above, then add a small offset voltage to the first op amp then show "Y" a second time with same frequency. Also try to see if we can spot a difference in the output square wave as this is happening.

I was going to do a math analysis but didnt get to it yet. I think that might show the results better than a sim but with some effort a sim might show the results too.
 

Bordodynov

Joined May 20, 2015
3,181
Hi,

Nice sims.

Any chance you can show the node voltage at "Y".

To see this properly, we would have to first see "Y" with some higher frequency like 1kHz or above, then add a small offset voltage to the first op amp then show "Y" a second time with same frequency. Also try to see if we can spot a difference in the output square wave as this is happening.

I was going to do a math analysis but didnt get to it yet. I think that might show the results better than a sim but with some effort a sim might show the results too.
I'll conclude Y tomorrow. Now I do not have access to the project.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,496
I did not notice any compensation.
See
View attachment 142117

Hi,

Well actually to see this best i think the test offset source has to be constant, at least in a simulator. The reason is so that we can see how the circuit reacts better. For example, with 0.001v offset, i could not see how the circuit would not react to that because that means the output sine will be offset by a larger amount (due to the gain) and thus the zero crossing of the comparator will be changed and thus the duty cycle of the output of the comparator will change and thus the PWM into the filter will change and thus the average DC output of the filter will change.
How much it changes will be interesting, but with a good averaging circuit it should follow the offset. After all, PWM into a low pass filter produces an average DC output that is proportional to the input pulse width or at least semi proportional.

I meant to try this myself too but didnt get to it yet.
 
Top