News:

SMF for DIYStompboxes.com!

Main Menu

Savvy or Silly?

Started by karbomusic, September 10, 2014, 11:48:03 AM

Previous topic - Next topic

karbomusic

I needed a clean boost at the end of my pedal chain and its main function is to boost the level as needed but wanted to be aware that it isn't clipping etc. based on what comes before it. IOW, I don't want this box clipping on it's own.

I threw together a quick opamp + noninverting + feedback loop on the BB last night. After some tweaking and adding two LEDs, the LEDs now light up at almost the exact point the opamp begins to clip (if the gain or incoming signal is to hot). I'll just expose the LEDs visually and use them as my clipping indicator in addition to their softening the clipping if that were to occur. The goal is not to have it clip ever (clean boost) but if it did by accident it'll sound a little smoother and I'll know when it does allowing me to adjust the trimmer and gain range to fit the conditions.

All this seems to check out perfectly on the oscilloscope, spectrum analyzer etc. and I'm basically exploiting a TS type clipper and using that as visual feedback instead of an overdrive circuit. Dumb? Caveat I'm missing? Seems too easy.


Digital Larry

Seems like a reasonable approach.  There is some design decision/tradeoff you could explore, which is the series current limiting resistor before the LEDs and before the output.  The higher this resistor, the more gradual the clipping will be (less harsh), the higher your box's output impedance will be, and the less bright your LEDs will be when they do turn on.   These different goals don't all point towards "make it as low as possible" or "make it as high as possible", suggesting there is a sweet spot somewhere in the middle.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

karbomusic

#3
Quote from: Digital Larry on September 10, 2014, 12:45:57 PM
Seems like a reasonable approach.  There is some design decision/tradeoff you could explore, which is the series current limiting resistor before the LEDs and before the output.  The higher this resistor, the more gradual the clipping will be (less harsh), the higher your box's output impedance will be, and the less bright your LEDs will be when they do turn on.   These different goals don't all point towards "make it as low as possible" or "make it as high as possible", suggesting there is a sweet spot somewhere in the middle.

Thanks for the tips Larry (and bool), The main goal is really just awareness if it is clipping so I can reduce it's gain as needed and the soft clipping from the diodes is just a convenient side effect if it did clip.

Since I could theoretically have >1V ish hitting the input of the booster, I know it may sound a little odd... but I have an currently unknown anomaly in my pedal board causing me to lose a few dB intermittently on occasion. I depend on pushing the clean channel of my amp so that I have a little breakup at the amp mixed in with say one of my other overdrives.

It's the classic "distortion circuit sounds better when the amp is already breaking up some" which I've always exploited and love. The point here is to be able to set that clean boost to even up things if/as needed but I don't want the booster clipping and if it does, I'd like to know that it is. Even after I fix the anomaly, I can use this for other needs and have a built in clip indicator of sorts. It doesn't have to be NASA exact but I was able to measure via scope and the LEDs would light at the same point the harmonics being created by clipping started to appear. It was almost too convenient and accurate for what I wanted and sort of stumbled across it.

I'm going to test it over the next few days and see how it works but so far so good.

pappasmurfsharem

#4
Quote from: karbomusic on September 10, 2014, 01:00:48 PM
.......
I was able to measure via scope and the LEDs would light at the same point the harmonics being created by clipping started to appear. It was almost too convenient and accurate for what I wanted and sort of stumbled across it.
...........

Where did you place the LEDs?

Are you certain the that LEDs themselves aren't providing the "clipping" depending on color they might not be far from the OP-Amp clipping threshold.

So it would stand to reason they correlate with hte clipping because they are in fact causing the clipping.

unless that was kind of the point, finding the right ratio to get them to clip around just below where the opamp would clip anyway. then disregard.
"I want to build a delay, but I don't have the time."

mth5044

Quote from: pappasmurfsharem on September 10, 2014, 03:02:44 PM
Quote from: karbomusic on September 10, 2014, 01:00:48 PM
.......
I was able to measure via scope and the LEDs would light at the same point the harmonics being created by clipping started to appear. It was almost too convenient and accurate for what I wanted and sort of stumbled across it.
...........

