1 KHz Synchronous Detector using AVR microcontroller

Summary of 1 KHz Synchronous Detector using AVR microcontroller


This article describes a synchronous demodulator circuit using an AVR microcontroller to isolate 1 kHz signals from noise, measuring amplitude at 60 microvolts per count via RS-232. With an LM324 preamplifier, sensitivity reaches 160 nanovolts per count. The system multiplies the input signal with a synchronized local oscillator square wave and integrates the result to extract the DC component of the target frequency.

Parts used in the 1 KHz Synchronous Detector:

  • AVR microcontroller
  • LM324 operational amplifier (preamp)
  • U2A buffer amplifier
  • U2B inverting amplifier
  • U3A switch for integrator control
  • U3B switch for inverted integrator control
  • U2C integrator circuit
  • 100k resistor
  • .047 uf integrating capacitor
  • LED indicator
  • RS-232 interface module

Downloads:

Assembler source  deco030511C.asm
AVR Studio hex file is deco030511C.hex     

Overview

This circuit employs a synchronous demodulator to separate a 1 KHz signal from noise and measures  the amplitude of the 1 kHz signals once a second at about 60 microvolts per count then sends the measurements via an RS-232 interface for further processing or display. An LED on the board also lights when the measured signal exceeds a preset threshold.

This experiment was started when I took an interest in receiving ELF wireless signals. It also has applictions in optics and high frequency RF, or for that matter, any place one needs to measure a tiny signal, of which the frequency and phase are known, in the presence of noise.

With the addition of a preamplifier based on the LM324, the sensitivity of this circuit was easily extended to a sensitivity to 160 nanovolts per count. That an LM324 is used with little in the way of noise on the output testifies to the value of using this kind of detector.

Detector

How it works

The detector is a multiplier fillowed by an integrator.
A single slope analog to digital conversion process measures the
detected signal with 7 bit resolution.
There are several sophisticated references on the web that describe how synchronous detectors work, so here I will only give a light overview and go into some specifics of this implementation.

The idea is to multiply the input signal by the output of a local oscillator that is synchronized with the expected signal, and integrate the result. Imagine a square wave being fed into the signal input of the multiplier and a synchronized square wave being fed into the local oscillator  input of the multiplier. If the local oscillator is synchronized such that they are perfectly matched in phase, then the output of the multiplier will be positive when the incoming signal and the local oscillator are positive and the output will also be positive when the inputs are negative (negative x negative = positive) this is actually a full wave rectifier when both signals are synchronized and in the proper phase with one another.

In theory, signals at the proper frequency are presented as DC to the integrator and all other frequencies average out to zero. In practice, this circuituses square waves to perform the modulation, so it is susceptible to odd harmonics of the sampling frequency, so it is sensitive to 3 kHz, 5 kHz, 7 kHz…, so an analog filter ahead of the detector can be useful if it is important to reject these frequencies.

The circuit

The incoming signal is buffered by U2A (there is on U1 in this schematic as U1 was moved to a separate preamp assembly), which provides a noniverted signal to the integrator when U3A is switched on. U2B inverts the buffered signal from U2A and provides an inverted version of the signal to the integrator when U3B is switched on. To increase the charging rate, either decrease the 100k resistor on the input of U2C or decrease the .047 uf integrating capacitor.

For more detail: 1 KHz Synchronous Detector using AVR microcontroller

Quick Solutions to Questions related to 1 KHz Synchronous Detector:

  • How does the detector separate the signal from noise?
    The detector uses a multiplier followed by an integrator to multiply the input signal by a synchronized local oscillator square wave.
  • Can the sensitivity be improved beyond the base level?
    Yes, adding a preamplifier based on the LM324 extends sensitivity to 160 nanovolts per count.
  • What resolution does the analog to digital conversion process have?
    The single slope analog to digital conversion process measures the detected signal with 7 bit resolution.
  • Does the circuit reject frequencies other than 1 kHz?
    In theory yes, but in practice it is susceptible to odd harmonics like 3 kHz, 5 kHz, and 7 kHz unless an analog filter is added.
  • How can the charging rate of the integrator be increased?
    You can decrease the 100k resistor on the input of U2C or decrease the .047 uf integrating capacitor.
  • What happens when the measured signal exceeds the threshold?
    An LED on the board lights up when the measured signal exceeds a preset threshold.
  • Is this project suitable for measuring optical signals?
    Yes, the circuit has applications in optics and high frequency RF where tiny signals with known frequency and phase must be measured.
  • What role does U2A play in the circuit?
    U2A buffers the incoming signal and provides a noninverted signal to the integrator when U3A is switched on.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top