The Road Ahead

Hello again. I took up boxing recently and immediately injured both wrists making me unable to type, work at the bench efficiently, or play musical instruments. These are a few of my favorite things..... Bummer!


I thought I’d use this downtime to (literally) record ideas I’ve had for upcoming projects. 

Then augment this post in coming weeks and months as untyped content aka SPTKTO, aka A Single Place To keep things Organized.

If this post reads like I’m talking into a mic it’s because I am--the illustrations in this post were created with AI but my prose never will be.

Control/Alt/Delete?

First things first--on my Windows 11 system how do I make Voice dictation work--Remember I can’t type....

 

Is voice dictation in Windows 11 included for free? Nope. Nothing in Windows 11 is included for free.

After getting the internal microphone for my W11 computer working, I said into the mic “voice access wake up” and Windows took me through a quick wizard; surprisingly it worked right after that. 

To toggle the dictation feature off and on I clicked on the mic icon at the top left of my main screen: 



To kill the feature entirely I right clicked on the main Windows icon then Settings > Accessibility > Speech > Voice access:



Overall, Window's ability to accurately transcribe voice worked surprisingly well but at times was frustratingly slow. I might look into other solutions.


Shut up and list the audio projects!

OK! A recent post described an Analog Devices/Dallas/Maxim Integrated circuit called the DS1881

This is a super-cool digital potentiometer with musical sounding log attenuation and a built-in hardware anti-click algorithm.

Previous post for the DS1881 is here

Next I’ll explore other uses for this interesting integrated circuit--using it as a rheostat, for MCU programmable variable gain using an op amp, in all-pass filters, and a perennial favorite: as an analog multiplier. 

My always-patient and always-enthusiastic sponsor, PCBWAY has already fabricated a never-ever-breadboard-again PCB for future rheostat experimentation. 

Meaning: post about the rheostat application is coming, when I can solder again and vet that the board doesn't turn into charcoal.

 SBC's





I recently posted a series: using single board computers ("SBC’s") as the basis for new AudioDiWHY projects--starting here

An idea for an initial project: fleshing out a quadrature LFO--cool, but I need to finish it--go here; code sample is at the very bottom of the post.

Another: a CV And MIDI based Quantizer using a web based graphical user interface to set scales and ranges.  Add voice activation? Sure. For the web piece I'll probably use Flask; see the post here. For voice recognition maybe an Arduino BLE 33 and Tensorflow Lite.   

Finally, an extremely accurate bench clock using GPS and a Raspberry Pi--from some quick research I should be able to get gazillion dollar clock performance for absolute minimal dough going this route. 

But-for that project all I have so far is the stupid AI illustration above and this link from SBC mensch Jeff Geerling--"and miles to go before I geek."

DEE-ES-PEE?


Any primate can write DSP Code with a $200/month Claude Subscription. But what about the damn layoffs?

My interest in learning digital signal processing continues. I created simple proofs of concept using Python (post here) but feel (doh!) I have a whole, complete, sh*t-ton lot more to learn. 

A scary smart tech in my audio Discord group turned me on to a PDF that should motorize the pursuit--"The Scientist and Engineer's Guide to Digital Signal Processing" by Steven W. Smith, find it on Github, here .

The book covers (along with other useful topics) DSP basics that are spot-on for what we do. It's not overly mathematical and contains examples a Fellow BAM Member leveraged to create a professional sounding -24db per octave low pass filter 1U demo he brought to a recent meeting.

7-25-26 update--this YT starts of a series (here) where the content creator does basic DSP with an RP2350/Pico2 and some common codec breakout boards. He includes C code and schematics. I have some Pico2's and both breakout boards he uses already and would like to breadboard this or better yet, create a PCB for experimentation--but when scotty, when?

STRING SYNTH


 


