Real signal clip detector anyone?

I have searched and found a few conversations about clip detecting but they all appear to be some form or variation of a window comparator or peak level detector which I'm not interested in.

I want to have a preamp input signal clip detector that actually detects a linear non changing voltage (or value) (dc) which occurs when a sinusoidal wave clips, independent of any threshold voltages or rails because I don't know what the voltages are of the input source unit.

I've looked at dc offset detection for triggering crowbar spkr protectors but the amount of time the signal is in clip or just stuck at the dc rail is way beyond useful for detecting small signal clipping for thd reasons.

I've simulated a few sample and hold circuits which sort of work at specific frequencies but not reliably across the 20 to 20k.

I'm starting to get the idea that this is not so simple in the analog world but might not be too difficult in the digital world.

I'm not completely lost in designing in the digital world (but close). However, I envision an adc feeding a pic with a fairly simple numbers watching routine, that'll output a 1 on some io when a certain string of similar values are read in. Just brainstorming here,

Thank you for reading my post
 
So the next time you listen to electronic/synth music the detect circuit triggers? Not very friendly for that, but I see the argument for such a thing.


You need a threshold after a differentiator as well as a threshold before the differentiator - just need to recognise a near-zero differential coupled to a DC offset for a certain length of time.
 
I want to have a preamp input signal clip detector that actually detects a linear non changing voltage (or value) (dc) which occurs when a sinusoidal wave clips, independent of any threshold voltages or rails because I don't know what the voltages are of the input source unit.
But you know the gain of your pre+amp...?
So then you know the max signal you can have on input. And why not just detect a level just below that value?
 
If I understand it correctly, it is about detecting input signals that are already clipped before they arrive at the preamplifier (for example clipped in the studio, in the audio processing of a broadcast transmitter or in a DAC without headroom), rather than detecting whether the signals will make the amplifier clip.
 
The primary use of this detection circuit will be in the automotive field. I work for a small install shop and my boss has expressed a desire to know when the input source (it could be customers equipment, factory, or our own) is clipping, which will help us a great deal in tuning the systems. So I don't have a practical way of knowing what's going on in all these different systems, just that I need to know when they are clipping.
 
The primary use of this detection circuit will be in the automotive field. I work for a small install shop and my boss has expressed a desire to know when the input source (it could be customers equipment, factory, or our own) is clipping, which will help us a great deal in tuning the systems. So I don't have a practical way of knowing what's going on in all these different systems, just that I need to know when they are clipping.
Why can you not use an oscilloscope? Is this some thing that has to monitor the signal all the time or only needed during testing?
 
while I do use a scope at work, this is for an in house amplifier my boss asked me if I could make for use in the shop and hopefully for sale if all goes well. One of the many items we talked about this amplifier having was an led clip detector for not only the amplifier but the input source as well (two separate leds). The clip detector for the internal amplifier is not such a big deal but I got stumped on the input source clip detection. Which is where I'm at now. It needs to be self contained, and able to detect a clipping input signal from 20 to 20k and from 0~4v rms standard input range (preouts only) from 12v head units. This 0~4v rms is of course not going to be the same from all possible sources, only the theoretical range this circuit may encounter.
 
I haven't been able to come up with an analog solution for my project and have decided to try a digital solution. So far I've figured it won't be a full 20 to 20k as the adc bit depth and speed is beyond a cheap midrange pic chip not to mention my lack of coding brain power. I'm thinking a pic16f1708 mainly because I have some already and a 10 bit adc should suffice, with some sacrifices. I think I can get up to about 15k with 10 bits, keeping in mind I'm not using this to reproduce audio only to quantize the signal for discrimination, which I haven't figured out how to do just yet but I'm hopeful. I'll post my progress, maybe it could be useful to someone, it will be slow going though as this is not my day job.
 
I haven't been able to come up with an analog solution for my project and have decided to try a digital solution.

Either digitally or in analog, clipping produces harmonics. The more severe the clipping the more out of bounds the harmonics become.

Could you not just use a high pass filter starting at about 22khz and assume that anything in that range, above a small threshold is the result of clipping?
 
That could also trigger on high-resolution recordings of jangling keys, for example, or a DSD64 recording of anything. Then again, a system looking for flat nonzero waveform portions could trigger on synthesizer music or on music that has deliberately been clipped in the studio (in which case it would be perfectly correct, of course).
 
I wonder how this would work with with class d amplifiers and don't most amplifiers produce low level harmonics well above 20k even when not clipping? while I'm assuming the majority of the time this amplifier will connect to a low level ab output type source there are many factory system now that you must connect after the factory amplifier because the audio is not variable coming out of the factory head unit, it's can controlled at the amplifier. So it's possible I would need a high to low level converter and this prior amplifier may be class d and those can have garbage above the audio band especially around the switching frequency.
 
I think it is a design rabbit hole imo, so many ways to trick it into a false detection. Good exercise in AI perhaps. Look at all these music sources on a scope and see what you are up against.
To me it is like a trip to Mars, good chance of dying even before you get there.
Just being real.
 
But the op is asking for an easy way to design a system to do the same processing our brains accomplish or what a scope would easily display ��. Folks are arguing about hearing ppm levels of thd, the effects of a capacitor on sound reproduction, futile I say.
 
About the only way to design a successful clipping detector is to compare an amplifier's output voltage to it's power rails. When the output gets to about 95% of the rail voltage, turn on the clipping light.

This can also be done at the pre-amp level but it won't tell you if the power amp is clipping or not...

The only external alternative that appears to make sense is to take something akin to a VU meter circuit and use a scope to calibrate it to the amplifier's maximum output at clipping.
 
Crown amps use a circuit that monitors the output of the amplifier, reduces the amplitude of the output signal to cancel the gain of the amplifier and compares it with the input. The difference between the two signals is amplified and put into a peak detector. If the peak exceeds a threshold corresponding to >1% distortion the clip light is illuminated. No need to involve the power rails. However this will only show distortion generated by the amplifier and not distortion already present at the input.
 
Lots of "guitar pedals" (effects boxes connected between an electric guitar and its amplifier) include clipping deliberately. Fuzz boxes are a famous example.

So if you play Jimi Hendrix recordings at any volume level, a "real signal clip detector" will activate. Is that desirable?
 
I believe the trick will be detecting a series of clipped signals at the same level. In a previous post I figured the detection algorithm would need to see a series of the same behavior or strands of close or the same (low resolution adc) numbers detected after some threshold to avoid detecting silence, that repeats at the exact same level or number a few times. I'm hoping this will avoid spurious detection or falses. Distortion effects are in the music not at the peak of the devices signal range, although I guess it could be but that would not sound pleasant, so it's doubtful.