Where did you place the LEDs?

Are you certain the that LEDs themselves aren't providing the "clipping" depending on color they might not be far from the OP-Amp clipping threshold.

So it would stand to reason they correlate with hte clipping because they are in fact causing the clipping.

unless that was kind of the point, finding the right ratio to get them to clip around just below where the opamp would clip anyway. then disregard.


That's what I was thinking, especially if they are lighting up.

karbomusic

#6
Quote from: pappasmurfsharem on September 10, 2014, 03:02:44 PM


Where did you place the LEDs?

In the feedback loop, think tube scremer diode position. Forgive me if feedback loop is the wrong term though. :)

Quote
Are you certain the that LEDs themselves aren't providing the "clipping" depending on color they might not be far from the OP-Amp clipping threshold.

The way you worded it is how I got there... because the opamp begins clipping at just over 3 volts IIRC. I had been testing this for a couple hours before even pulling out the LEDs. Being a newb, I wasn't doing math, just tweaking gain and parts with everything hooked up to the scopes.

Due to time spent, I was already very aware of the clipping point of the opamp minus diodes. When I added the diodes it did not clip earlier, if it did, we are talking millivolts and I couldn't see it which would make it irrelevant anyway for my needs. In other words, I still have my ~3 volts of clean gain I wanted to begin with.

^However the diodes now become the clipper of sorts but its semantics at this point as far as I'm concerned if the diode begins clipping at the same amplitude as the opamp would have anyway?

When I say starts clipping, I mean the very beginnings that only show up in an FFT display. IOW I can tell by the FFT showing the harmonics that are created by starting of clipping (which can be hard to see on the sine wave that is barely starting to clip) which I'm quite familiar with from well, always having them hooked up and being generally curious :icon_lol:.

When I insert the diodes across the feedback loop (think tube screamer), they light at about exactly the same amplitude. If I continue to increase gain post LEDs, the fortunate byproduct is smoothing of the soon to be square wave but that's just a happy side-effect since I'm exploiting the behavior to know when it is clipping (or very near it).


Quote
So it would stand to reason they correlate with hte clipping because they are in fact causing the clipping.

I'm assuming they just happen to correlate based on the diode's forward voltage and replace what would have been the opamp clipping. Like I said, I had been scoping minus LEDs for a couple of hours, and its really easy to see the difference between diodes clipping and the opamp clipping on a scope.  :icon_wink: I was actually placing them there to soften the clipping if it inadvertently did so and the idea that "I wonder how close the lighting up will coincide to actual clipping of the opamp". Based on last night's testing, very, very close based on this particular choice of parts/wiring.

Please feel free to correct me on any idiocy here, I just know where the opamp clips, and I know adding LEDs caused them to light very closely to that same amplitude of which I never plan on exceeding and if I do, the LEDs might be a hint.

amptramp

Beware of one thing:  LED's as well as being light emitters are also photodiodes (although they are too leaky to be designed into a circuit for that kind of use).  Expose the LED's to fluorescent or sodium vapour lighting (no phosphor means no phosphor delays) while it is being driven to clipping levels.  I would expect to get some hum injection there.  If you get it, determine whether it will be usable for your purposes, keeping in mind that a stompbox used in someone's bedroom and a stompbox used at a gig should be judged by separate criteria.

If it is a problem, there are several things you can do.  Keep it away from ambient light.  Put a hood over the diodes so you can see it but it can't see stage lighting.  Put the diodes in the box and never let them see the light of day.  For the latter option, you can add LED's from the output of the amp to the Vcc/2 reference point, but this will drive current into this point, so make it a separate reference point at Vcc/2 that does not affect any other part of the circuit.  This means you will have separate clipping and indicator LED's.

pappasmurfsharem

Quote from: karbomusic on September 10, 2014, 03:17:22 PM
Quote from: pappasmurfsharem on September 10, 2014, 03:02:44 PM


Where did you place the LEDs?

In the feedback loop, think tube scremer diode position. Forgive me if feedback loop is the wrong term though. :)

Quote
Are you certain the that LEDs themselves aren't providing the "clipping" depending on color they might not be far from the OP-Amp clipping threshold.

