Thursday, October 31, 2024

Nano Ammeter

One of "self-explanatory" circuits in AoE2 is a nano-ammeter circuit; no explanation is given.  I doubt it is really self-explanatory to a beginner.

This circuit appears to originate from PMI's OP-41 datasheet.  (PMI is Precision Monolithics, Inc which later became a part of Analog Devices.)  OP-41 is a JFET input opamp with very low input bias (5pA @ 25C) in the inverting configuration as a logarithmic amplifier.  (OP-41 also tauts the excellent CMRR of over 100dB for a FET input opamp.)  Q1 and Q2 are matching transistors.  Their current ratio is the exponential of the difference in Vbe. If the difference in Vbe is proportional to the temperature, the current ratio is constant.  Since the Q1 base is grounded, the difference in Vbe is just the Q2 base voltage.  The resistor divider provides the Q2 base voltage that is proportionally to the temperature, as the bandgap reference subtracts the diode connected Q3 to produce a voltage is approximately proportional to Vt (although there is more complex 2nd order temperature dependency).   How good is the approximation?   We can run a Spice simulation stepping the temperature.  The Q3 current is about 65uA at -55C and 115uA at 125C and approximately linear  I (uA) ~ 0.28 * T (K) . 


The trimmer adjusts the full scale value of the current meter. 

Also the compensation network requires some explanation. OP-41 has a typical DC gain of 134dB and gain-bandwidth product of 500K.  That puts the dominant pole at about 0.1Hz.  A high order pole around 1MHz leads to a phase margin of about 77 degrees.  This is typical of an internal dominant pole compensated opamp.


Thursday, October 3, 2024

Quotes

"No one believes an analysis – except the person who did it.
Everyone believes a test – except the person who did it."
- ???

‘‘The best way to predict the future is to invent it.’’
 - Alan Kay

"... true knowledge can only be acquired piecemeal, by the patient interrogation of nature."
- Edmund Whittaker, A History of the Theories of Aether and Electricity

“Successful engineering is all about understanding how things break or fail.”
- Henry Petroski

"All science is either physics or stamp collecting."
- Ernest Rutherford

"The first time you go through the subject, you do not understand it at all. The second time, you think you understand it, except for one or two small points. The third time, you know that you do not understand it, but you are so used to the subject that it does not bother you anymore."
- Arnold Sommerfeld, about thermodynamics

"those who can, do; those who can't, teach."
George Bernard Shaw, Man and Superman

"engineering ... is the art of doing that well with one dollar, which any bungler can do with two after a fashion."
- Arthur M. Wellingtony, The Economic Theory of the Location of Railways

"Engineer - the man who can do for a reasonable cost what another would expend a fortune on"
- Rutherford Aris, Vector, Tensors and the Basic Equations of Fluid Mechanics 

“In God we trust. All others bring data.”
- Bo Lojek, History of Semiconductor Engineering

"Research is when you don't know what you're doing."
- ??? 

The cheapest, fastest, and most reliable components are those that aren’t there.
- C. Gordon Bell

"When you test you find something is wrong."
- Donald Trump (May 14, 2020)

I would rather have a general who was lucky than one who was good.

- Napoleon Bonaparte

"Perfect is the Enemy of Good Enough"
- Eric Johns (October 1988), U.S. Naval Institute Proceedings: 37

“If an expert says something can be done he is probably correct, but if he says it is impossible then consider getting another opinion.”
- Richard Hamming, The Art of Doing Science and Engineering 

People who are really serious about software should make their own hardware.
- Alan Kay

The management question, therefore, is not whether to build a pilot system and throw it away. You will do that. […] Hence plan to throw one away; you will, anyhow.
- Brooks, The Mythical Man Month (Page 116)

Brooks's Law: 
Adding manpower to a late software project makes it later.
 - Brooks, The Mythical Man Month

... this was going to be one of these Onion Syndrome deals - you peel off a couple layers, and cry; then you peel off a couple more layers, and cry some more.
- Bob Pease, What's All This Ground Noise Stuff, Anyhow?

Thinking is recommended. Heck, thinking is required.
- Bob Pease, Troubleshooting Analog Circuits

