Negative Impedance Converters

“Negative resistance” may seem like a purely academic concept, but can be easily realized in practice with a handful of common components. By adding a single resistor to a standard non-inverting op amp circuit, we can create a negative impedance converter, which has applications in load cancellation, oscillator circuits, and more.

Derivation of NIC Input Impedance

Here we will derive the input resistance of the following Negative Impedance Converter (NIC) and show that it is equal to:

$$\mathbf{R}_{IN} = \mathbf{-} \frac{\mathbf{R}_{1}\mathbf{R}_{3}}{\mathbf{R}_{2}}\\$$

Negative Impedance Converter (NIC)

The applied input voltage, Vin, causes some resulting current, I1. If we can predict I1 for a given Vin, then we can use Ohm’s law to calculate the effective resistance, Rin, seen by the voltage source at Vin.

No current flows into an (ideal) op amp’s inputs, so all of current I1 must pass through resistor R1.

Applying Ohm’s law, the I1 current is equal to the voltage drop across R1 divided by its resistance:

$$\mathbf{I}_{1} = \frac{\mathbf{V}_{IN} – \mathbf{V}_{OUT}}{\mathbf{R}_{1}} \tag{1}\\$$

Knowing that the op amp is in a non-inverting configuration, and assuming an ideal voltage source for Vin, we know that the output voltage Vout is:

$$\mathbf{V}_{OUT} = \mathbf{V}_{IN} (1 + \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}}) \tag{2}\\$$

Substituting equation #2 into equation #1, we can factor Vin out of the numerator and simplify:

$$\mathbf{I}_{1} = \frac{\mathbf{V}_{IN} – \mathbf{V}_{IN} (1 + \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}})}{\mathbf{R}_{1}} \tag{3}\\$$

$$\mathbf{I}_{1} = \frac{\mathbf{V}_{IN} [1 – 1 (1 + \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}})]}{\mathbf{R}_{1}} \tag{4}\\$$

$$\mathbf{I}_{1} = \frac{\mathbf{V}_{IN} [1 – (1 + \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}})]}{\mathbf{R}_{1}} \tag{5}\\$$

$$\mathbf{I}_{1} = \frac{\mathbf{V}_{IN} [1 – 1 – \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}}]}{\mathbf{R}_{1}} \tag{6}\\$$

$$\mathbf{I}_{1} = \frac{-\mathbf{V}_{IN} \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}}}{\mathbf{R}_{1}} \tag{7}\\$$

We can now divide both sides by Vin and simplify the complex fraction on the right-hand side of the equation:

$$\frac{\mathbf{I}_{1}}{\mathbf{V}_{IN}} = \frac{- \frac{\mathbf{R}_{2}}{\mathbf{R}_{3}}}{\mathbf{R}_{1}} \tag{8}\\$$

$$\frac{\mathbf{I}_{1}}{\mathbf{V}_{IN}} = \mathbf{-} \frac{\mathbf{R}_{2}}{\mathbf{R}_{1}\mathbf{R}_{3}} \tag{9}\\$$

Since Ohm’s law defines resistance as voltage divided by current, we just have to flip both sides of the equation to finally arrive at:

$$\mathbf{R}_{IN} = \frac{\mathbf{V}_{IN}}{\mathbf{I}_{1}} = \mathbf{-} \frac{\mathbf{R}_{1}\mathbf{R}_{3}}{\mathbf{R}_{2}} \tag{10}\\$$

This is the input resistance seen looking into the input of the NIC circuit.
If R2 and R3 are made equal to each other, the input resistance is simply equal to -R1.
If R1 and R2 are made equal to each other, the input resistance is simply equal to -R3.

Description Reference
Negative Impedance Converters Negative Impedance Converter, Wikipedia
Use of NIC as an active load Negative Resistor Cancels Op Amp Load, Maxim Application Note 1868
Chua chaotic oscillator Improved Implementation of Chua’s Chaotic Oscillator Using Current Feedback Op Amp, A.S. Elwakil & M.P. Kennedy
The use of impedance converters in active filters The Filter Wizard
issue 18: Gee, I see! The Ins and Outs of Generalized Impedance Converters
, Kendall Castor-Perry