The way you worded it is how I got there... because the opamp begins clipping at just over 3 volts IIRC. I had been testing this for a couple hours before even pulling out the LEDs. Being a newb, I wasn't doing math, just tweaking gain and parts with everything hooked up to the scopes.

Due to time spent, I was already very aware of the clipping point of the opamp minus diodes. When I added the diodes it did not clip earlier, if it did, we are talking millivolts and I couldn't see it which would make it irrelevant anyway for my needs. In other words, I still have my ~3 volts of clean gain I wanted to begin with.

^However the diodes now become the clipper of sorts but its semantics at this point as far as I'm concerned if the diode begins clipping at the same amplitude as the opamp would have anyway?

When I say starts clipping, I mean the very beginnings that only show up in an FFT display. IOW I can tell by the FFT showing the harmonics that are created by starting of clipping (which can be hard to see on the sine wave that is barely starting to clip) which I'm quite familiar with from well, always having them hooked up and being generally curious :icon_lol:.

When I insert the diodes across the feedback loop (think tube screamer), they light at about exactly the same amplitude. If I continue to increase gain post LEDs, the fortunate byproduct is smoothing of the soon to be square wave but that's just a happy side-effect since I'm exploiting the behavior to know when it is clipping (or very near it).


Quote
So it would stand to reason they correlate with hte clipping because they are in fact causing the clipping.

I'm assuming they just happen to correlate based on the diode's forward voltage and replace what would have been the opamp clipping. Like I said, I had been scoping minus LEDs for a couple of hours, and its really easy to see the difference between diodes clipping and the opamp clipping on a scope.  :icon_wink: I was actually placing them there to soften the clipping if it inadvertently did so and the idea that "I wonder how close the lighting up will coincide to actual clipping of the opamp". Based on last night's testing, very, very close based on this particular choice of parts/wiring.

Please feel free to correct me on any idiocy here, I just know where the opamp clips, and I know adding LEDs caused them to light very closely to that same amplitude of which I never plan on exceeding and if I do, the LEDs might be a hint.


You can guarantee if the LEDs are lighting up by definition it's clipping prior to the opamp (slightly before the opamp would clip)

But like you said if it's close enough you will have an indication of when your hitting roughly the max of the opamp.

Like you said though if you don't intend to let it get to that level your golden.

I will say though YMMV with different pickups and it make clip sooner than you would want.
"I want to build a delay, but I don't have the time."

Digital Larry

My response assumed back to back diodes shunted to ground through a current limiting resistor coming from the op-amp's output.

I'm a little confused by remarks about the "TS-style in the feedback loop" as I have seen different topologies depending on whether the op-amp is configured as inverting or non inverting.  The effect of the diodes is quite different depending on which one it is.  Granted, neither of these matched the assumption I made!
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

karbomusic

Quote from: amptramp on September 10, 2014, 08:55:37 PM
Beware of one thing:  LED's as well as being light emitters are also photodiodes (although they are too leaky to be designed into a circuit for that kind of use).  Expose the LED's to fluorescent or sodium vapour lighting (no phosphor means no phosphor delays) while it is being driven to clipping levels.  I would expect to get some hum injection there.  If you get it, determine whether it will be usable for your purposes, keeping in mind that a stompbox used in someone's bedroom and a stompbox used at a gig should be judged by separate criteria.


I had no idea so that's great to know, thank you! I have some Fresnel style led lenses that may help solve that.

karbomusic

#11
Quote from: pappasmurfsharem on September 10, 2014, 03:02:44 PM

You can guarantee if the LEDs are lighting up by definition it's clipping prior to the opamp (slightly before the opamp would clip)

But like you said if it's close enough you will have an indication of when your hitting roughly the max of the opamp.

Like you said though if you don't intend to let it get to that level your golden.

I will say though YMMV with different pickups and it make clip sooner than you would want.

Yes, I agree, it just becomes a bit of chicken vs egg for my simple brain at some point which isn't the circuit's fault.  :icon_mrgreen:

