Wednesday, March 16, 2022

Differential Op Amps--Analog Math Fun! Simple Curve Tracer!

The folks at the incredible Bell Labs were on fire right?  

I see that the C programming language came from those guys, along with the transistor.  

They were pioneers in electronic music creation, even.  

But, arguably, we audio DIWHY folks' favorite Bell Labs creation is the op amp--the handy 25cent  IC commonly used in a negative feedback loop for analog data processing.

Yes, Bell labs invented that as well.  


Op amps are everywhere! I use them everywhere in my designs....so does everyone else--adding two signals, changing a DC offset, inverting an audio signal, as a comparator.... 

Question: Can we use it for simple subtraction? 

Of course. It's easy.


Simple math fun: subtract two voltages--if R1 = R2 = R3 = R4, the output is V2 - V1.  


By setting R1 = R4 and R2 = R3, you can gain up V2 - V1; the relationship of R2-R3/R1-R4 gives you your gain.



You can add more inputs and do more math, but it starts to get a bit more complex fast (Hope I got that equation on the right, right?)


So what else can we use the difference amp for?  How about a very simple mic preamp (here)? 

Can we use a differential op amp in test equipment, to measure the voltage drop across a shunt resistor ? Yes.


Indeed. This is an extremely common circuit fragment in audio--you can find a differencial op amp in the output stage of YuSynth's popular VCA design, for instance:

    



Pun Intended 

I took a "different" approach; I wondered if I could use a difference op amp to form a basic V-I component tracer (a good video about how to build a simple tracer--without op amps--is here).  

To motorize this pursuit, I could have breadboarded a $2 curve tracer, but I hate breadboards. Instead, I crafted a very simple differential op amp PCB and sent the gerber off to my sponsor: PCBWAYHere we go again with the shameless plug: Help out this blog and check 'em out OK?




The board came back to the USA really fast....here it is.


Populating it took about 30 seconds....give or take.....


Ready to hook up +/- 15V and ground and start testing things....



To trace a diode I put a 100hz 10V P/P triangle wave from a Siglent 1025 waveform generator into "FG-in"; put a diode under test between TEST1 and TEST2 wirepads, soldered a 1K resistor into R4, and jumpered R1. 

Next I tied IN1 to J1 and In2 to J2 (or IN1 to J2/In2 to J1, depending on how I wanted my scope trace to appear along the X axis--both work). 

I increased the gain of the circuit by increasing R2 and R3 to 10K. This made the range of the traces easier to see on my scope. 

To wire the PCB to my scope (a Siglent 1202XE--for X-Y mode, press the "acquire" key and then using the soft buttons below the display, set "XY"  to "on") I ran the FG-IN signal to Y input terminal and the output of the op amp to the X input terminal.




Some meatballs with my spaghetti?


For a diode--the result is a quasi-decent curve:

4004 diode....

5V zener....

The problem I faced: op amp rails max out at maybe +/-15 or 20V, but for a useful trace cursor, I needed a much wider voltage range, maybe +/- 60V, which would fry any ordinary op amp.  This single differential op amp design cannot accommodate the high voltages needed to create traces for parts like the one here. Oh well.  

I also needed a staircase generator to generate traces for transistors (example schematic can be found here, but I'd probably use an Atmel 328 MCU and a MCP4911 Digital to Analog converter instead) , as well as a switch or relay to compare the curves of 2 different transistors under test. 

Maybe in the coming months I'll work on this.....

Anyway if you are a fellow breadboard hater and would rather get this very simple differential op amp configuration on a thru-hole PCB, you can get the gerber, Eagle files, BOMs, PDF's etc. from PCBWAY's project page, here.

Coda 

I am curious: what happened to Bell Labs?  They got sold to Nokia. I didn't know that--you learn something every day. So much for American Ingenuity right? The trust busters broke up Bell in 1984, so the biggest monopoly we're left with are these guys.  Has Nokia made the transistor obsolete? Come up with a more popular programming language than C? Not yet. But! They have given the planet a ubiquitous ring tone

Al Fine 

In the immortal words of the Chambers Brothers: Time! Time to start wearing real shoes again. Time to shave every morning....time to go back to my 1.5+ hours a day work commute--after two years--wow.  

It was real, it was fun, but it wasn't real fun.

No comments:

Post a Comment

Anything to Clock Subcircuit

Readers:  If you want to build the project featured in today's post, please go to  PCBWAY's  Community pages --a gerber ready to dow...