Implementing Digital Lock-In Amplifiers
Lock-in amplifiers use phase-sensitive detection to measure the presence of small signals buried in large amounts of noise. By measuring the coherent system response from an incoming AC signal, the digital lock-in amplifier can detect even minute changes. Both magnitude and phase can be used to characterize the system.
Conventionally, lock-in amplifiers use complicated (and expensive) analog circuitry to perform the phase sensitive detection and filtering. However, modern Digital Signal Controllers (DSCs), such as the dsPIC30F and dsPIC33F families, can be used to remove large amounts of the analog circuitry by performing the necessary operations in software. This capability provides a number of additional benefits including increased reliability, resistance to temperature and aging effects, and the ease with which the system can be modified in the field. By using the built-in signal processing capabilities of the dsPIC33F, it is possible to perform high-speed, high-accuracy measurements on sensors such as strain gauges. The same technique can be applied to other noisy systems such as capacitive sensors or the measurement of modulated light levels.
While the basic process is conceptually simple, there are a number of possible ways of implementing it in a microcontroller, and the implementation details are frequently missing from existing published material.
This application note provides information on practical ways in which a digital lock-in amplifier can be implemented in software using the dsPIC33FJ256GP710 on an Explorer 16 board.