Author Topic: Clipping Indicator. Opamp as window comparitor, thougts and improvements.  (Read 2807 times)

0 Members and 1 Guest are viewing this topic.

Offline stianTopic starter

  • Contributor
  • Posts: 14
  • Country: no
Hello people.

Im trying to make a clipping indicators for both the positive and negative part of the signal.
I dont have any experience in make such a circuit before. So i google a bit, mess around some in ltspice and falstad.
What i ended up with was basically a window comparitor that has 3 states. To me this seems like a ok solution.
before i try to implement this in real life i like to know.

* Is this method bad?
* Is there a simpler and better solutions that i can use instead?

Simulation on falstad can be seen here. http://tinyurl.com/y89lrmk8
Here is a picture of the circuit.


Regards.
Stian
« Last Edit: June 15, 2018, 10:12:06 pm by stian »
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Do you need to diferentiate between high and low clip? If bot there are better approaches for sure

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline stianTopic starter

  • Contributor
  • Posts: 14
  • Country: no
Do you need to diferentiate between high and low clip?
Thats my goal.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Then it seems like it might work, there are other posibilities but this looks fine I guess.

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Looks OK.
I think one 556 would just about do it, with slightly different Control Voltages so that the 2 Trigger Voltages were slightly different.

556 version for tweaking.
« Last Edit: June 16, 2018, 05:44:35 pm by StillTrying »
.  That took much longer than I thought it would.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Your "window comparator" has diode forward voltages that change when the temperature changes and is different for each diode.
The output level of the inverting opamp is clamped by the diodes to one diode voltage drop that is not enough voltage to turn on the LED driver transistors.
Our vision sees a pulse duration shorter than about 30ms as being dimmed so you probably need peak detectors to stretch the duration that the LEDs light with shorter input durations.
 

Offline stianTopic starter

  • Contributor
  • Posts: 14
  • Country: no
@StillTrying I guess one could use a 556 timer aswell, sadly i dont got any in stock. I got tonz of opamps and transistors tho :)

@Audioguru Yea i was thinking about the led will look like its flashing at low freq, (be dim).  but this isnt really a issue for freq higher than 30HZ ish.
Thanks for tip tho. but including a peek detector means i need two of them, on for each periode of the signal and i want to keep it relativ simple :)
« Last Edit: June 16, 2018, 06:41:24 pm by stian »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Window comparator is not good approach. Clipping detection needs to at least be related to actual supply voltage rails of the amp. You need to sense voltage between the output and supply rail to detect whether saturation occurs.

For example this clever transistorized solution is good enough for audio amps.

 

Offline stianTopic starter

  • Contributor
  • Posts: 14
  • Country: no
@Yansi . why is a window comparitor not a good approach ?
I did test out that circuit you posted in falstad. It works great tho.

However there is one small issue with it. It detects clipping on both parts of the signal (pos&neg) with one led.
I want to see if its the upper, lower or both periode of the signal that is clipping. (as the offset is adjusted in dc output mode).
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Years ago I made a clipping indicator by comparing the amplifier input to its attenuated output. When there is a difference then it is caused by distortion which is clipping in a low distortion amplifier.

A peak detector will stretch the short duration first sound from a piano key that is producing clipping long enough for the LED to be bright. Without the peak detector then this kind of short duration clipping will appear dim or not seen. Many other sounds in music are short duration. You hear the clipping but your vision cannot see the LED lighting properly for a duration less than 30ms. Use an Xenon light instead of an LED.
 

Offline stianTopic starter

  • Contributor
  • Posts: 14
  • Country: no
@Audioguru ok so you suggest i add in a peak detector.
A full blown peek detector for both the pos&neg periode i think is a bit overkill. I can see it will improve alot.
But i was thinking that there must be a much simpler way to reduce the "flashing" of the leds.  also a xenon bulb i dont have.

I was thinking, cant i just toss in some caps over the leds?. 

I test this in Ltspice and it seems to work fine.
The dip on the leds are now just around 2mA instead of a full 12mA on each trigger.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Window comparator of what against what?

You can not compare the output signal of an amplifier with a fixed reference window. As I have already pointed out, you need to compare against the instantaneous supply voltage of the amplifier and respect the saturation voltage drop across the output stage, which is mostly independent of the supply rail voltage.
 

Offline stianTopic starter

  • Contributor
  • Posts: 14
  • Country: no
Yansi. i appreciate your feedback very much. but i don't understand why you say it will not work.
Ok so, i might not have explained myself good enough. "as usual".

Im not trying to see if the output signal of the amplifier is clipping.
i want to check if the input signal will clip.

If i have a Input signal (NOT OUTPUT), that swings MAX between 6v-12v and 6v-0v (12vpp max).
Now this will cause clipping on the signal due to that the opamp has a VOH = Vcc - 1.5v and VOL = 20mv
Any input signal above 10.5 will cause clipping if vcc = 12v.
So knowing that the signal will start clipping at 10.5V i can use this window comparator to set the trigger levels right?
Also, the DC offset if adjustable. now if i set the offset to example 8V , and the signal in is example 6V in. there is about 0.5V of clipping on positive period.

Hope this clarify my intentions a bit better.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
What is the signal source that has a very high level of 10.5Vp-p and you want to detect when its voltage exceeds 10.5Vp-p and its offset voltage?
It is not a 3Vp-p audio signal. A clipping detector is always used at the output of an audio amplifier, never at its input because an audio amplifier has plenty of voltage gain. Its output produces clipping, not its input voltage.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar


What is the signal source that has a very high level of 10.5Vp-p and you want to detect when its voltage exceeds 10.5Vp-p and its offset voltage?
It is not a 3Vp-p audio signal. A clipping detector is always used at the output of an audio amplifier, never at its input because an audio amplifier has plenty of voltage gain. Its output produces clipping, not its input voltage.

Not always, you could overdrive the input stage or you can measure the input signal and know how much signal will be at the output. Also, asymmetrical clipping doesn't mean DC offset, it could be an asymmetrical signal with thin high peaks on one side and wide low ones in the other (seen in signals with even harmonics)

JS

If I don't know how it works, I prefer not to turn it on.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf