The basic idea of the bandgap reference is to obtain a low temperature coefficient voltage source by cancelling the negative temperature coefficient of the diode forward voltage with the positive temperature coefficient of differential $V_{be}$. The difference of the $V_{be}$ of two different size but otherwise identical bipolar transistors is $\Delta V_{be} = k T /q \ln \eta$ (PTAT), where $\eta$ is the current density ratio, k=1.38e-23, q=1.6e-19. The diode voltage tempco is about -2mV/°C; to match that, $k/q \ln \eta $ = 2m, so $\Delta V_{be}$ = 600mV at the room temp. And the diode voltage at the room temp is also about 600mV. So the output is about 1.2V, which they say is close to the silicon bandgap voltage (1.166V at 0K). But the essential scheme does not really seem to depend on it.
EEssential
Electrical Engineering Essentials
Tuesday, December 10, 2024
Bandgap Reference
The basic idea of the bandgap reference is to obtain a low temperature coefficient voltage source by cancelling the negative temperature coefficient of the diode forward voltage with the positive temperature coefficient of differential $V_{be}$. The difference of the $V_{be}$ of two different size but otherwise identical bipolar transistors is $\Delta V_{be} = k T /q \ln \eta$ (PTAT), where $\eta$ is the current density ratio, k=1.38e-23, q=1.6e-19. The diode voltage tempco is about -2mV/°C; to match that, $k/q \ln \eta $ = 2m, so $\Delta V_{be}$ = 600mV at the room temp. And the diode voltage at the room temp is also about 600mV. So the output is about 1.2V, which they say is close to the silicon bandgap voltage (1.166V at 0K). But the essential scheme does not really seem to depend on it.
Thursday, December 5, 2024
Logarithmic Amplifier Compensation
A logarithmic amplifier is based on the exponential relationship between the collector current and the base-emitter voltage. It is also an opamp circuit that has a gain in the feedback path, so a unit-gain stable opamp may not be stable. It is necessary to add phase compensation.
Here is the simple logarithmic amplifier circuit and we derive the loop gain,
We will use OP-41 as the opamp. OP-41 has a typical DC gain of 134dB and gain-bandwidth product of 500K (ω1 = 3e6). That puts the dominant pole at about 0.1Hz. A high order pole above 1MHz leads to a phase margin of about 77 degrees. This is typical of an internal dominant pole compensated opamp. As we can see the loop gain plot is shifted up, the phase margin is reduced.
We place a capacitor across the collector and the emitter as compensation. The capacitor adds a lag network.Tuesday, December 3, 2024
Pen Drawing Tablet
XP-Pen Star G640 drawing tablet, 6x4", 8192 pressure levels, battery free stylus with two push buttons, resolution of 5080 LPI, for $25
It works on the electromagnetic induction principle.
From the teardowns that other people have shown on the internet, the stylus is entirely passive with a coil and capacitors, that would exclude any encoding scheme. The working hypothesis is that the tablet will transmit a signal to excite the LC tank, the LC tank oscillates and signals get picked up by the tablet. The working area of the tablet is a PCB with horizontal and vertical traces. The position of the stylus is calculated perhaps by centroiding on the signal strength.
The pressure level is transmitted probably by frequency modulation. There is a ferrite on the rod that the nib is attached and the rod is pushed on a spring. The pressure on the nib moves the ferrite relative to the coil, changing the resonant frequency. And pressing the button connects additional capacitor to the tank, also altering the frequency.
We will try to verify the working principle without disassembling the stylus or the tablet. We will use a simple wire loop to pick up the signals.
Without the stylus on the tablet, we pick up some signal from the tablet. It is possibly just a 500KHz square wave ac-coupled.
When the pen is on the tablet, we see the oscillating LC signal.
We can take a close look at the frequency of the oscillation,
We will design a frequency to voltage conversion circuit to extract the pressure level in a future blog.
The stylus is detected with the tip about 1cm above the tablet; there is some hysteresis on that distance. Placing the stylus flat lengthwise on the tablet does not work, but vertically flat widthwise works. This is a little curious; perhaps the excitation is only generate by traces in one direction. It may be a deliberate design choice, because the stylus can be left on the tablet without affecting other pointing devices.
When we place a ferrite toroid around the stylus, the tablet can register button clicks with buttons being click. This implies that the presence of the ferrite toroid lowers the resonant frequency to be in the range of that of button click.
Thursday, November 21, 2024
NVMe on Raspberry Pi 5
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) .
Also the compensation network requires some explanation, which is deferred to a separate discussion.
Thursday, October 3, 2024
Quotes
- C. Gordon Bell
I would rather have a general who was lucky than one who was good.
“If an expert says something can be done he is probably correct, but if he says it is impossible then consider getting another opinion.”
People who are really serious about software should make their own hardware.
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.
Adding manpower to a late software project makes it later.
All problems in computer science can be solved by another level of indirection, except for the problem of too many layers of indirection.
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.
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.