Practical RF Filter Design

RF filter design is a piece of cake these days thanks to computer design and simulation tools. But actually realizing the simulated filter response in the real world can be a completely different matter! This video provides an introduction to practical RF filter design by building, testing, and tweaking a 137MHz bandpass filter suitable for NOAA APT satellite reception.

Description Reference
Designing a high-Q VHF bandpass filter A VHF Bandpass Filter for the QST Spectrum Analyzer, Wes Hayward, W7ZOI
Enameled wire capacitors Capacitance of a Wire Above a Foil, Wes Hayward, W7ZOI
Tutorial on double tuned bandpass filters The Double-Tuned Filter: An Experimenter’s Tutorial, Wes Hayward, W7ZOI
Air core inductor Q The Elusive Q of Single-Layer Air-Core Coils, George Murphey

A Voice Activated Light Switch

Build fun circuits! Impress your friends! (Or at least the ones who aren’t in-the-know ðŸ˜‰ )

With some inspiration from The Fifth Element and Iron Man, here’s a voice-activated light switch that provides the illusion of a more advanced artificial intelligence, with the simplicity of “the clapper”.

Schematics and board design files are available on the github project page.

Revisiting the MHS5200A

I’ve gotten a lot of questions on the blog about the new version of the MHS5200A function generators available on eBay. Viewer Tolga was kind enough to send one in to me to review and tear down. Although some improvements have been made over the older models, there are some concerning issues with these new models too!

Photodiode Amplifier Design

I recently designed an infrared sensor board (dubbed “IRis”) for my friend’s Defcon talk. This video walks through the circuit design of the photodiode amplifier, and discusses some of the pitfalls associated with photodiode amplifier design.

Schematics, BOM, and KiCAD design files for the described IRis board are available on github.

Description Reference
The bible of photodiode amplifier design Photodiode Amplifiers: Op Amp Solutions, Jerald Graeme
Good overview of photodiode design concerns Common Photodiode Op-Amp Circuit Problems and Solutions, Digi-Key
Excellent photodiode amplifier reference design Photodiode Amplifier Reference Design, Texas Instruments, John Caldwell
Bob Pease’s musings on transimpedance amplifiers What’s All This Transimpedance Amplifier Stuff Anyhow?, Bob Pease
JFETs as ultra-low leakage diodes Current Sources and Voltage References, Linden T. Harrison, Chapter 6.6

Crystal Motional Parameters

Ever tried searching through your datasheets for the motional parameters of that quartz crystal you just bought? Good luck! Vendors simply don’t specify these parameters to general end users, and for most applications that’s OK. But for high Q oscillator and filter design, measuring and matching crystals can be important.

This video discusses crystal motional parameters, how to measure them with a crystal impedance meter, and finally examines the measured values of 150+ real world crystals.

Below are some interesting correlations/statistics gathered from the measured data; raw measurement data is available here.

Average C0 capacitance for each crystal holder type

Average motional resistance vs frequency

Average motional inductance vs frequency

Average unloaded Q for each crystal holder type

Overall statistical analysis of unloaded crystal Qs

Description Reference
Crystal motional parameters and relevant equations Understanding Quartz Crystals and Oscillators, Ramon M. Cerda, Chapter 1.27
Measuring quartz crystal parameters Measurement of the equivalent circuit of a quartz crystal, Omicron Lab
Crystal measurements with a VNA Crystal Bandpass Filters, W0QE
Crystal measurements with a Spectrum Analyzer Crystal Parameters — Experiments with a Tracking Generator + Spectrum Analyzer, QRP HomeBuilder
Comparison of crystal measurement techniques Crystal Motional Parameters: A Comparison of Measurement Approaches, Jack R. Smith, K8ZOA
Crystal test fixture design Assembly and Usage Notes for K8ZOA Crystal Test Fixture Revised for Version 1.2 PCB, Jack R. Smith, K8ZOA

