0%
0%

# LOCKDOWN: An open-source Analog Lock-In Amplifier

An open-source Analog Lock-In Amplifier
LOCKDOWN: LOCK-In Device for Observing Weak and Noisy signals

Similar projects worth following
4.3k views
LOCKDOWN is an open-source analog Lock-In Amplifier (LIA). A Lock-In Amplifier is an instrument that can measure very small signals even when they would be swamped by the noise.

What is a Lock-In Amplifier? A Lock-In Amplifier is an instrument that is capable of measuring extremely small signals even those below the noise floor!

Lock-In Amplifiers are used in a wide variety of applications:

From remotely detecting changes in Rat Neurons

Creating low cost Cancer screening technologies

Next generation battery research

To Quantum Dot based Quantum Computers

To even Superconductor Research

To see ours in action, check out this brief video:

How do they work?

Lock-In amplifiers use signal-processing tricks to simulate having an impossibly narrow filter to cut out the noise. Bandpass filters are described by how narrow they are as a function of their frequency. Q=(Center Frequency (in Hz))/(Band pass width (in Hz)). Generally, you can build practical filters with a Q factor of around 100 or so. But a Lock-In Amplifier can have a Q factor of 200,000 or more! 2 thousand times narrower! How can this be?

Well, Lock-In Amplifiers play a special trick! They shift the signal of interest down to DC, and it's very easy to build narrow filters at DC; just keep averaging! In fact, the Q factor at DC is zero! You can average for as long as you like to get an infinitely narrow filter (i.e., average for 10 seconds to get a 0.1Hz filter, 100 seconds for a 0.01Hz filter, etc...).

