New here, and (hopefully) a new clipping approach for everyone

Started by phasetrans, December 09, 2018, 04:44:23 PM

Previous topic - Next topic

phasetrans

Hey all,

I'm Phil. I'm an engineer by day, and have twenty years moonlighting in professional audio, including a five year stint as technical editor for one of the pro audio trade magazines.

A little while back I got bored with loudspeakers (what I know best) and decided to play around with effects. I've got a few things I'm doodling on, and this is the first to make it all the way to breadboard status. It is a simple asymmetrical clipper built from an optocoupler.

The project LTspice, audio samples, and other docs are in the following public Google Drive folder. I'm happy to answer any questions. The thing works, but it is fairly subtle. But hopefully it spawns questions and/or other ideas:

https://drive.google.com/folderview?id=1ydY3RWJImnL3gdoPldqWToBmxaCoBjVf
  • SUPPORTER

Rob Strand

Welcome by the way.

What's the motivation/thoughts from your side?

When I first looked at the circuit I was wondering why you chose an opto it seemed you could get a similar result with a normal transistor.

One subtlety (which might trick some people here) is the clipper is DC coupled.  From what I can see it acts like a DC clamp for positive swings (above the reference) only.

With the zener (D1)  biasing scheme the opamp output sits at 4.7V.  The zener (D2) matches the voltage of D1 so the opto won't turn on until the opamp swings to approx 1.7V above 4.7V.  1.7V is the opto LED turn-on voltage.   When the 1.7+4.7V threshold is reached Q1 turns on and clamps the output.  If the LED current was high enough it could in theory pull the output all the way down to zero (creating a frequency doubler).  However it looks like the LED current has been tuned so that Q1's current can't pull the output too far down.

I guess the problem I see is the clamp voltage at the output of the opto isn't set by any feedback mechanism.  It's open-loop and the clamp voltage depends on fine tuning the LED current (with the 2k resistor).   The opto current gains vary a lot so you would need a pot to tune that.

if it sounds good that's a whole different thing!
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

phasetrans

Rob,

Motivations?
1. It occurred to me in the middle of the night while up with baby #2
2. If you look at the CTR curves for optocouplers, they aren't that linear, so I decided to see if that additional nonlinearity was interesting.
3. It seemed simple to build for a first project.

Operation
1. It works basically as you describe. And has the problems you describe. I'll try the same thing with a BJT common emitter config at some point.
2. It can be a (nasty sounding) doubler.
3. Change R5, or the led limit resistor to change how it digs in
4. Here are some subtleties. The two zeners have different knees. The 1n750 is squishier. That smooths the photo current transition. The diode Vf here is more like 1V.
5. More subtlety. Changing the photocurrent leakage to ground changes the vibe. You can replace the diode on the base to ground with a couple megaohm resistance, for a different flavor. Or you can throw one of the zeners there in place of the 1n4148. Then the diode capacitance can play a role and shape the tonality into the other half of the TLV272.

It sounds pretty ok until it doesn't. Not amazing, but basically how the simulations said it would behave.

Cheers,
  • SUPPORTER

phasetrans

It should be mentioned that in all of the sample audio, because of a broken pot connection, the output voltage divider was fixed as a 1k above and 10k below.
  • SUPPORTER

Rob Strand

Thanks for going over the main points.

QuoteIf you look at the CTR curves for optocouplers, they aren't that linear, so I decided to see if that additional nonlinearity was interesting.
OK that's a good motivation.

