Monday, October 29, 2018

Bias Offset With Adjustable Level, AKA "B.O.W.A.L."--EZ Op Amp Circuit that worked the first time!

Almost nothing makes me happier then laying out a PCB, getting it fab'd, stuffing it with parts, mounting it to a metal panel, racking it, and having it (wait?  wait?) work the first time !!!

NO MISTAKES!! No kludges, no cutting traces, no gnashing of teeth. Yeah!!!

What is up: While I had the Zener Distortion Units on the bench I found this: if I offset the audio signal(s) feeding it by a few hundred millivolts or more the zener unit's sound at output changed quite a bit.

I also found that in my growing DIY modular synthesizer I had very few ways, if any, to create this said offset.

Let's get building! The usual: researched, opened up Eagle, designed, checked, sent it off to JLCPCB for quick fab.....

While we're waiting for the PCBs to come back to the US now what?

As Frank Zappa used to say "let's examine this phenomena!"

Q: What do I mean by offset?  

Say you have a sine wave, and it's centered on 0V DC (ground).

It will look like this on a scope, or, if you hunt around Google and copy illustrations to your blog:



The bias offset will "elevate" the sine wave to something more like this; and it can go either way; apply a negative DC offset and the sine wave is dragged below zero, but here it is above:


At first glance, this doesn't seem like a big deal, but in terms of modular synth, it can be useful.  Put your waveforms through the bias offset device, change its bias level relative to ground, and put it through a ring modular.  Ha! Sounds different!

Q: Still not convinced, but anyway, how to design this? 

There are lots of ways; but like most every other analog designer out there, I like using op amps.

On my website I already had a non-inverting design for this, but it requires small value offset trimmers or pots, say 1K or 5K, which might draw too much current if you add say 8-12 of them to a design.  I don't use battery power but if I did you probably don't want to do this!


I don't spend a ton of time worrying about power efficiency but still, it's good to do things right. OK, lets put a bigger value trimmer in for the 5K above....let's make this trimmer 100K to keep our power supply completely happy, and the resistors in the op amp's negative feedback network are also 100K.  But wait, now, the gain doesn't come out right--the offset resistors screw up the output:

Audio goes to +; this circuit draws relatively little current--but-your gain will not be what you expect!

What I figure: an inverting solution ends up working better when the power supply draw is critical. .

Enter B.O.W.A.L....a simple quad inverting then re-inverting op amp PCB with 2x quad op amps.

You can see details about PCB layout on my website but basically the circuit board looks like this:


While a single gain stage (repeated 4x) looks like this:



For my own B.O.W.A.L. I added a brain dead AC coupler to undo whatever the offset circuit does, creating a "star belly off machine", entirely wired to the front panel.  The Offset pot above can be a trimmer for fixed applications, or a pot on the panel so you can adjust the bias on the fly.

Aside: a really good guide for setting op amp bias offsets can be found here: MIT's "how to bias an op amp".  (Note that my undergrad application to MIT in 1980 got the big goose egg. I wonder why?)

So anyway this PCB got back from China and I populated it, selected an unused a front panel, got some pots from Small Bear going etc:



Designed up a front panel for Lazertran using Adobe Illustrator:




As I said! worked first time. Yeh!



BEWARE: if you amplify and/or offset your incoming signal too much, your op amp will squash the dickens off some or all of your incoming signal, turning it into an ugly square wave. To my ears, this isn't good sounding distortion, this is really bad sounding distortion. At best an op amp can gain something up to slightly above its V++ and V-- rails, and usually less. So keep your amount of BOWAL output flushable....

And: if you are really concerned about input impedance you may want to put yet another buffer in front of your B.O.W.A.L. or change BOWALs R values.  The incoming sound will travel through all the feedback resistors from input to output, which might yield a different input impedance than you want.

Update!  The +/- 15V DC bias settings weren't working for me sound-wise--it was too easy to squash incoming signals, which sounded terrible, so I did this easy mod to the 4 bias pots (in my build, these are inner pots of dual concentrics from Small Bear:)

"To PCB" means wiring to the center tap of the bias trimpots on the circuit board.  The down arrow is -15V


I used different resistor values between V++, the pot and V-- to allow for flexible settings

UPDATE to the update: After messing with this design a bit more, I realized the circuit would be more musical if I could control voltages to determine the bias offsets. And that's easy, buffer an incoming CV signal and feed it to each of the op amps' non-inverting inputs. I thought about modifying B.O.W.A.L. to do this, but the front panel was already done and labeled.  Instead, I  created a 2 channel variation of this same PCB that has CV to DC bias offset: "Small B.o.w.a.l".

OK that's it.  Remain biased at all times! Until next time, go MITEs and don't breathe the fumes!



No comments:

Post a Comment

Synth Gates, Interrupts, and Arduinos; a million and one uses

Yes once again: more Arduino Control Voltage Fu. Continuing from last time ...how can we use an Arduino to get rid of mountains of analog ...