Soft clipping circuit with no diodes?

Started by fryingpan, March 01, 2023, 09:52:18 AM

Previous topic - Next topic

fryingpan

For kicks, I asked ChatGPT to provide a soft clipping circuit with no diodes.

This is the response:

QuoteHere is an example of a soft clipping circuit based on transistors:

Soft Clipping Circuit

In this circuit, two transistors (Q1 and Q2) are configured in a common emitter amplifier configuration with a voltage divider network (R1 and R2) at the input. The output of the amplifier is taken from the collector of Q2, and a feedback network (R3 and R4) is connected between the collector of Q2 and the base of Q1.

When the input signal is low, both transistors are biased in the active region, and the output signal is amplified without clipping. However, as the input signal increases, Q1 begins to conduct more heavily, causing the voltage at the base of Q2 to decrease. This reduces the gain of Q2 and limits the output voltage, introducing a gradual transition to clipping.

By adjusting the values of the resistors and the biasing of the transistors, the clipping characteristic of the circuit can be tailored to specific requirements. This type of soft clipping circuit based on transistors can be used in various audio and other signal processing applications to reduce distortion and improve signal quality.

It provides a link to a picture but the picture no longer exists.

I asked ChatGPT to draw a diagram and this is what it drew:

           R1                      R4
Vin -------/\/\/\---------------/\/\/\-------|
                \             Q2     R3       |
                 \            /|\             |
                  \           |              |
                   \          |              |
                    \     Q1 |/              |
                     \          \             |
                      \          \----------|---- Vout
                      /                       |
                     /                        |
                    /                         |
                   /                          |
           R2     /                           |
           /\/\/\/                             |
          |                                     
          |                                     
         ===                                   
          -                                     


I can't make any sense of it.

Dormammu

#1
There is no "soft\hard clipping", depending on the gain, we get a different rise\fall slope of the signal.
On the same circuits, we can get both "soft" and "hard" clipping, which sound different.
What the neural network was attempt to drawn may be like an AGC circuit.
Although it doesn't look like it at all.  ;)

bartimaeus

#2
chatgpt is just google in prose form. it's not an electrical engineer. if someone has already answered your question on some blog or article, it will copy paste that answer. but if the answer doesn't exist, it will grab bits and pieces from various blogs and hope for the best. it really isn't suitable for anything beyond the shallowest technical questions (at least right now).

EDIT: it's an interesting question though! my best guess would be JFETs? a basic JFET amplifier will hard clip one clip but soft clip the other. so maybe there's a way to combine JFETs to get soft clipping on both sides?

teemuk

I know it's not but it somehow reminds me of "Middlebrook & Richter" circuit presented here:
https://www.timstinchcombe.co.uk/index.php?pge=trisin

fryingpan

Quote from: bartimaeus on March 01, 2023, 12:51:23 PM
chatgpt is just google in prose form. it's not an electrical engineer. if someone has already answered your question on some blog or article, it will copy paste that answer. but if the answer doesn't exist, it will grab bits and pieces from various blogs and hope for the best. it really isn't suitable for anything beyond the shallowest technical questions (at least right now).