QuoteHere are some subtleties. The two zeners have different knees. The 1n750 is squishier. That smooths the photo current transition. The diode Vf here is more like 1V.
I thought that might be the case (but I didn't want to clutter my post too much).

Changing to a transistor might lose some of that unless you add a resistor to ground to promote more current through the zener before the transistor turns on.

QuoteMore subtlety. Changing the photocurrent leakage to ground changes the vibe. You can replace the diode on the base to ground with a couple megaohm resistance, for a different flavor.
How to duplicate that with a transistor might be a bit more difficult, especially when combined with the previous point.


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

phasetrans

Quote from: Rob Strand on December 09, 2018, 11:32:26 PM
Thanks for going over the main points.

QuoteIf you look at the CTR curves for optocouplers, they aren't that linear, so I decided to see if that additional nonlinearity was interesting.
OK that's a good motivation.

:icon_biggrin:

Quote
How to duplicate that with a transistor might be a bit more difficult, especially when combined with the previous point.

I think it will go on the shelf. I'm glad it works, but it doesn't quite have the mojo.
  • SUPPORTER

Transmogrifox

I'm almost always a fan of unconventional stuff.

I'm a switch-mode power supply designer by trade, so use of an optocoupler hits close to my heart.  Replace the op-amps with a TLV431 and then you will have something from my world. :)

On that note, a fuzz face type of circuit using an opotcoupler for the second stage transistor could be an interesting concept.  I know it would result in fuzz, but I don't know whether the opto would add anything musically unique...but it would be interesting to try.  A TLV431 might help make up for some of the gain, but then maybe the noise would not be bearable.  Never know until it is tried ;)

You have inspired me. Thanks.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

phasetrans

Quote from: Transmogrifox on December 10, 2018, 10:46:44 PM
I'm almost always a fan of unconventional stuff.

I'm a switch-mode power supply designer by trade, so use of an optocoupler hits close to my heart.  Replace the op-amps with a TLV431 and then you will have something from my world. :)

I work in the lighting industry, so not that different than SMPS. Though I'm more jack of all trades, master of none, than specific in one area.

Quote
On that note, a fuzz face type of circuit using an opotcoupler for the second stage transistor could be an interesting concept.  I know it would result in fuzz, but I don't know whether the opto would add anything musically unique...but it would be interesting to try.  A TLV431 might help make up for some of the gain, but then maybe the noise would not be bearable.  Never know until it is tried ;)

I would be interested to see what bad things could come out of the TLV431, or more generally LDOs. To my mind the photocurrent is another just another port into the base of a BJT. There's probably lots of uses I haven't even considered.

The challenge with the circuit above is that the photocurrent gets too high, and the circuit can "overclip" the signal. You get a reasonable transition from primarily 2nd order to a mixture of 2nd, 3rd, 4th, and 5th, but then it gets pretty nasty. Next I might play with some current clamping with another zener(s) above the LED to moderate the photocurrent at the peak of the waveform.

Quote
You have inspired me. Thanks.

Great! that was the intent of putting it out there. If you build it, I would suggest starting from the optocoupler configuration below. I slightly prefer the tone with the resistor to ground. LTspice says this gives less 4th harmonic, but it could just be an artifact of the NPN model in the subcircuit.

The vanilla lite-on 4N25 and On Semi 4N25(V)M were the best sounding of the half dozen 4N25 we tried with N=1. Audio samples are On Semi part with schematic in the Google Drive.

The other voicings are to taste. The choice of the modern TI rail to rail opamp was to give as much flexibility as possible on either side of the optocoupler, and to minimize any opamp sound. The TLV272 in the breadboard is RtR on output, but not input.

I haven't tried all the obvious stuff like seeing how the infrared diodes sound in clipping, or the fuzz from the BJT in the various optocouplers.

  • SUPPORTER

Rob Strand

QuoteI'm almost always a fan of unconventional stuff.
It's all too easy to stay on the conventional route.   Once you step off that path you can burn-up a lot of hours getting no where.  You always bin more than you keep.   The fun is coming up with the idea or motivation in the first place.

Re the current circuit:  one twist would be to wire-in a MOSFET instead of a transistor/opto.    Without a series diode it would clip negatives as well.  Connect the source to GND and you get a slight twist on the current theme.  The MOSFET is in saturation or cutoff and you don't need to worry about the diode. If you wire the source to a stiff Vref the MOSFET is in triode mode.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Prehistoricman

I wanted to do something like this! I was in my local hackerspace when I found a tube of about 20 6-pin optocouplers. Unfortunately never followed through with any experimenting though.

I wondered if they had any particular characteristic that's different to normal BJTs (except the obvious) and planned to convert a BJT pedal to use them.

phasetrans

Quote from: Rob Strand on December 11, 2018, 03:27:49 PM

Re the current circuit:  one twist would be to wire-in a MOSFET instead of a transistor/opto.    Without a series diode it would clip negatives as well.  Connect the source to GND and you get a slight twist on the current theme.  The MOSFET is in saturation or cutoff and you don't need to worry about the diode. If you wire the source to a stiff Vref the MOSFET is in triode mode.

Rob, so you're suggesting to tailor the behavior of the DC coupled MOSFET gate so that the "negative" side behavior is then shaped by where you are with respect to the Vgs threshold?
  • SUPPORTER

Rob Strand

QuoteRob, so you're suggesting to tailor the behavior of the DC coupled MOSFET gate so that the "negative" side behavior is then shaped by where you are with respect to the Vgs threshold?
I was only suggesting the option of using the MOSFET in place of the opto/transistor.  The negative clipping was a side-effect which you could keep or try to remove with a series diode.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

phasetrans

A final bit of playing on this before moving on to something else. A bit of collector bias current along with some photocurrent:



  • SUPPORTER

Rob Strand

QuoteA final bit of playing on this before moving on to something else. A bit of collector bias current along with some photocurrent
That configuration might help a bit to stabilize the clip level.   Perhaps a resistor to ground on the base would help more.

A twisted way to view this circuit is as a CE amplifier which is in the output low clipped state.  The opamp modulates the PSU.  The weird thing is the phasing is "wrong" in that the output low stage of the CE amp is when the signal is positive.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

phasetrans

Quote from: Rob Strand on December 15, 2018, 03:14:12 PM
QuoteA final bit of playing on this before moving on to something else. A bit of collector bias current along with some photocurrent
That configuration might help a bit to stabilize the clip level.   Perhaps a resistor to ground on the base would help more.

I plan on breadboarding the base resistor, the collector bias, and the combination as "real" CE biasing and decide what is the most useful.

I also think I will try a JFET as a current source in front of the LED, to moderate the photocurrent, rather a current limiting resistor.

Probably near new years time frame wise. Kids and work and all that.
  • SUPPORTER

Eb7+9

Quote from: phasetrans on December 09, 2018, 06:44:41 PM
2. It can be a (nasty sounding) doubler.

assuming 4N33 (TINA) model is close enough, sims show DC transfer has un-balanced FW rectifier function profile
at least in the early part of the dynamic range



with somewhat drastic wave-bending action on the transients - showing frequency doubling action quite clearly





being low impedance overall means low noise if opto part is well behaved ...
30khz digital bandwidth, no real bw issues either

I especially like the fact that everything is DC/opto coupled in the essential section
I wonder how the opto rise/fall times affect the response - I bet there's a bunch of animation going when you play it

thx for sharing // and well done ...
gets my vote for innovative single-ended wave-shaping circuit of the year