Newbie falls down the 4049 rabbit hole...

Started by ThermionicScott, October 27, 2020, 11:59:47 PM

Previous topic - Next topic

Ben N

Tale as old as time: filter lows going in, and highs coming out. Maybe then boost the lows without clipping to keep it from turning into a tubescreamer.
  • SUPPORTER

ThermionicScott

Thanks!  For some reason, I had it in mind that filtering out highs early and often would be necessary, too.
"...the IMD products will multiply like bacteria..." -- teemuk

anotherjim

I was going to suggest fitting limiting diodes on the feedback, which starts to look like a Tubescreamer except have a resistor in series with the diodes so it only drops the gain when they conduct - this is still a TS in essence, but change the diodes to high Vf LED's or Zeners so it only happens with swing closer to the rails. You still get the soft compression of the inverter (which comes in gradually as it swings away from the zero-crossing) and which will be felt before any limiting acts.

I see the effect of clipping on any feedback cap differently. If the output limits at a rail, the input sees the cap as connected to 0v (don't matter which supply rail, they are both AC signal ground) so the cap will cut treble content in the input signal. I think this explains the absence of HF content during clipping (or close to clipping) which then comes back in as it swings away from the rail. It's the bass content that is relatively strong in music signal that causes hard clipping, so reducing bass on the input would be an easy "fix". But, you could also fit a resistor in series with a feedback cap so the the treble cut is reduced when it hard clips.

ThermionicScott

That is some thought-provoking stuff, anotherjim!  My original plan for this project was to work up to a Blackstone-style circuit if I didn't love any of the obvious predecessors, but you've given me some good ideas to try.

Update on my build:  I reverted the feedback caps to 10pF (but kept the coupling caps at 0.015uF) and added a Stupidly Wonderful Tone Control to the end a la Mark's Forty-Niner.  Much better than before!  Tighter and crunchier sound from restricting a little bass but allowing all of the treble into the clipping.

I could still detect a little bit of "blattiness" in the low notes, but it's almost to an acceptable level depending on the tone and gain settings.  I was all set to record a new sound clip when my amp blew a fuse.  Then another one.  Then another one after removing the tubes and lamp.  I completely removed the power transformer from the chassis and hardwired it to a power cord to test the secondary voltages again.  That's when the curl of magic smoke puffed out.  Bummer!  :icon_lol:  It was a Weber W25130 PT, great specs (copied from the Allen TP22D), but with something of a spotty record for reliability.  I guess its number just came up.  I put in an order for a ClassicTone replacement, along with a new lamp holder since the old one was flaky and I wonder if it contributed to the PT failure somehow...

After that, I decided to level-set by playing around with my Boss OD-3 into a different amp.  That overdrive does most of what I want, but it can sound a little fizzy and unfocused at times.  I was able to elicit some "blat" with the neck pickup, tone rolled partway off, and mid- to higher-gain settings.  The OD-3 is known for not cutting as much low-end as other overdrive pedals, so the pieces are really starting to fit together for me.
"...the IMD products will multiply like bacteria..." -- teemuk

Ben N

#44
Ouch! Sorry about that PT. Did you use a current limiter for your test?
  • SUPPORTER

ThermionicScott

Quote from: Ben N on November 09, 2020, 05:44:24 AM
Ouch! Sorry about that PT. Did you use a current limiter for your test?

I didn't, but by that point my trust level in the PT was so low that it was already dead to me.  It was actually kind of a relief to see the puff of smoke, because it told me I could move on!  :)

Here's the new PT, just before I wired it up.  I'm pleased to report that it is working great:


"...the IMD products will multiply like bacteria..." -- teemuk

ThermionicScott

Hey @anotherjim, you mentioned this in another thread:

Quote from: anotherjim on September 11, 2020, 08:36:22 AMThe 4049U, uniquely, doesn't have closely matched complementary P & N channel MOSFETs. This can create even-order harmonics. Using x2 inverters in series can add some odd-order harmonics.

I'm curious:  is there a way to tell that the two MOSFETs aren't well-matched from the datasheets, or is it just something that is known and they don't figure it's worth mentioning for a "digital" part?  Does it affect the biasing (assuming a feedback resistor is used), or just mean that the amplification is unequal on each side of the waveform?  I'm still learning how to read these things.  :)

Some MOSFET-based distortions claim to add even-order harmonics as well as odd, despite appearing to have all center-biased stages, so that must be how it happens.
"...the IMD products will multiply like bacteria..." -- teemuk

PRR

N-type and P-type devices do not have the same conductance.

Conductance can be more equal by offsetting device sizes, but this is rarely considered important; and it makes the capacitances different.

I recall the 1977 CMOS was not "centered".
  • SUPPORTER

aron

I would have never guessed that sound is a 4049. It sounds like a typical transistor fuzz.

ThermionicScott

#49
Quote from: aron on November 17, 2020, 09:55:04 PM
I would have never guessed that sound is a 4049. It sounds like a typical transistor fuzz.

It might be the worst showing of a 4049 in existence.  :icon_lol:

Okay, now that the amp is up and running again, I recorded a couple more clips.  Sorry about the creaky strap, among other things:

Low-gain chords: https://imgur.com/OAUDVtU
A little more gain: https://imgur.com/qb3FiaS
Gain all the way up:  https://imgur.com/Z0KgPxt

With that last one, I realized that all of the bass cut in my latest iteration has created an upper-mid peak that's reminiscent of a Metal Zone.  It's crunchier and tighter, but at what cost?
"...the IMD products will multiply like bacteria..." -- teemuk

aron

Don't take it the wrong way, it has a certain vibe. It's kind of cool! Mine has so much gain - it's like Steve Vai/Holdsworth territory!

aron

Did you try that 2.7V zener "Gorn" mod on the Tubescreamer? I think it sounds good. I like a combination of feedback loop diode strings with a FET at the end like the Shaka HV but with clipping diodes with the op amp. I've been using this for years. I can go from clean to heavy overdrive with just the volume pot. It drives my Bassman really good too!

ThermionicScott

Quote from: aron on November 18, 2020, 01:30:01 AM
Did you try that 2.7V zener "Gorn" mod on the Tubescreamer? I think it sounds good. I like a combination of feedback loop diode strings with a FET at the end like the Shaka HV but with clipping diodes with the op amp. I've been using this for years. I can go from clean to heavy overdrive with just the volume pot. It drives my Bassman really good too!

I haven't tried that yet!  Still working up my courage to mod pedals that I spent good money on... :icon_lol:  Thus far, it's just been capacitor swapping for EQ, but I'm curious to try diode mods next.  I love all the pedal analysis threads that have taken place, like this one:  https://www.diystompboxes.com/smfforum/index.php?topic=75775

Y'know, I've never thought of myself as a fuzz guy, but perhaps I should try building a few of those as well.  Always been a snob for cranked tube amps or things that try to sound like them. 
"...the IMD products will multiply like bacteria..." -- teemuk

iainpunk

QuoteY'know, I've never thought of myself as a fuzz guy, but perhaps I should try building a few of those as well.  Always been a snob for cranked tube amps or things that try to sound like them. 
yes, do, there are some fuzz units that get closer to the cranked power amp sound than you'd expect, and of course the absolute opposite... a fun lil project to get you in to building and tinkering with fuzz is the 'Bazz fuss' its harsh, square-wave and thick, with less than 10 components. substituting a bunch of diodes and transistors in and out of the circuit can make it sound really different from the ''original''
adding a gain control (1k pot from emitter to ground) makes it go in to 'thicc overdrive' territory and using a tiny input cap makes it a tight distortion/treble booster.

cheers, Iain
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

ThermionicScott

#54
I'm back!  To recap, there's always been something "blatty" I didn't like about the TSF/Red Llama on my breadboard, which admittedly could be due to my layout or how my guitar reacts to it.  By the time I cut enough bass via the coupling caps to be okay with the clipping, the circuit took on a honky midrange sound I didn't like.  (The SWTC seemed to contribute to this, but again, I could have messed up something in implementing it.)

Time to try something different.  Things like adding an op amp front end are still on the list, but I wanted to see what else I could do with just the two inverter stages first.  And over the last few months, I've gotten interested in vintage fuzzes -- not as much for the sound, but how they clean up from the guitar's volume knob.  So before I go down the rabbit hole of building Fuzz Faces, I decided to borrow some circuit ideas from my Blackstone Mosfet Overdrive, with which I am really starting to bond.

If there are any intellectual property concerns about the following, I can edit this post to remove them.  Jon is a cool guy and he deserves lots of sales for all the neat ideas and hard work he's put into his pedal.

Anyways, the Blackstone is unique among 4049-based overdrives in that it doesn't use capacitors to couple every stage.  They're used before and after the inverter chain for AC coupling, but they're also put to work as tone-shapers wherever possible.  The inverters themselves are coupled via series resistors that also help set the gain of each stage.  The Blackstone front end uses the input capacitor and a pot for Rin to cleverly trim low end as the gain is turned up.  (Or perhaps it just raises the corner frequency above which it increases gain, I'm not sure.)  So I converted to resistor coupling, applied much of the Blackstone input circuitry to the first inverter stage, removed the feedback-loop capacitor on the first stage, and took off the SWTC in favor of a presence-limiting capacitor on the second stage.

