DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: midwayfair on January 29, 2013, 06:29:27 PM

Title: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: midwayfair on January 29, 2013, 06:29:27 PM
EDIT: renamed the topic. Problem solved, now let's make it better!

I'm trying to limit a signal to a PT2399 from ever spiking above ~2.3V. I don't have a zener on hand with a value that low to experiment, but will that work? Or will it cause the audio signal to distort anyway (though maybe it'll be nicer than what the PT2399 does)?

And is there a way to use multiple zeners of a particular value (I have 4.7v for instance) to fake it so I can find out?
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: Seljer on January 29, 2013, 06:40:10 PM
Three or four regular diodes will be in that range. Or maybe and LED. But it's still going to be distorting.

A failsafe way would probably to just attenuate the signal in front (two resistors) and then apply gain afterwards. If you want to get all fancy about the noise levels and such maybe look into using a compander chip (look at the PT80 delay on generalguitargadgets)
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: R.G. on January 29, 2013, 06:41:12 PM
Clippers - that is, all diodes, zeners, LEDs, etc. - cause distortion.

Nondistorting limiting is done by compression. What you're looking for is the NE/SE571 compander chip, to compress or limit the incoming signal and expand it after it comes out.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 29, 2013, 06:45:35 PM
Quote from: Seljer on January 29, 2013, 06:40:10 PM
Three or four regular diodes will be in that range. Or maybe and LED. But it's still going to be distorting.

A failsafe way would probably to just attenuate the signal in front (two resistors) and then apply gain afterwards. If you want to get all fancy about the noise levels and such maybe look into using a compander chip (look at the PT80 delay on generalguitargadgets)

Plenty of gain afterward. And the signal is pretty severely attenuated before it gets into the PT2399 -- it's coming off the buffered out of a transistor and it only distorts when I feed it about 15db, which is decent but not perfect.

Physics is not on my side here, I know ... But a diode distorting only under extreme conditions would probably sound better than the PT2399's distortion. I'm under the impression that the Zener would conduct only if it hits 2.xV, not all the time. I'll try the three diodes (or just two LEDs, probably ...) at least.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: garcho on January 29, 2013, 06:56:31 PM
Thomas Henry has one of his books on the compander if you decide to look into that route.

You don't want to drop everything down, just limit the peaks, right? Otherwise a drop-down resistor would work easily enough, wouldn't it?
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 29, 2013, 07:02:02 PM
Actually, two back to back LEDs on pin 15 [woops] 7 seem to be working ... they aren't changing the readings I get with "normal" sized signals, but they light up when the signal gets huge (over 20db at least). No audible distortion. Pretty crude limiter, just like in the Lovesqueeze ...

I'll probably go this route. Can't fit a compander. :P
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: Kesh on January 29, 2013, 07:24:10 PM
Quote from: midwayfair on January 29, 2013, 07:02:02 PM
Actually, two back to back LEDs on pin 15 [woops] 7 seem to be working ... they aren't changing the readings I get with "normal" sized signals, but they light up when the signal gets huge (over 20db at least). No audible distortion. Pretty crude limiter, just like in the Lovesqueeze ...

I'll probably go this route. Can't fit a compander. :P
clipping of transients isn't usually heard as a distortion
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 29, 2013, 07:33:22 PM
The only drawback seems to be that the mix needs to be turned up for louder input signals (signals above about 20db won't get above unity anymore), because the PT2399's output will be clamped.

The question remains: Is a single Zener of appropriate voltage better than the back-to-back LEDs? Will the zener actually do what I want (conduct super large signals for a very short period of time), such that it would be worth ordering one? I'm not sure I like the idea of using a very, very rare part.

Edit: I almost can't believe how well this works.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: therecordingart on January 29, 2013, 09:51:06 PM
I have some THAT 2150A VCAs for sale if you are wanting to build a compressor.  ::)
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 29, 2013, 09:52:52 PM
Quote from: therecordingart on January 29, 2013, 09:51:06 PM
I have some THAT 2150A VCAs for sale if you are wanting to build a compressor.  ::)

I have one, thanks. It's one of my favorite toys. ;)
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: EATyourGuitar on January 29, 2013, 10:22:59 PM
what you are doing with the clipping diodes before the delay is exactly how some big manufacturers do it. I was never sure if it was intended to prevent damage or maybe have distortion on some settings as a new feature.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 29, 2013, 10:29:19 PM
Quote from: EATyourGuitar on January 29, 2013, 10:22:59 PM
what you are doing with the clipping diodes before the delay is exactly how some big manufacturers do it. I was never sure if it was intended to prevent damage or maybe have distortion on some settings as a new feature.