EDIT: it's an interesting question though! my best guess would be JFETs? a basic JFET amplifier will hard clip one clip but soft clip the other. so maybe there's a way to combine JFETs to get soft clipping on both sides?
Of course it's not dependable and it's basically just interactive Google; the article seems to have been taken from www.electronics-tutorials.ws in some form, since the original picture is taken from there (but it's no longer available).

FWIW, Rod Elliot provides a soft-clipping circuit of his own here:


But it does employ both diodes and BJTs (and I would like to understand how it works anyway).

fryingpan

Quote from: teemuk on March 01, 2023, 12:52:52 PM
I know it's not but it somehow reminds me of "Middlebrook & Richter" circuit presented here:
https://www.timstinchcombe.co.uk/index.php?pge=trisin
Actually it reminds me more of a very simplified version of the very first circuit on that page.



Just with two transistors, though (of opposite types).

Fancy Lime

It's funny how some people are worried that AI will take their jobs. Seems pretty clear which are the jobs AI will steal first: con men and bullshit artists. AI is very good at confidently inventing complete hogwash that sounds convincing unless you know anything about the topic at hand. I knew several people like that in school and university. Absolute experts in everything  :icon_rolleyes: OK, so AI will probably take the jobs of a certain type of journalist, media personalities, and "influencers". Mysteriously exactly the people who tell me to be worried about AI stealing my job. How curious...

Sorry, rant over now. The answer is JFETs wired as constant current devices in series with the signal and after that a resistor to ground. It's a bit unnecessarily complicated in a world where diodes exist and a bitch to tune right but it is possible. Do I beed to draw it or can ChatGPT do that with the additional info? It should know what a constant current configuration looks like and how to make it symmetrical, no?
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

GibsonGM

  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

antonis

Quote from: fryingpan on March 01, 2023, 01:19:26 PM
FWIW, Rod Elliot provides a soft-clipping circuit of his own here:

But it does employ both diodes and BJTs (and I would like to understand how it works anyway).

U1A is fed from (obviously symmetrical) duall supply..
For an output amplitude higher than 2V, Q2 is turned on and signal is clipped at about 1V (D1 forward voltage drop + Q2 VCEsat)..
(same happens for -2V and Q1..)

Actually, it's more mitigated 'cause there is a continous "interaction" between U1A output amplitude, R3 current limiting resistor and Q2 VBE (from full-off to full-on..)

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

fryingpan

Quote from: Fancy Lime on March 01, 2023, 03:08:41 PM
It's funny how some people are worried that AI will take their jobs. Seems pretty clear which are the jobs AI will steal first: con men and bullshit artists. AI is very good at confidently inventing complete hogwash that sounds convincing unless you know anything about the topic at hand. I knew several people like that in school and university. Absolute experts in everything  :icon_rolleyes: OK, so AI will probably take the jobs of a certain type of journalist, media personalities, and "influencers". Mysteriously exactly the people who tell me to be worried about AI stealing my job. How curious...

Sorry, rant over now. The answer is JFETs wired as constant current devices in series with the signal and after that a resistor to ground. It's a bit unnecessarily complicated in a world where diodes exist and a bitch to tune right but it is possible. Do I beed to draw it or can ChatGPT do that with the additional info? It should know what a constant current configuration looks like and how to make it symmetrical, no?
I doubt that. It mentions bases and collectors, so they must be BJTs.

Fancy Lime

Quote from: fryingpan on March 01, 2023, 03:58:43 PM
Quote from: Fancy Lime on March 01, 2023, 03:08:41 PM
It's funny how some people are worried that AI will take their jobs. Seems pretty clear which are the jobs AI will steal first: con men and bullshit artists. AI is very good at confidently inventing complete hogwash that sounds convincing unless you know anything about the topic at hand. I knew several people like that in school and university. Absolute experts in everything  :icon_rolleyes: OK, so AI will probably take the jobs of a certain type of journalist, media personalities, and "influencers". Mysteriously exactly the people who tell me to be worried about AI stealing my job. How curious...

Sorry, rant over now. The answer is JFETs wired as constant current devices in series with the signal and after that a resistor to ground. It's a bit unnecessarily complicated in a world where diodes exist and a bitch to tune right but it is possible. Do I beed to draw it or can ChatGPT do that with the additional info? It should know what a constant current configuration looks like and how to make it symmetrical, no?
I doubt that. It mentions bases and collectors, so they must be BJTs.
Sorry, I was imprecise. I did not mean "the answer to o the question, what did the AI mean" but "the answer the AI should have given instead".
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Rob Strand

#11
Quote from: fryingpan on March 01, 2023, 01:19:26 PM
Quote from: bartimaeus on March 01, 2023, 12:51:23 PM
chatgpt is just google in prose form. it's not an electrical engineer. if someone has already answered your question on some blog or article, it will copy paste that answer. but if the answer doesn't exist, it will grab bits and pieces from various blogs and hope for the best. it really isn't suitable for anything beyond the shallowest technical questions (at least right now).

EDIT: it's an interesting question though! my best guess would be JFETs? a basic JFET amplifier will hard clip one clip but soft clip the other. so maybe there's a way to combine JFETs to get soft clipping on both sides?
Of course it's not dependable and it's basically just interactive Google; the article seems to have been taken from www.electronics-tutorials.ws in some form, since the original picture is taken from there (but it's no longer available).

FWIW, Rod Elliot provides a soft-clipping circuit of his own here:


But it does employ both diodes and BJTs (and I would like to understand how it works anyway).

It's essentially an AC version of a VBE multiplier - an adjustable voltage diode. For one polarity the VBE multiplier resistors are 10k across the base and 10k+22k from the base to the collector.  The diodes prevent the two polarities interfering with each other.

The presence of the base resistors look like a resistor is being added in series with the "adjustable" diode.

Circuit 1 is essentially a diode clipper with the series resistor added.

Circuit 2 is the ESP circuit.   The input voltage scaled up by the multiplication factor at the input then scale back down
at the output.  This is to make it easy to see it is just a scaled-up version of circuit 1.

FWIW, I could probably do a little better with the match but you should get the idea,



It's not really a soft clipper.


FWIW, some of the Musicman amplifiers use this circuit in a feedback arrangement.  IIRC, they had a slightly asymmetric version.  It's also appeared in electronics magazines.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

fryingpan

Quote from: Rob Strand on March 01, 2023, 05:16:41 PM
Quote from: fryingpan on March 01, 2023, 01:19:26 PM
Quote from: bartimaeus on March 01, 2023, 12:51:23 PM
chatgpt is just google in prose form. it's not an electrical engineer. if someone has already answered your question on some blog or article, it will copy paste that answer. but if the answer doesn't exist, it will grab bits and pieces from various blogs and hope for the best. it really isn't suitable for anything beyond the shallowest technical questions (at least right now).

EDIT: it's an interesting question though! my best guess would be JFETs? a basic JFET amplifier will hard clip one clip but soft clip the other. so maybe there's a way to combine JFETs to get soft clipping on both sides?
Of course it's not dependable and it's basically just interactive Google; the article seems to have been taken from www.electronics-tutorials.ws in some form, since the original picture is taken from there (but it's no longer available).

FWIW, Rod Elliot provides a soft-clipping circuit of his own here:


But it does employ both diodes and BJTs (and I would like to understand how it works anyway).

It's essentially an AC version of a VBE multiplier - an adjustable voltage diode. For one polarity the VBE multiplier resistors are 10k across the base and 10k+22k from the base to the collector.  The diodes prevent the two polarities interfering with each other.

The presence of the base resistors look like a resistor is being added in series with the "adjustable" diode.

Circuit 1 is essentially a diode clipper with the series resistor added.

Circuit 2 is the ESP circuit.   The input voltage scaled up by the multiplication factor at the input then scale back down
at the output.  This is to make it easy to see it is just a scaled-up version of circuit 1.

FWIW, I could probably do a little better with the match but you should get the idea,



It's not really a soft clipper.


FWIW, some of the Musicman amplifiers use this circuit in a feedback arrangement.  IIRC, they had a slightly asymmetric version.  It's also appeared in electronics magazines.
All diode clippers have a relatively narrow transition. A way to soften the transition is to increase series resistance, and feeding this into a naturally clipping device with a somewhat soft transition, like a JFET. It is what I did with a design of mine, and the clipping is actually rather soft. Plotting the THD gives quite a proportional increase in THD to the input, with the THD increasing more rapidly after a certain threshold.

duck_arse

[more_importantly]

Quote from: Fancy Lime on March 01, 2023, 03:08:41 PM
...... con men and bullshit artists... How curious...


a request for that AI art/drawing program thing - please render a Mona Lisa in the style of the Bullshit Artists.

[/more_importantly]
You hold the small basket while I strain the gnat.

teemuk

Quote from: GibsonGM on March 01, 2023, 03:32:50 PM
Wait til it starts doing surgery :)

I'm getting worried only when it learns how to draw hands.  :icon_lol:


Steben

Quote from: duck_arse on March 02, 2023, 08:42:00 AM
[more_importantly]

Quote from: Fancy Lime on March 01, 2023, 03:08:41 PM
...... con men and bullshit artists... How curious...


a request for that AI art/drawing program thing - please render a Mona Lisa in the style of the Bullshit Artists.

[/more_importantly]

Rolling eyes Mona Lisa emoji
  • SUPPORTER
Rules apply only for those who are not allowed to break them

brett

Have a look at a schematic of a fuzzface. 
It's slightly different.  But it has soft clipping as q1 cuts out on even small -ve swings of signal.
Q2 soft clips the other side. 
cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)