The above makes perfect sense though. I'm only at the "hey, check that out" stage so it could all go south any moment. I had already prepared myself to simply manually measure everything and use my ears, this LED thing is just a maybe right now.

One thing to clarify, I have an external gain control, so it doesn't matter to me what the incoming signal is within reason, I'm just going to adjust the gain accordingly to keep it from clipping hence the reason the lighting up would be cool assuming it ends up being anywhere close to accurate. At least that's how it was working just before I stopped last night. Many thanks for the suggestions.

pappasmurfsharem

Quote from: karbomusic on September 10, 2014, 10:54:39 PM
Quote from: pappasmurfsharem on September 10, 2014, 03:02:44 PM

You can guarantee if the LEDs are lighting up by definition it's clipping prior to the opamp (slightly before the opamp would clip)

But like you said if it's close enough you will have an indication of when your hitting roughly the max of the opamp.

Like you said though if you don't intend to let it get to that level your golden.

I will say though YMMV with different pickups and it make clip sooner than you would want.

Yes, I agree, it just becomes a bit of chicken vs egg for my simple brain at some point which isn't the circuit's fault.  :icon_mrgreen:

The above makes perfect sense though. I'm only at the "hey, check that out" stage so it could all go south any moment. I had already prepared myself to simply manually measure everything and use my ears, this LED thing is just a maybe right now.

One thing to clarify, I have an external gain control, so it doesn't matter to me what the incoming signal is within reason, I'm just going to adjust the gain accordingly to keep it from clipping hence the reason the lighting up would be cool assuming it ends up being anywhere close to accurate. At least that's how it was working just before I stopped last night. Many thanks for the suggestions.

Oh believe me I'm still in that same stage, and not in the way the guys with 5-10K posts say they are "still learning", I'm way behind that even. Granted everyone is still learning something. Nobody knows everything. =)

One thing potentially worries me though. What do you mean by external gain control?
"I want to build a delay, but I don't have the time."

karbomusic

Quote from: Digital Larry on September 10, 2014, 10:38:39 PM
My response assumed back to back diodes shunted to ground through a current limiting resistor coming from the op-amp's output.

I'm a little confused by remarks about the "TS-style in the feedback loop" as I have seen different topologies depending on whether the op-amp is configured as inverting or non inverting.  The effect of the diodes is quite different depending on which one it is.  Granted, neither of these matched the assumption I made!

Consider me not that well versed.  ;D I'm using non inverting like RG's technology of the tube screamer picture as a quick example. Apologies if I have the terminology all jacked up.

karbomusic

#14
Quote
Oh believe me I'm still in that same stage, and not in the way the guys with 5-10K posts say they are "still learning", I'm way behind that even. Granted everyone is still learning something. Nobody knows everything. =)

One thing potentially worries me though. What do you mean by external gain control?



The same pot you would see as the drive control in a TS. The one between pins 1/2 on a dual opamp minus the extra stuff. I'd show you the schematic but this is the first time I've sat down and "assembled" a circuit from memory so I don't have one yet. However if you look at side "A" in a TS clipping section and remove the frequency related stuff, it's basically that at its heart... A resistor (pot) between 1/2 and a cap to ground off the pot. That pot is what I'm calling a gain control.

pappasmurfsharem

Quote from: karbomusic on September 10, 2014, 11:27:37 PM
Quote
Oh believe me I'm still in that same stage, and not in the way the guys with 5-10K posts say they are "still learning", I'm way behind that even. Granted everyone is still learning something. Nobody knows everything. =)

One thing potentially worries me though. What do you mean by external gain control?



The same pot you would see as the drive control in a TS. The one between pins 1/2 on a dual opamp minus the extra stuff. I'd show you the schematic but this is the first time I've sat down and "assembled" a circuit from memory so I don't have one yet. However if you look at side "A" in a TS clipping section and remove the frequency related stuff, it's basically that at its heart... A resistor (pot) between 1/2 and a cap to ground off the pot. That pot is what I'm calling a gain control.

Ahh you mean just External to the enclosure I was thinking external to the circuit, like you had a passive pot prior to the boost or something..... lol its been a long day.
"I want to build a delay, but I don't have the time."