Another one: creating an analog string synthesizer based on top octave generation, frequency dividers, and some sort of mega-attenuator (probably based on many aforementioned DS1881's). 

The super-talented TJimmyChonga from our BAM Discord group had already written working C++ code for an RP2040-based top octave generator and shared it with me. Holy Moses, TJimmy's DIY kung fu is stunning!

Using that I have breadboarded a TOG, frequency dividers, and ASR envelope control, creating a few working Solina notes on the bench. 

However, I’m not happy with the sonic results so far. The work continues.

BAAH-RINGER?

If Behringer can rip these guys off why can't I?

In the same Discord group meetup: Tjimmy, Elton from Otter mods and I discussed jettisoning of our commercially available recording and electronic music hardware and replacing it with prototypes we design and build. Time-wise this is an extremely bad idea but sounds like a challenge and even a lot of fun. 

Lots to chew on for this one. For me low hanging fruit are things like my intellijel dual ADSR. I figure for the basis of this I will use the one-chip ADSR described in the post here--who knows.

Roland's amazing JP8 was designed by some of the greatest audio engineers of all time. If they are the big leagues can I swing in single A?  Maybe???

Related ideas include a programmable single- or dual- voice PCB that can be expanded into an 8-voice polyphonic synthesizer. So reverse engineering something like a Jupiter 8 or Prophet T8. Why not--??

STOMPS



It’s been a long time, but many years ago I had fun making guitar pedals that sounded good but broke the first time I gigged with them. I might start doing that again but try to toughen them up...

ARTIFICIAL INSUFFERANCE


The 800-pound gorilla in the room: AI. This ever-useful, ever-terrifying, potentially economy-busting technology has already changed every aspect of my 9 to 5 job. Actually it’s more like 24x7x365 job where the VIP's let me screw around with electronics when they don't need me screwing around with AI.

How to better incorporate AI into AudioDiWHY? How can I not have an entire page of ideas already? 

Sorry.

Other than speeding creation of assembly BOMS and getting sometimes-accurate-sometimes-not OpenAI diatribes about electronics fundamentals I still don’t have a clue--figure I might wake up in the middle of night with something.  

A PLUG FROM MY SPONSOR: PCBWAY!

PCBWAY community's servers are not in orbit (yet).  Check 'em out here.

Once the ideas are off the drawing board and rise above the level of ewaste I’ll need prototypes made; for that of course I’m going straight to this blog's wonderful sponsor: PCBWay

My work can, at times, be e-waste fodder, but PCBWAY's work never is!! 

You can greatly help this blog by checking them out--using the link here.

OUTTRO

Enough for now, hopefully once my wrist is better start Building things again.

See ya next time and don't spend all your tokens on one ride.

DS1881--Clickless Dual Digital Attenuator--Experimenter's Board--Amazing IC!

Readers: If you'd like to build the DS1881 experimenter's board featured in this post, please go to PCBWAY's Community pages--gerber file; KiCAD 10 project/pcb/schematic/library files, a link to github repo with Proof of Concept sketches, an assembly B.O.M., and more, are here.  

You can also help out this blog immensely by checking out PCBWAY using the link here. Thanks!

=============

 Hello again!

I've breadboarded digital potentiometers before, only to find they make an ugly, audible "click" when changing resistance values when used in 30hz-20Khz AC circuits.

I recently stumbled upon an IC that purportedly does away with the click--Analog Device's DS1881--dual pots, I2C, log response--everything needed for an MCU controlled audio attenuator--but also sporting onboard hardware to detect AC zero crossings (like an old Akai sampler?) and change its resistance values quietly.

TLDR: Does the DS1881 work as advertised? Yep. 

Datasheet here.   





PCB DESIGN

"Not this post's project"

Instead of breadboarding (I hate breadboarding!) I created a simple DS1881 experimenter's board, used an Arduino UNO4 to generate the necessary I2C calls and vibecoded test sketches to create proofs of concept.

AI was a huge help (coding the test sketches) but also a burden (out to lunch--why the DS1881 was producing audible clicks--leading me down dead ends).  

The circuit fragment for the experimenters' PCB was stolen from the DS1881 datasheet; my test PCB offers additional circuit protection.


The  PCB:




For the op amps I used an MCP6004--DIP version--I had a whole tube of them.  

It's a rail-to-rail quad op amp, affordable and easy to use, but can only withstand 6VDC max at its rails without blowing up.....good choice for this application: the 6004 buffers the incoming signal (I added schottky diodes as well) to clamp AC input signals to about 0-5V.

Since I had an extra op amp stage I inverted and cap coupled one of the outputs--why not?

Power can be from wirepads (PWR-IN) or from a Eurorack style power 2x5 100 mil header (don't put power to both!!!).  

PWR-OUT  is +5 from the regulator, added it as a test point.

Audio ins and outs are on the top left "EYE-OH" 100mil edge pins; from the top: 

  • output for channel 1, 2.5V DC offset 
  • output for channel 0, Cap coupled
  • output for channel 0, 2.5V DC offset
  • input 1: used 4V P/P with 2V offset (worked for me--you might want to experiment with P/P and DC offsets)
  • input 0: ditto but for input 0.

For the 12V to 5V step down, I accommodated both a 7805 regulator (I have a whole box of them) and a low dropout, more "modern" choice: SOT-23-5 LP2895. If you build this board, please use one regulator or the other--don't use both!

USELESS BUILD PHOTOS

Always: happiness is new PCB's from this blog's patient sponsor, PCBWAY.


I used both THT and SMD for the project...sorry.  Grab the Kicad files (here) and modify away if you want....1001 uses.
.........built a bit of it, powered it up, and saw if there was a short. In this case, no short (yet).  Kept going.





Still no short! I had an ancient UNO-R3 I use only for getting I2C addresses (code here). Worked! Default with A0-1-2 pins grounded--I2C address for 1881 is 0x28.


I used an Arduino R4 for the rest of it--worked great for getting I2C calls into the test board quickly, then seeing serial output through the Arduino IDE.

Good to go! used a siglent function generator for the test waves (4V P/P) and a Eurorack patch cable to the bench BT mixer (here) to hear output--"seems working". Get the Coax to whatever boards here and here.

THE SKETCHES

Get them from Github: here.  

AD's I2C implementation for the DS1881 was simple; I vibecoded then debugged/modified the code--fast, fast, fast. The days of coding every line of anything may be gone for good.

For each .ino file you may need to drag the .ino into a new folder you create with the same name.

Simple stuff: take a look, experiment with different values, vibe code additional features, and have fun:

  • DS1881-diag.ino Run this first, the basic g/no go tool for the experimenter's board. Reveals if I2C can reach the DS1881, tells you via RS232 the IC's I2C address, does basic reads and writes to the DS1881's registers. Nothing for you to enter into serial monitor; the serial monitor's output tells you if your build works or is butt.
  • DS1881-enter-db-attenuation-value.ino. Entering a value 0 to 64 in serial monitor attenates 0 and 1 channels by said DB.
  • DS1886-30ms-steps-100ms-hold.ino  Rapid attenuation followed by gain increase for both channels. So, a sort of poor man's tremolo. I wanted to see if fast fades caused clicking--so far, none heard. Suggestion: Mess with the ms values in the sketch to experiment with how fast I2C can control the pots and what sounds good to you.
  • DS1886-choose-zero-cross.ino The DS1881 fades inputs to -64db then the signal is gradually brought back to unity. Enter z into the serial terminal to toggle on and off the declicking algo inside the chip. This will give you a rough idea of how the DS1881 will sound vs. a digital pot that does not have a zero cross detection algorithm built-in.  

HOW DID IT SOUND?

At first--crappy.....no matter what I did I heard clicks. Hello? The whole idea: no clicks.  

Pouring over my circuit and code, many times--I think I got it right....but the IC wasn't working as advertised, so--did I?

Plugging everything into Claude, using every prompt I could think of, and adding the DS1881 datasheet to Claude.ai's RAG (Resource Augmented Goober-fication), whatever, the chatbot told me that the audible clicks were just the way the DS1881 rolls and, like a bad marriage, I should just live with it.  

Did that sound right?

I took the project to my local group meetup--everyone meant well as always, but as far as a fix, no one (including me) had any idea why the DS1881 was clicking no matter what, I just got puzzled looks.  

Driving home it dawned on me--what if I set up the input signal wrong? Electronics is the same as US politics: always suspect stupidity. 

Went back to the bench and sure enough, I was not adding a 2V offset to the test input signal.  The datasheet clearly indicated that a bias offset was needed, but no, I booted it, which was confusing the hell out of the DS1881 IC's anti-click algorithm.



I added a 2VDC offset and the IC worked--perfectly--no click, nice natural sounding butter-smooth fades, quick moves from -6 db to -60 db to whatever than back to mute--all without any distortion or unwanted cross-tweeze. Musical. This is a really cool chip! 

Plugged this fix back into the LLM and it sort of said "oh yeh, my bad". Which is better, I guess, then a bot scolding me for being stupid.  



THE SHAMELESS PROMO


Quick word from this blog's sponsor! Once you have your design laid out, and want to see if it runs or is a smoking turd, RUN don't walk, to PCBWAY and get some prototype PCB's made....They also do great work with 3D printing, assembly and can even act as your OEM. You can support this blog by checking them out--link here--as well as the PCBWAY community (here).  And--best of all! for support you always get a friendly human, not a bot. Yes, it still can happen!


WHAT'S NEXT?


I am having a rev-2 experimenter's board fabricated as I write this. It allows the DS1881's two channels to be used as MCU controllable rheostats. 

I am not quite sure what I'd use that for, or if it will work at all, but that's the great thing about DiWHY in an era where small quantities of PCB's are available quickly and for little money; try it out, see what happens. 

Assuming I can get something useful out of this 2nd revision: it will show up in a future post, for sure, for sure.

See ya next time.
 


digital potentiometersPCBWAY

No IC's allowed, part II: determining active vs. saturation state in BJT transistors

Back for more discrete transistor design punishment!  

Quick one this time.

Last time I discussed BJT basics...if you are a "BJT cookbook" tech as I am or was--find a bipolar junction transistor circuit fragment, put it in your design, and hope it works--you might want to skim the last post before reading this one.

Maybe simulate it using Falstad?



If you are a BJT superstar--you taught 1970's electronics at a community college and already know all this--by all means skip this post and instead watch the video here.

but really? this is all for me.

SATURATED VS. ACTIVE

You can get Falstad simulations for these "No IC" posts from github, here.

So...how do you figure out if a transistor is in its active or saturation region?  Should be easy, but this one drove me nuts...

Cheat code: Plug your BJT circuit fragment into Falstad, hover over the transistor and see what it says?  



Nope, too easy. 

We start by guessing we are in active region, and go with these assumptions:

  • B-C junction is forward biased; its voltage drop across B and C is .7V
  • current at emitter and current at collector are the same
  • B-C is forward biased; B-E is reverse biased.(normal situation for active region)

Let's do some simple alegbra and use ohm's law to see what's really going on.
  • Base is 2V less .7V to ground, so the voltage at the BJT emitter is 1.3V.  
  • Using ohm's law: current at BJT emitter junction is 1.3/1000 or 1.3mA  
  • Assuming active region for the transistor, Ie and Ic are about the same, so let's assume Ic is also 1.3mA
  • Again using ohm's law, for emitter to be at 1.3mA, the voltage drop across a 10k resistor would need to be 13V
  • But, the the collector power is only 5V!!
  • The transistor lowers its Ve to Vc resistance as much as it can to satisfy the need to satify the 13V drop
  • But fails--even if C to E is a short, the transistor can't make the Vc junction 13V relative to ground.
  • Transistor is saturated; B-C and B-E are both forward biased; E to C works a lot like a short circuit.
Let's try again:


  • BJT collector current is 1.3mA; that hasn't changed.
  • Assuming active, Ic = Ie, so Ie is also 1.3mA
  • 1.3mA * 1000 = 1.3V  (drop across collector resistor)
  • 5V - 1.3V is 3.7V0--that's the collector voltage
  • B-C is forward biased; B-E is reverse biased (see "active" assumptions above)
  • Transistor is active.

OK with this framework, any simple fragment can be analyzed.

For PNP, all the same ideas, but all polarities are reversed.  

Notes for this post....


This helps explain the typical graph you see when reviewing transistor datasheets:


Voltage between collector and emitter (X-axis) vs. current  at the collector (Y-axis). The uA values on the right (10uA, 20uA etc) is a constant current seen **at the base node**. Which means, voltage and resistance B to C change, giving us the various X/Y values we see on each red line.


The saturation area is the vertical area shaded in blue--as described above: when the voltage from C to E is nearly zero volts, the resistance between C and E is almost zero; C to E acts like a dead short.  However, the values further to the right on the X axis result in amplification: as C-E voltage swings back and forth along the X axis, to the right of the saturation region, current swings up and down along the Y axis, since C to E resistance is changing.  The horizontal area shaded blue results from B to E not being forward biased--transistor is cutoff; C to E acts like an open circuit.

OH NO IT'S THE PROMO



Quick word from this blog's sponsor! Once you have your design working in Falstad, run, don't want to PCBWAY and get some prototype PCB's made....They also do great work with 3D printing, assembly and can even act as your OEM. You can support this blog by checking them out--link here as well as the PCBWAY community (link here)

OUTTRO


OK no more this time, it's Juneteenth, I have to get to the bench and mess around with some IC's.

No IC's Allowed!

I am retiring soon--they've put me out to pasture.  

I hate hate hate being bored so, what now?

I fired up Falstad to simulate basic electronics building blocks using only transistors, caps, inductors, resistors, and diodes--NO IC's!!! 


A video game!!!!

Rules:

  • (already stated)--No simulated IC's--even if the simulator has 'em, I can't use 'em.
  • FETS/MOSFETS, maybe? Try using BJT's instead....
  • No finding fragments online then copying them into the sim...which "works", but is way too easy, and I learn almost nothing. 
  • Goal: understand "discrete" electronics well enough to look at old audio schematics (e.g.: Aries synths here--cool) and have a decent idea of how these OG/transistorized/very-few-IC designs from way back work.
I discovered that my ability to conjure anything without IC's--like, how to make a comparator without using an opamp--sucked.    

FALSTAD

Why breadboard when I can do it behind glass.

I've tried many simulators--Kicad's, Everycircuit, others, and keep coming back to my local installation of Falstad

Falstad and my brain get along; I get instant gratification, seeing voltages change in real time, seeing current flow like the ghosts in "Pacman".  I can spin up virtual scopes, I change values while the sim is running to see what happends and a lot more. 

Best of all--it's free! 

Get an offline version of Falstad here; web version here.

I put my Falstad exports for this post on github (they are text files...so, file > open the txt files in Falstad to run the simulations). Repo is here.

AI (OF COURSE)

Since no one thinks on his or her own any longer I uploaded the Falstad exports into Gemini, Claude etc. to help me understand how the sims work, find mistakes, help with analysis and the rest. 

These LLM's (I didn't try copilot because I frigging HATE copilot) both say they support analysis using Falstad exports--didn't know that!.

But! Claude.ai Opus was terrible with all things falstaff, making all sorts of bizarre and inexplicable mistakes. Gemini Pro worked a lot better. Of course in 2 weeks this could be completely flipped.

EG: I asked Claude to vibe code a text file to create a current mirror I could upload into Falstad. Here's what it came up with. Righto!



BJT LOGIC GATES

Getting started--a warm up.

Even with my limited knowledge of BJT's I could figure and AND, OR, NAND, and so on. pretty easy. 

NOR gate, get it here. Fake LED demonstrates logic out.

Moving on....

BJT TRANSISTOR BASICS

I know this component, right? BJT transistors are easy right? Nope. I created a simple simulation complete with fake current and voltage meters: 

 Sim herecheck out a great "Kevin's Cave"
newbie video BJT tutorial starting here.


Which led me to:

TRANSISTOR FU 

Looking at the NPN transistor modeled in Falstad--messing around for a few hours--throwing a screenshot into claude.ai when I got stuck--what (I think) I know now:

  • In general, the voltage drop between base and emitter determines C to E behavior. 
  • It's not voltage relative to ground found at the the BJT's base that determines this. It's the voltage drop between B and E.
  • C to E can act like a variable resistor. When doing so the transistor is said to be in "active" mode.
  • While in active mode the B to E current is multiplied the transistor's "beta" (in Falstad: 100 by default)
  •  this allows for amplication
  • This beta multiplier is also called "Hfe" to keep things confusing.
  • But--the transistor can only alter the resistance between C and E so much.  
  • At some point the resistance is as low as the transistor can make it, at which point the transistor is "saturated."  
  • When the transistor is saturated C to E behaves like a small resistor--maybe 30-50-90 ohms.  In this case additional base to emitter current won't change the C to E behavior; the transistor is maxed out. Saturation means the Vc to Ve voltage is as small as it can be, usually around .2V.  Increasing base current will no longer make this voltage decrease. Good video about this here.
  • Cheat code: Active vs. saturated, for the default NPN transistor modeled in Falstad, can be boiled down to this: if voltage between collector and emitter is greater than about 200mV the transistor will be active; if it's less than 200mV it will be saturated.
  • If limited or no current flows between B and E, you can end up with no current flowing between E and C. Transistor is in "cutoff" mode and the collector is "high-z", as if the collector is an open circuit.
  • Falstad has a useful feature: if you hover over a transistor, in the bottom right corner of the app you can see things like B to C voltage, C to E voltage, and its mode (saturated vs. active vs. cutoff).
  • If BJT is saturated, current flow in falstad is shown flowing C to E, as expected. But I've seen current flow from B to C while in "active" mode as well, but sometimes not, which I found confusing.  
  • A BJT transistor is analogous to a valve--it can't generate current, only let various amounts of it (or none) pass through. Basic concept, but this escaped me at times.
  • For amplification, we usually work in the BJT's "active" range.  
  • For logic and switching, work in the BJT's "saturation" and "cutoff"modes.
  • You program what you want the BJT to do by surrounding it with voltage sources, current sources, resistors, diodes. The trick is getting the surrounding components right 
  • To get it right, you have to use math (basic algebra, mostly). Sorry.
  • Transistor prose and videos can be a flurry of capital letters and italized subscripts. Get used to it:
  1. Gm ("transconductance") a transistor's ability to see a change in B-E voltage drop and turn it into a change in C-E current.  
  2. Ic, Ie, Ib: current at collector, emitter, base
  3. IcRc represents the voltage drop across a resistor tied to the collector, since V=IR....same idea for IbRb, IeRe.
  4. Vce is the voltage drop from collector to emitter
  5. Vbe is the voltage drop from base to emitter
  6. Etc.  
  7. Video series that I found helpful--kickoff video links : Vocademy
  • Falstad is a great place to mess around with values and see what happens.
  • See more about saturation vs. active in the post here.

DIODE BASED COMPARATOR

On to the next sim.




The idea of using diodes to choose the greater of 2 voltage sources was new to me--a nice hack.  I tried building this comparator using a long tailed pair but for me a 2 diode + 1 transistor solution worked better....Sim here.

CURRENT MIRROR




Upper 2 transistors form a "long-tailed pair" while 2 lower are a current mirror--left lower is the reference transistor.

I see these everywhere in IC designs, but, why? How? After screwing around with simulations: By tying B and C together on the lower left transistor (the "reference"): assuming lower transistors are in their active regions, C to E in the lower right transistor (the "mirror") acts like a variable resistor, its resistance increasing and decreasing with collector voltage. This rock-solid current sink is needed to make sure the balanced pair actually balances.

If the right lower transistor was replaced with a normal resistor, the voltage drops seen across the balanced transistors (upper ones) would impact overall gain, leading to distortion.   

Sim is here.



LC OSCILLATOR (SINE, SQUARE, ETC)

I've been doing the DiWHY thing off an on for 25+ years and, outside of linear power supplies, have never used an inductor in a single design of my own. 

After trying unsuccessfully to come up with a transistor/cap only solution for an oscillator, I remembered that inductors pass DC and not AC, while caps pass AC and not DC.  If I put them in parallel, they might fight each other?  Yep. That's the thing about simulations--try weasel, try squirrel.  Nothing is going to smoke. Something eventually will work. I messed around with the parts until I found something that worked. Now I need to figure out the math right? Nope.

I even threw in a FET buffer.  Buffers in general have proven tricky in my discrete design attempts. Just throw in a 741 right? Not in this post....Oscillator simulation is here.

FRENCH, GERMAN, AMERICAN

To make discrete circuits useful some math and science is needed (sorry, Arduinoheads). When transistor analysis is discussed, the dudes below are discussed. so far the math I've seen is algebra only. 

KIRCHHOFF: "The man with a redundant H". Russian, moved to Germany. Hell of a guy, discovered all sorts of things, including cesium. Big ideas: Kirchhoff Voltage law: the sum of all voltages in a closed-loop circuit is always 0. Example in a transistor analysis video here: go to about 4:11. Kirchhoff Current law: currents in closed-loop circuits don't magically vanish; for example, current at transistor C is a sum of currents B > E plus C > E.

THEVENIN: French. You can take a complex circuit and reduce it to a single power source and a single load resistor.  You know the blocks in schematics labeled "load"? That's the "Thevenin Equivalent".  How-to video for computing thevenin equivalent is here. I'm a reductionist, maybe he was too.

MILLER: Miller was American, discovered the capacitor hoo-ha using tubes (not transistors) and worked for RCA, among other places. The Miller Effect: in AC circuits the transistor has parasitic capacitance which impacts frequency response. Good video here. Another video (Zappa backing track? Sounds like it!) here.


OP AMP

This one blew chunks--hard!! I remember I have to combine a long tailed pair, a gain stage, and a class B amp, but that's all I recall. So far, no love, I have made lots of BJT matched pair thingys that don't work.....I am really REALLY tempted to cheat, since a simulated op amp using BJT's would create a bullet-proof buffer, much needed!  

And I figure a bunch of folks smarter than me have a simple low parts count design already posted online. But--So far, no love!  

THE SHAMELESS PROMO



Indeed....Once you have your sim go to PCBWAY and get some PCB's made....check out their online community.  They also do beautiful work with 3D printing, assembly and can even act as your OEM. I got in the shameless promo in. Go A's!!!

THE-THE-THE THAT'S ALL FOLKS!


enough for one week. Until next time: discrete-ion advised.     


One-Chip ADSR using the ATTINY1616

Readers: If you'd like to build the ADSR experimenter's board featured in this post, please go to PCBWAY's Community pages--gerber file; KiCAD 10 project/pcb/schematic/library files, Arduino .INO file, modified .h and .cpp helper files, B.O.M., and more, are here.  

You can also help out this blog immensely by checking out PCBWAY using the link here. Thanks!

==============

This one started when DIY rockstar--this guy's kung fu is the best--TJimmyChonga--emailed me about an earlevel C++ library that abstracts analog synthesizer ADSR functionality into a compact C++ library--articles documenting the library begin here; zip of the CPP and H files are here.

Experimenter's PCB for the earlevel ADSR library, and probably a lot more AudioDiWHY fun. 


Looking over the code, I guessed it might be easy to use an ATTINY1616 --that's a <$1USB MCU, folks--to create an entire ADSR since the ATTINY1616 has ample ADC's and a single reliable 8-bit DAC built-in.  

Designed it, gerbered it, got it fabbed, built it. Fast, fast, fast...Good news--yep, it worked.

THE DESIGN

Instead of breadboarding, which drives me nuts, I drew up a 99 x 99 mm PCB using Kicad10.  

I added 3.5mm input and output jacks; a shottky diode clamp for the trigger input (so a 10V or 12V gate signal didn't blow up the input pin on the MCU) and a few pots....I buffered the output using a DIP TL071....simple stuff. 


....for future expansion, remaining GPIO was brought out to JST connectors....

As usual, a 3-pin JST in series with a 470 ohm resistor was used UPDI programming.

I included a 7805 regulator, although I could have gotten 5v from the Euro power cable, but hey, why bother.

I chose mostly thru-hole since I have tons of THT in my junk box.

Happiness is bubblewrapped new PCB's from this blog's patient sponsor, PCBWAY, where ten 2-sided PCB's less than 100mm x 100mm can still be purchased for $5USD.  

THIS BLOG'S SPONSOR

The gerber got sent off to this blog's trusty sponsor, PCBWAY and came back with alacrity.  

The shameless plug:


....why bother breadboarding when you can throw your ideas into Kicad, ship them off to PCBWAY and get lotsa boards back to mess around with. If they don't work: don't swear, don't stomp around, don't cry....e-waste them in an environmentally friendly way and try again. What's your time worth? 

Prototyping with PCB's is faster and a heck of a lot more fun than breadboarding....wait, there's more! Kicad experts: check out PCBWAY's 2026 Kicad Design Contest--nice schwag and cash prizes may be yours.

Back to it....

PROOF OF CONCEPT

Since nobody codes any more I used Claude Code to put together the Arduino sketch for a 3 pot ADSR proof of concept--Attack, Sustain and Decay/Release--some bugs at first but easily fixed. 



The output worked surprisingly well--nice analog-sounding log response....I thought 8 bits wasn't going to get it done and the output would be "stair stepped" but it was fine.

For the PCB, there were a couple of stupid mistakes but overall this one was easy--maybe too easy.  

Testing the POC board with a dual MS20 filter (MS20 VCF post here). Overall the Proof of Concept single chip ADSR, using the C++ Earlevel library, worked a lot better than expected.

OUTRO

In general, all heavy lifting was done with the ATTINY1616--if I hard coded the ADSR values, jammed 5V from my bench supply into the MCU, and didn't care about input or output levels, this was literally a one-chip/$1USD design....if there's a lower parts count ADSR out there, I haven't seen it.

OK, whatever....the question, what to do next.  

The fact that the entire EG lives on a single inexpensive MCU means I can sprinkle the damn things all over--add it to a filter, add it to a VCA, add it to a mixer.  

But I also envision adding various logic outputs to this--end of attack, end of release--and using them to trigger other events.  

Also it should be easy to modify the DAC to produce linear outputs, log outputs, or whatever you want in-between.

Or, I could go full Behringer and rip off + remarket someone else's function generator design--how about The Intelligel Quadra (4 AR's with clever I/O) with expander, allowing VC of attack and decay, this module sold for something like $300 before being discontinued? I figure I could recreate it using a 4x ATTINY's for something like $30USD?  And add sustain to each of the 4 AR's?   

Make it itty bitty/Eurorack so only folks with tiny little fingers can use it.  

Finally, I'd need to say it was made by "Bellinger" and call it something like "Quad Fumer"--indeed, too easy.