After these changes, I'm very pleased!  The distortion is still a bit rough -- which is fine -- but the blat is gone.  (Is it possible that switching from 1000Ω to 120Ω in the power supply made a difference here?)  It doesn't have enough gain to be a true fuzz, more of an overdrive with fuzzy character.  I'm still tweaking the gain and auditioning different input and presence-limiting capacitors.  And the clean-up when I roll down the guitar volume is pretty cool.  I might box this one up!

I took a picture of its current state, along with an updated schematic:



I'll try to get some sound clips soon.  Back to work.  :icon_lol:
"...the IMD products will multiply like bacteria..." -- teemuk

anotherjim

If you use inverters at maximum gain, the gain/bandwidth drops a lot. If you then cut the bass, a middle heavy sound could well be the result.

The available open-loop gain of an inverter increases with lower supply voltage so you can expect a different sound from a different dropper resistor.

I still suspect that if you want the soft/compression clipping, you only need one inverter with minimal gain itself and do the pre-amping with something more dependable. An idea I keep meaning to try is a TS with an added inverter. I would try a CD4007. Use one of it's P channel MOSFETS for the input buffer and another for the output buffer then its inverter would go before the output buffer.


ThermionicScott

#56
Quote from: anotherjim on May 13, 2021, 05:16:10 PM
If you use inverters at maximum gain, the gain/bandwidth drops a lot. If you then cut the bass, a middle heavy sound could well be the result.