But how do they do this? by using some trigonometry. I hope you remember your trig identities! (don't worry no one does) If we multiply two sin waves, i.e.

We get the result;

A very special thing happens if x and y happen to be exactly the same! Our original signal splits in two, with half going to zero frequency (DC!) and the other half going way up in frequency (to twice the original frequency).

We can then use our trusty DC averaging filter to filter away the signal at 2x the original frequency and be left with a very narrow slice of the frequency spectrum right around the signal of interest!

Some smart-asses in the back are muttering about phase shifts and whatnot, well it turns out we can represent our sine wave as a vector on what's known as a Phasor Diagram (no unfortunately not a phaser, sigh). With a magnitude (or amplitude) and phase (or angle).

When we measure by multiplying the signal by a sin wave (0 deg phase) we are only measuring the X component of our signal, so all we do is measure again in the Y component (shifted by 90 degrees). This lets us calculate the amplitude (magnitude) of our signal, as well as it's angle!

Wait, why can't we just average a DC signal?

Well turns out that maintaining DC stability of voltages currents etc. without drifting at all is pretty challenging. It would also be easy for other DC effects to swamp the measurement and we can't remove them.

Consider the classic Lock-In experiment of driving an LED and measuring it in a photodiode. If we wanted to measure the LED's light output at 1 thousandth the brightness that we could see with our eyes or one millionth, in a brightly lit room it would be pretty challenging, trying to measure a delta of nanoamps on a milliamp signal is really hard. our output drifts by more than that if we move around the room.

But if we intentionally change the input signal to a sin wave we can "shift" it's frequency up and use our Lock-In amplifier to pick up just the signal from our LED!

Ok, so how do we make one?

Well, we need to feed the signal of interest into a multiplier, average the result and read it out. It's just that easy!

But wait you might say, where did sin and cos come from? and don't they have to be exactly the same frequency as our signal for this to work?

Well... turns out real systems are just a little bit more complex...

This is the system we designed! Chock full of Op-Amps.

Check out our blog posts on the circuit design!

It includes no less than 9 Op Amps, 4 old school clocked analog filters, three digi pots, and two analog multipliers and is capable of measuring signals with a...

### LOCKDOWN v1.0.0 TODO.txt

Known Issues

plain - 752.00 bytes - 06/07/2023 at 06:42

### LOCKDOWN PCB Altium Source.zip

x-zip-compressed - 4.77 MB - 06/06/2023 at 05:44

### LOCKDOWN v1.0.0.PDF

Adobe Portable Document Format - 3.91 MB - 06/06/2023 at 05:44

### LOCKDOWN Gerbers v1.0.zip

x-zip-compressed - 559.56 kB - 06/06/2023 at 05:42

### LOCKDOWN v1.0.0.xlsx

BOM

sheet - 19.29 kB - 06/06/2023 at 05:42

• ### How It's Made 1: Signal Input

Mark Omo05/27/2023 at 16:38 0 comments

The first part of our schematic consists of a tunable low pass filter and a tuned bandpass filter.

The very first part is the tunable low pass filter; it's used to remove frequency content above the frequency of interest and to prevent the aliasing of the filters.

It's a classic Sallen-Key filter, with an RC filter on the front and variables R1 and R2.

Sallen-Key filter (from Wikipedia):

First up is an auto-zero switch. It allows us to short the input to the signal chain and cancel out all our offset and gain terms from the system.

Next up is a DC block filter, Lock-In amplifiers don't operate on DC signals so getting rid of them early lets us accept signals with a lot of bias, and simplify our signal chain.

After that is our Low-Pass Filter. We used an AD8664 Op-Amp for the Sallen-Key filter; it's a low-noise part with plenty of bandwidth for our application. The bandwidth is critical for active filters, active filters can only reject signals out to the bandwidth of the op-amp, beyond that the op-amp can't react fast enough to counter signals. That's why we have a pre-filter to cut out signals that are far away from our signal.

We used AD5293 Digi-Pots for the variable resistors. The main advantage of these parts is that unlike other Digi-Pots with 20-30% or more variation of resistance, the AD5293 is calibrated to have better than 1% variation, allowing us to get a precise filter response.

Next up is our Tunable Band-Pass filter:

Traditionally tunable filters are very challenging and complex, especially over a very wide input range. But the LTC1068 is a very special kind of part, it's a Switched Capacitor Filter. Their filter coefficients are set by a clock input, switching charge into and out of very small matched capacitors on a chip. This lets us have a very precise filter response that is precisely controlled by a clock input.

The LTC1068 has four filter sections in a configuration known as a "State-Variable-Biquad". We can break down that term into two parts, "State-Variable" means that we can vary its operation (in this case with our clock input), and Biquad, which is a single seconds order filter, that can be hooked up to form any kind of filter.

Here is a block diagram of a filter section from the LTC1068's datasheet:

But how can switching capacitors let us realize a filter? (A great resource, paraphrased below is this PowerPoint by Dr. Jennifer Hasler at Georgia Tech) Well the first step is to realize that a capacitor switching back and forth can act just like a resistor:

The Capacitor will fill up with charge when connected to V1 and then dump that charge when connected to V2, transferring some charge. The rate at which it transfers charge is related to the size of the capacitor and how fast it's connected to V1 and then V2. And what do we call a transfer of charge? Current! It turns out the charge transfer is proportional to the switching frequency, capacitance, and difference in voltages. Resistance is just the Voltage difference over the charge per second. So switched capacitor has an equivalent resistance of:

The nifty thing is we can precisely change the equivalent resistance, and it does not have the disadvantage of drift and tolerance over time, especially if you cleverly use only the ratio of the resistances on an integrated circuit.

This allows us to construct a biquad filter section that can be tuned across a wide range of frequencies:

Resources:

Share

## Similar Projects

Project Owner Contributor

### Gamma PIN - Semiconductor Radiation Detector

Marcin Wachowiak

Project Owner Contributor

### Audio Equalizer

Lilia Lobato

Project Owner Contributor

### Know your place, trace! - Oscilloscope vs. Noise

RoGeorge

Project Owner Contributor

Ringo2k

# Does this project spark your interest?

Become a member to follow this project and never miss any updates