But it's not before the delay, exactly. It's on the current control chip of the PT2399 (at least, I think that's what CC stands for in the datasheet). Do you have a schematic where it's used? I'm genuinely curious to see if it's done any other ways.
Title: Re: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: slacker on January 30, 2013, 03:14:24 AM
For what you're doing a zener would do exactly the same as the LEDs. The only advantage would be it would do it at a known voltage where as different LEDs will do it at different voltages, not a problem for a one off build but worth thinking about if you share the design.
Sounds like a neat trick, I'll have to try it.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: greaser_au on January 30, 2013, 05:46:49 AM
Quote from: R.G. on January 29, 2013, 06:41:12 PM
Nondistorting limiting is done by compression. What you're looking for is the NE/SE571 compander chip, to compress or limit the incoming signal and expand it after it comes out.

See Philips application note AN174...  www.sss-mag.com/pdf/AN174.pdf (http://www.sss-mag.com/pdf/AN174.pdf)  I found a couple of errors in the 1V pk-to-pk hard limiter in figure 12:  the comparator inputs are all reversed,  and there is a missing +15V connection at the junction of R15/R16. Works well once you find/fix those!!!  ;D

Title: Re: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 30, 2013, 09:06:54 AM
Quote from: slacker on January 30, 2013, 03:14:24 AM
For what you're doing a zener would do exactly the same as the LEDs. The only advantage would be it would do it at a known voltage where as different LEDs will do it at different voltages, not a problem for a one off build but worth thinking about if you share the design.
Sounds like a neat trick, I'll have to try it.

Awesome. I will definitely add the Zener as an option in the build document with instructions for plugging it into the board.

The only place I can find a Zener of appropriate voltage is Mouser, and no one's going to have a 2v zener just lying around, so the boards and etch layouts will still going to have the LED pads there -- it's easier to put one Zener standing up than to fit two LEDs into a single diode slot.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: samhay on January 30, 2013, 09:22:28 AM
Jon - You would usually use parallel LEDs as clippers (like in the Love Squeeze), whereas you usually use Zener's back-to-back to clamp an AC signal. It will then clip at the Zener breakdown voltage + 0.7V (Si diode forward drop). As a result, LEDs and Zeners will not be interchangeable in any given layout. I don't think you can find 1.6V Zeners anyway, but I may be wrong.
I would stick with LEDs - they have a reasonably soft knee and clip right where you want them.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 30, 2013, 09:42:34 AM
Quote from: samhay on January 30, 2013, 09:22:28 AM
Jon - You would usually use parallel LEDs as clippers (like in the Love Squeeze), whereas you usually use Zener's back-to-back to clamp an AC signal. It will then clip at the Zener breakdown voltage + 0.7V (Si diode forward drop). As a result, LEDs and Zeners will not be interchangeable in any given layout. I don't think you can find 1.6V Zeners anyway, but I may be wrong.
I would stick with LEDs - they have a reasonably soft knee and clip right where you want them.

I think it just needs to be a single, reversed Zener (anode to ground) -- just like what we do with a zener to protect a charge pump from overvoltage with a 9.1 to 12v Zener.

There might be a concern about the zener CONSTANTLY seeing too large a signal, though. It takes about +25db boost to do that in the circuit I'm working with. How long can a zener handle, say, 1v over its rating? I'm not sure what to look for on a datasheet ...

EDIT: more appropriate datesheet for through-hole:
http://www.mouser.com/ds/2/68/1N4614-4627-14375.pdf

though I could certainly buy some and subject them to a stress test.

Edit edit: Hah. 1.8v Zener is the only through-hole, sold as singles, diode at Mouser. So it will be identical to what the LEDs are doing.
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: R.G. on January 30, 2013, 11:32:40 AM
It's also worth noting that LEDs have different forward (clipping) voltages depending on the exact recipe used to make them.

Old red LEDs were 1.2-1.4V, modern blue LEDs are as much as 3.5-4V. Orange, Yellow, and Green are in the middle.

You may have to test and specify an LED color or forward voltage to get clipping where you want it.

But then, you can.
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: midwayfair on January 30, 2013, 12:06:22 PM
Quote from: R.G. on January 30, 2013, 11:32:40 AM
It's also worth noting that LEDs have different forward (clipping) voltages depending on the exact recipe used to make them.

Old red LEDs were 1.2-1.4V, modern blue LEDs are as much as 3.5-4V. Orange, Yellow, and Green are in the middle.

You may have to test and specify an LED color or forward voltage to get clipping where you want it.

But then, you can.

Yellow and Green will work best. My red LEDs all measure 1.7v, never below 1.6, which seems high from what other people say, but they're all modern production. They'd work in a pinch.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: ~arph on January 30, 2013, 03:50:39 PM
Quote from: midwayfair on January 29, 2013, 10:29:19 PM
But it's not before the delay, exactly. It's on the current control chip of the PT2399 (at least, I think that's what CC stands for in the datasheet). Do you have a schematic where it's used? I'm genuinely curious to see if it's done any other ways.

Yes it does stand for current control. It says it in the ds I have. You might be on to something.. I never saw anything else beside the standard caps to ground from pins seven and eight.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: samhay on January 30, 2013, 04:29:08 PM
Quote from: midwayfair on January 30, 2013, 09:42:34 AM
I think it just needs to be a single, reversed Zener (anode to ground) -- just like what we do with a zener to protect a charge pump from overvoltage with a 9.1 to 12v Zener.

Ahh, I see - sorry, I guess you are playing with a DC voltage, not the signal input. In that case a single LED (or Zener) will do nicely; but then you already knew that.

Looking at Merlin's (Valve Wizard) PT2399 data sheet, it looks like pin 7 talks to the (-) input of the pin 11/12 op-amp, which is usually ignored (cap across it). I'm intrigued as to what you're up to now.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on January 30, 2013, 04:35:57 PM
Quote from: samhay on January 30, 2013, 04:29:08 PMAhh, I see - sorry, I guess you are playing with a DC voltage, not the signal input. In that case a single LED (or Zener) will do nicely; but then you already knew that.

For some reason I couldn't get a single LED to do it last night, it had to be back to back before it worked right. At least, I think it did. Only one LED lights up (the one you'd expect), I know that, so that indicates that it ought to work with just one diode. I'll experiment more tonight and report back. :)
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: samhay on January 30, 2013, 05:01:25 PM
Is it an audio signal you are sending to pin 7? If so, it might be biased up to Vref (2.5 V) and then clipping both the op-amp rails at Vref +/- 2.3V (if you are listening at pin 12).
Back-to-back LEDs is a bit odd as, if I have got this right, you should have a voltage drop of about 7 V across them - it would have to be conducting through the reverse voltage of the reversed LED (not sure, but I have seen about 5 V for this; don't think it will cause it to light up) + the forward voltage of the forward LED (another ~2 V). The PT2399 is running on 5V, so unless there is some voltage division happening, this should still be clipping. If the reverse voltage of the LED is much lower, then it will work. Either way, having back-to-back LEDs is probably not a great idea.
Title: Re: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: slacker on January 30, 2013, 05:26:39 PM
I don't think he means back to back in the proper sense, I think he means anti parallel, like we use for clipping.
I'm not sure what the LEDs are doing, from memory pin 7 normally sits at a bit below 1 volt, don't think I've ever measured it with signal present though. I'll have to have a play and see if I can figure it out.
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: midwayfair on January 30, 2013, 06:47:16 PM
Okay more experimentation. One LED DOES work. The other one just seems to do nothing. I guess I just wasn't listening at volume last night. It's oriented cathode to ground.
(and yes, I meant "anti-parallel" like in clipping)
slacker: Pin 7 idles at .63v, and increases with signal.
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: samhay on January 31, 2013, 02:21:41 AM
Quote from: midwayfair on January 30, 2013, 06:47:16 PM
Okay more experimentation. One LED DOES work. The other one just seems to do nothing. I guess I just wasn't listening at volume last night. It's oriented cathode to ground.
(and yes, I meant "anti-parallel" like in clipping)
slacker: Pin 7 idles at .63v, and increases with signal.

OK - that makes sense. You will only need one diode to ground as pin 7 (or any others) will not be able to pull below ground.
The PT2399 sets its own internal Vref to ~ +2.5 V at pin 2, so you could do anti-parallel diodes to pin 2 if you have some sort of AC signal output. If it idles at 0.63 v then that is something else entirely. Sounds like fun.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: EATyourGuitar on February 01, 2013, 02:33:26 AM
Quote from: midwayfair on January 29, 2013, 10:29:19 PM
Quote from: EATyourGuitar on January 29, 2013, 10:22:59 PM
what you are doing with the clipping diodes before the delay is exactly how some big manufacturers do it. I was never sure if it was intended to prevent damage or maybe have distortion on some settings as a new feature.

But it's not before the delay, exactly. It's on the current control chip of the PT2399 (at least, I think that's what CC stands for in the datasheet). Do you have a schematic where it's used? I'm genuinely curious to see if it's done any other ways.

here is one example (http://www.simonthenerd.com/files/echo/EchoBase.bmp). after the feedback knob the signal gets clipped by a pair of 1N4148.

if you ever need clipping to happen at a specific voltage, you can use TVS diodes. for example, http://www.mouser.com/Semiconductors/Discrete-Semiconductors/TVS-Diodes-Transient-Voltage-Suppressors/ (http://www.mouser.com/Semiconductors/Discrete-Semiconductors/TVS-Diodes-Transient-Voltage-Suppressors/)

you can even get a bidirectional transient voltage suppressor in a two lead package  :icon_cool:
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: samhay on February 01, 2013, 07:34:33 AM
Quote from: EATyourGuitar on February 01, 2013, 02:33:26 AM

if you ever need clipping to happen at a specific voltage, you can use TVS diodes. for example, http://www.mouser.com/Semiconductors/Discrete-Semiconductors/TVS-Diodes-Transient-Voltage-Suppressors/ (http://www.mouser.com/Semiconductors/Discrete-Semiconductors/TVS-Diodes-Transient-Voltage-Suppressors/)

you can even get a bidirectional transient voltage suppressor in a two lead package  :icon_cool:

Haven't seen those before. Are they back-to-back avalance diodes?
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on February 01, 2013, 08:51:24 AM
Thanks for the tip, EATyourGuitar! There's a 2.2V one, which would probably be perfect. It's SMD, but the dimensions say it would fit on an LED pad with some clever soldering. I think I'll pick one up with my next mouser order to mess with it and see if it works like the LED. I would want the unidirectional one, right? Or does that not matter because it's only ever going to conduct one way regardless?
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: EATyourGuitar on February 01, 2013, 11:43:40 AM
Quote from: samhay on February 01, 2013, 07:34:33 AM
Quote from: EATyourGuitar on February 01, 2013, 02:33:26 AM

if you ever need clipping to happen at a specific voltage, you can use TVS diodes. for example, http://www.mouser.com/Semiconductors/Discrete-Semiconductors/TVS-Diodes-Transient-Voltage-Suppressors/ (http://www.mouser.com/Semiconductors/Discrete-Semiconductors/TVS-Diodes-Transient-Voltage-Suppressors/)

you can even get a bidirectional transient voltage suppressor in a two lead package  :icon_cool:

Haven't seen those before. Are they back-to-back avalance diodes?

I would assume so. I just noticed it yesterday and I was all "OH Hello bidirectional transient voltage suppressor diodes in a two lead package"
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: samhay on February 01, 2013, 11:57:13 AM
Quote from: EATyourGuitar on February 01, 2013, 11:43:40 AM
I would assume so. I just noticed it yesterday and I was all "OH Hello bidirectional transient voltage suppressor diodes in a two lead package"

Yeah - that was pretty much my reaction. Not sure that they will stop me using/abusing Zeners as transient voltage suppressors, but good to know that there are alternativesand/or options if space is really tight.

Jon - good luck with the SMD.
Title: Re: Need to limit an audio signal, in-circuit, to ~2.3V ... without distortion
Post by: midwayfair on February 01, 2013, 12:02:02 PM
Quote from: samhay on February 01, 2013, 11:57:13 AM
Jon - good luck with the SMD.

hehe.

This one doesn't look horrible for one part. There are flat leads bent under the package that I could unbend, and the pacakage is 4mm, about the size of an 1/8W resistor. I can solder leads to the flat leads to plug into a socket. It's certainly worth picking up along with the 1.8v zener to see if there's a difference, though honestly I might need a scope and decibel meter to figure out if there's a difference between the three types of diodes.
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: kingswayguitar on March 08, 2013, 09:55:35 AM
hope this thread isn't too cold
i have 0.77V on pin 7
when you say back to back diodes, what does that mean exactly?
http://www.flickr.com/photos/77164433@N04/8538616199/in/photostream (http://www.flickr.com/photos/77164433@N04/8538616199/in/photostream)
i managed to attenuate my input a bit with a jfet source follower, then boost the whole thing afterward...less noise and distortion but always looking to make it better
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: midwayfair on March 08, 2013, 10:23:47 AM
Quote from: kingswayguitar on March 08, 2013, 09:55:35 AM
hope this thread isn't too cold
i have 0.77V on pin 7
when you say back to back diodes, what does that mean exactly?
http://www.flickr.com/photos/77164433@N04/8538616199/in/photostream (http://www.flickr.com/photos/77164433@N04/8538616199/in/photostream)
i managed to attenuate my input a bit with a jfet source follower, then boost the whole thing afterward...less noise and distortion but always looking to make it better


"A" in your picture is what I meant, and I think avalanche diodes are "B" -- but in any case it's not necessary. One LED is sufficient, because, as Samhay noted, the pin will never swing negative. You just connect the anode to pin 7 and the cathode to ground.

In your case, .77v isn't high enough to distort, but if you measure that pin while playing a guitar chord, you'll see it jump up. Also, note that clamping pin 7 sets an upper limit for the output of the PT2399. Keep that in mind in whatever design you're using; you may need to change the gain of the input and mixer stages.
Title: Re: Using LEDs to prevent a PT2399 from distorting [renamed]
Post by: kingswayguitar on March 08, 2013, 02:29:36 PM
thank you very kindly
i'll admit this design doesn't distort much anyway