The available open-loop gain of an inverter increases with lower supply voltage so you can expect a different sound from a different dropper resistor.

Thanks, Jim.  I wonder now if that 1K resistor was a lot more of my problem than I realized -- I should have changed only one variable at a time.  I can't recall if I had a good reason for leaving it at 1K other than helping my batteries to last longer.  Maybe this would also explain why the treble sounded a little rolled-off even with the SWTC all the way up!   :icon_idea:

QuoteI still suspect that if you want the soft/compression clipping, you only need one inverter with minimal gain itself and do the pre-amping with something more dependable. An idea I keep meaning to try is a TS with an added inverter. I would try a CD4007. Use one of it's P channel MOSFETS for the input buffer and another for the output buffer then its inverter would go before the output buffer.

It's funny, while I was out riding my bike and thinking of making these mods yesterday, I had an idea for yet another TS variant:  an op-amp preamp stage (set up Blackstone-style) pushing a single inverter stage for clipping.  That way it wouldn't need to cut as much bass and be so midrangey at lower gain levels.

What would be extra-cool is if the gain control not only trimmed bass at higher settings, but rolled off a little treble at the same time to compensate for the extra harmonics...
"...the IMD products will multiply like bacteria..." -- teemuk

ThermionicScott

Some trivial updates, for anyone interested. :)