Analog Computing: Shortest Path

Inspired by Micah Scott’s recent tweets on analog computing and maze solvers, here is an analog computer that solves the shortest path between two points in multi-path maze. All you need are some LEDs and a current source!

Description Reference
Maze solving with helium gas Glow discharge in microfluidic chips for visible analog
computing
, Darwin R. Reyes, Moustafa M. Ghanem, George M. Whitesides and Andreas Manz, Harvard University
Maze solving with hexyldecanoic acid Maze Solving Using Fatty Acid Chemistry, Kohta Suzuno, Istvan Lagzi, et al
Bob Pease on analog computers What’s All This Analog Computing Stuff, Anyhow?, The Bob Pease Show
Analog computing lecture High performance/low power computing based on the analog computing paradigm, Bernd Ulmann, SIGINT 2013
Classic text on analog computers Electronic Analog Computers, Granino & Theresa Korn

Building a Better RTL-SDR TCXO

Its hard to beat the cost and versatility of the ubiquitous RTL-SDR dongles, but the temperature stability of their reference oscillators isn’t sufficient for some applications. While the internal 28.8MHz quartz crystal in these units can be replaced by a high quality temperature compensated oscillator, these tend to be relatively expensive and/or difficult to source.

Here’s a scratch-built 28.8MHz TCXO capable of +-1ppm stability from 0C-55C; best of all, it’s not only easy to build, but is designed entirely from readily available and inexpensive components. For improved temperature stability, the main oscillator can even be replaced with one of many commercially available TCXOs!

UPDATE: Elia has kindly designed a PCB for this circuit, using a commercially available TCXO. Now available from OSHPark!

28.8MHz TCXO schematic diagram

TCXO f-T curve

Description Reference
Oscillator temperature compensation techniques Design Technique for Analog Temperature Compensation of Crystal Oscillators, Mark A. Haney, Virginia Polytechnic Institute
TXCO tutorial Tutorial on TCXOs, Vectron International
R820T datasheet R820T: High Performance Low Power Advanced Digital TV Silicon Tuner, Rafael Microelectronics
Guide to proper toroid selection Iron Power Cores for High Q Inductors, Jim Cox, Micrometals, Inc.

Oscillator Simulation and Design

Today we explore the use of oscillator synthesis software (Genesys) for practical crystal oscillator design, and the impact of the Randall-Hock correction formula on linear open loop analysis accuracy.

Description Reference
Oscillator synthesis/simulation software Genesys, Keysight Technologies
Randall and Hock’s IEEE paper (no paywall) General oscillator characterization using linear open-loop S-parameters, Mitch Randall, Terry Hock
Application of the Randall-Hock correction formula in oscillator synthesis Discrete Oscillator Design, Chapter 1.2.1.5, Randall W. Rhea
Randall Rhea’s oscillator design webinar Discrete Oscillator Design Tools and Techniques, Randall W. Rhea, presented by Keysight Technologies
Effects of S11 and S22 on oscillator loop gain Practical RF Circuit Design for Modern Wireless Systems, Vol. 2, Chapter 6.2, Rowan Gilmore, Les Besser
Evaluating and optimizing oscillator performance using Genesys simulation Improving the Vackar Oscillator, QRP Quarterly, Volume 56 Number 1, January 2015, p.20, David White (WN5Y)

A 100kHz Zero Droop Peak Detector

Here’s an inexpensive precision peak detector circuit that accurately tracks the peak voltage of input signals at frequencies up to 100kHz and has zero voltage droop over an indefinite period of time…no microcontrollers required!

The following circuit uses a dual comparator, three op amps, and a digital potentiometer to provide two peak detection outputs: one “real-time” peak output, accurate to within 2% for input signals up to 100kHz, and one maximum peak output which outputs the maximum peak voltage seen since the last reset:

Precision zero-droop 100kHz peak detector circuit