Circuit Fragment Simulations Using No IC's

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

I hate hate hate being bored so, why not? 

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


A video game!!!!

Rules:

  • (already stated)--No simulated IC's!!!
  • FETS/MOSFETS, maybe? Try using BJT's instead....
  • No finding fragments online and (as a child of AI), copying them into the sim...way too easy. 
  • Goal: understand things well enough to look at mostly discrete audio schematics (e.g.: Aries site here--cool!), or earlier, and have a decent idea of how OG/transistorized/very few IC's to zero IC designs work.
I quickly discovered that my ability to conjure anything without IC's--like, how to make a comparator without using an opamp--sucked.  (I document this because in 3 days I will forget all of it.....) 

FALSTAD

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

Falstad works the way my mind works; I can get instant gratification as far as current flow, seeing voltages change in real time, quickly spinning up virtual scopes, changing values while the sim is running and a lot more. Recommended! 

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 in Falstad to run the simulations). Repo is here.

BASIC GATES

Getting started--a warm up....even with my extremely limited knowledge of how BJT's work I could figure and AND, OR, NAND, and so on.  Yep--pretty easy.

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


BJT TRANSISTOR BASICS

But beyond basic gates I knew nada.....to ameliorate I created a simple simulation complete with fake current and voltage meters: 

I knew SQUAT, really, about BJT's!!! A bit more now? Sim herecheck out a great "Kevin's Cave"
newbie video tutorial starting here.


What (I think) I know now:

  • If the voltage drop between base and emitter is about .6V then E-C works like a non-linear variable resistor.  This is the transistor's so-called "active region", a.k.a., "active mode".   
  • If no current flows between B and E, no current flows between E and C. Transistor is in "cutoff" mode. I knew that...
  • If voltage B to C is > or = to voltage B to E then C to E behaves like a small resistor--maybe 30-50-90 ohms. Transistor is in "saturation" mode.
  • If BJT is in saturation mode, 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, which I found confusing. I guess Falstad's programmers had to illustrate this somehow?
  • A BJT transistor is a valve--it can't generate current, only let various amounts of it (or none) pass through. Basic idea, but this escapes me at times....can be seen in the sim.
  • 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 usual things. The trick is getting the surrounding components right, and Falstad is a great place to mess around with values.

COMPARATOR




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




I saw these everywhere in IC designs, but, why?  How? After the BJT review and trigger time inside Falstad here is my thinking: By tying B and C together then C to E always acts like a small resistor; we now have a V = IR package using 2 transistors--super useful! 

These can now be peppered around the IC for things like current sinks or sources, and these blocks can put into series and parallel to get different current values output (V is constant, but R is changing, so I changes--simple ohm's law)....Sim is here.

LC OSCILLATOR (SINE, SQUARE, ETC)

Hard to believe I've been doing the DiWHY thing off an on for 20 odd years and have never used an inductor in a design of my own.  After trying unsuccessfully to come up with a transistor/cap only solution, 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 right?  Yep.  That's the thing about simulations--try weasel, try squirrel.  Nothing is going to smoke.

I even threw in a FET buffer.  Buffers in general have proven tricky in discrete designs. Just throw in a 741 right? Sim is here.


OPAMP

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 can recall. So far, no love, I have made lots of things that don't work.....I am really REALLY tempted to cheat, since this would create a bullet-proof buffer, much needed for different discrete designs.  So far, I am still working at this.

OUTTRO



Indeed....Once you have your sim go to PCBWAY and get some PCB's made....check out their online community. 

yep, I got in the shameless promo in.  Go A's!!!
Until next time: discrete-ion advised.     

No comments:

Post a Comment