So I tried a few component tweaks, mostly confirming what has been said so far.  Bumping up the feedback resistors to 10M to wring out the most possible gain from the two inverters and see how fuzzy it could get was a little disappointing -- I did get a little more saturation, but the sound also got uglier, and lost pretty much all ability to clean it up from my guitar or the gain control.

It's kind of hilarious how the usual rules for computing op-amp gain break down with CMOS inverters.  In theory, with my gain control all the way up (so all series resistance comes from the 2.2k input resistor), any feedback resistor over 220k "should" provide maximum gain if they are only good for 30-100x.  But I noticed distinct differences between 220k, 390k, 750k, and 1M.  Is that just from inverters being inverters, or do CD4049UBEs actually have more gain in them, as GFR says here?  https://www.diystompboxes.com/pedals/jo4049.html

I tried going in the other direction, with a 390k on the first stage and 220k on the second stage.  Definitely smoother and clearer, but with so little clipping available that you probably wouldn't even notice it when playing with others.   :icon_lol:

It seems like I probably got it about as good as I will for a two-inverter drive when I posted in May.  Minor tweaks that did seem to help:  dropping the 0.15uF input cap to a 0.1uF to trim a little bass since I tend to leave the gain control all the way up on this thing.  And dropping the first feedback resistor from 1M to 750k helped the cleanup without sacrificing much gain.  Also, those purple-green-yellow resistors are kind of pretty!

Looking at the Blackstone again, the three 4049 stages are all configured for very low gain, between 1.6x and 7.5x going by the resistors.  So you know the actual gains are even lower.  I decided to try using three inverters to see if I could sneak up on the smooth crunch I wanted without yuckiness from working any stage too hard.

And wow, even with really tame Rf/Rin values I was into the first major oscillation of this journey!  I've been keeping component leads fairly short and giving them breathing room from each other, so I concluded it must be a gain problem.  After trying high and low feedback resistors in each position, it seemed that keeping the gain really low on the last stage (as Blackstone does) was key.  1.5x and a feedback capacitor chosen to give a high-end rolloff between 1 and 2kHz, and it stabilized.  I worked up the gain on the first two stages and ended up at 7.5x for the middle and 7.3-"whatever" on the input stage.  And then it got interesting (to me, but probably not surprising to you):  rather than getting really crunchy with the gain turned up, the high and low end rolled off and the sound became really compressed, with a touch of sag on the attack.  Playing harder didn't increase the apparent distortion at all!  I suspect that when you have the inverters daisy-chained like this, and stage the gains just right, they act like one big inverter that's even more resistant to hard-clipping than usual.  I need to get a sound clip of this!

It's not the sound I was going for, but I'm having fun.  This underscores why an op-amp in front makes so much sense if you're after a crunchy tone and any fidelity.

"...the IMD products will multiply like bacteria..." -- teemuk

anotherjim

If you chain them without inter-coupling caps, you might have more asymmetric behaviour toward the end. The DC bias point of an inverter is whatever it makes itself, which may not be exactly halfway. The difference may be corrected by the next one, since it's all inverting, but the gain of each stage will be amplifying the DC as well.

ThermionicScott

#59
Another head-slapping newbie moment... I checked the battery I'd been using to test this thing and it was slightly under 7 volts!  With three inverters drawing current now, I wonder if that was responsible for the out-of-control gain and oscillation.   :icon_lol:

So I lashed together a quick power supply using a spare filament transformer, and now I had a steady (if a bit hummy) 8.4 volts under load.  The extreme compression/sag went away, but I'm back on track with the "smooth crunch" goal.  If I ever get around to boxing this up, a starve control in the power supply would be cool for getting back to that wacky squishy sound. 

"...the IMD products will multiply like bacteria..." -- teemuk