... a little known tenet of precision op amp circuits: Williams's Rule.  Williams's Rule is simple: always invert (except when you can't).
- Jim Williams, Analog Circuit Design: Art, Science, and Personalities


"Any idiot can count to ONE ..."
- Quoted by Samuel Wilensky in Analog Circuit Design: Art, Science, and Personalities
(maybe attributed to Bob Wildar)

Anyone can build a bridge that stands up, but only an engineer can build a bridge that just barely stands up.
- ????

In real estate, it is location, location, location.  In mathematics, it is notation, notation, notation.
- ????

In software, debugging is harder than writing code.  If you write the code as clever as you can, then you are not smart enough to debug it.
- ????

... where there is no confusion there is no prestige.
-Linderholm, Mathematics Made Difficult

All problems in computer science can be solved by another level of indirection, except for the problem of too many layers of indirection.
-????

... practicing what was called "the mushroom theory of management." ... defined it as follows: "Put 'em in the dark, feed 'em shit, and watch 'em grow."
- Tracy Kidder, The Soul of A New Machine


Hardware eventually fails. Software eventually works.
-Michael Hartung

Sunday, September 29, 2024

Common Emitter Frequency Response using EET

Even the simple common emitter circuit can result in some pretty complicated expression for the frequency response. The inclusion of a single element, the base-collector capacitance, introduces much complexity.  This circuit is analyzed in detail by most of the textbooks, including Gray & Meyer's.  None of them makes use the EET.  We give a derivation using Middlebrook's EET to see if the analysis is simplified.


 We work out the factor involving Cf,


This is a little bit less work than the more direct method,

The two methods produce the same expression, so using EET does not give more insight.  

The base-collector capacitor results in an additional pole and a right-hand side zero and shifts the dominant pole.  The dominant pole can be approximated from the input capacitance and the Miller capacitance.


Wednesday, September 25, 2024

Useful Circuits with Two Transistors

The preeminent circuit designer Barrie Gilbert asks "How many distinctly different and really useful circuits can be made with two transistors, anyway?"  and his answer "about twenty-four" (Williams, Analog Circuit Design, p179).  Let's see what they might be.  It is perhaps subjective to tell what is useful or different.  Also what type transistors, BJT, JFET, MOSFET?  Same circuit configuration with different type of transistors should not be considered distinct. What about other circuit elements?  Assume the passives, resistors, capacitors, inductors, are OK, but what about diodes? And what about a multi-emitter/collector transistor or a dual-gate MOSFET?  Is it considered one transistor or multiple transistors?

A single transistor has three basic amplifier configurations; it can also be configured as a diode, and the emitter-base junction also makes a somewhat usable Zener diode.  A JFET makes a good current source (current regulating diode).



Monday, September 23, 2024

Input Impedance of a Bipolar Transistor Bias with Feedback

AoE shows a bipolar transistor bias circuit using feedback from the collector.  AoE2 and AoE3 show the identical circuit, but they differ in the values of the input impedance: AoE2 states 300 Ohms and AoE3 200 Ohms.  We would like to analyze the circuit to see why the value has changed.  Here the base bias is established by a resistor from the collector, which has the effect of negative feedback: a high bias lowers the collector voltage that reduces the base voltage.  


Here we estimate the collector current to be about 1mA.  The input impedance is about 200 Ohms for a beta of 100; it does not exceed 225 Ohms as the beta goes to infinity.  So it seems justified that AoE3 makes the correction.   Even when the temperature varies, the input resistance stays relative constant.  For example, if T = 100C, VT = kT/q = 32mV, but because Vbe decreases with increasing temperature, the emitter current also goes up, Vbe = 0.4V, Ie = 1.34mA, gm is still around 1/25 A/V.


Wednesday, September 18, 2024

N Light Switches

AoE2 has an exercise asking readers to wire up N switches that any one of the switches can turn on or off a light bulb.   It comments that every electrician knows how to do this, but few electronic circuit designers do.  Given the hint that it requires 2 SPDT and N-2 DPDT switches, it is not hard to do.


This exercise is retained in AoE3.

Tuesday, September 17, 2024

A Current Source Circuit from AoE-X

H&H show a clever current source circuit and challenge readers to prove the circuit works especially without using two of the constraints.

It is a circuit of an opamp driving a bipolar transistor.  The base current of the bipolar transistor would normally cause an error.  Here the error is compensated.  The base current is sensed with the base resistor kR1; the emitter voltage is Vin with the differential voltage added using a circuit configuration resembling a difference amplifier.

Note that the current through R1 is the sum of the collector current, the base current and the current through R2, which the last two are the current through kR1.  The derivation makes no use of the constraints on the resistors.  The base current compensation is strictly accurate (assuming ideal opamp).