DIY Audio Function Generator Part 1

6,302

Circuit Image

A simple low-end audio function generator is being designed to utilize a sine wave output for testing ADC resolution and as a baseband signal for RF projects, with an emphasis on achieving very low total harmonic distortion (THD). The approach taken involves starting with a sine wave generator based on the #327 Lamp Wien-bridge circuit to ensure low THD. This sine wave output will be fed into a comparator to generate a square wave, which will then control a ramp generator circuit. The ramp output is preferred over a triangle wave for flexibility in exploring various single and dual slope ADC concepts. Additionally, a +3.3V square wave output will be provided for connection to a frequency counter, eliminating the need for a separate display. The design includes a frequency adjustment potentiometer, a frequency range switch, a ramp current source adjustment potentiometer, and an output amplitude adjustment potentiometer. Initial tests of the Wien-bridge oscillator circuit have shown promising results, with selectable frequency ranges of 16Hz to 600Hz, 160Hz to 6kHz, and 1.6kHz to 60kHz, allowing for continuous frequency adjustments. It is noted that this lamp-based implementation requires a settling time after adjustments, which is acceptable given the goal of achieving a THD of 0.05% or lower.

The proposed audio function generator circuit will consist of several key components to achieve the desired performance characteristics. The heart of the generator is the Wien-bridge oscillator, which is known for its ability to produce low-distortion sine waves. The #327 lamp serves as a variable resistance element, allowing for the stabilization of amplitude and maintaining low THD. The output from the Wien-bridge oscillator will be fed into a comparator circuit, which will convert the sine wave into a square wave. This square wave will then trigger a ramp generator circuit, designed to produce a linear ramp output. This ramp waveform is advantageous for testing and evaluating various ADC configurations.

The frequency range switch will allow the user to select between three distinct frequency ranges, facilitating operation across a broad spectrum of applications. The inclusion of a 10K potentiometer enables fine-tuning of the output frequency within the selected range, providing flexibility for various testing scenarios. The ramp current source adjustment potentiometer will allow for precise control over the ramp rate, enabling experimentation with different ADC architectures, including single-slope and dual-slope designs.

To enhance usability, the circuit will also feature a +3.3V square wave output, which can be directly interfaced with a frequency counter. This feature negates the need for a dedicated display on the function generator, streamlining the overall design. The combination of these components and features is aimed at creating a versatile and effective audio function generator capable of meeting the requirements of low THD and operational flexibility for RF and ADC testing applications. The anticipated settling time after adjustments, while a consideration, is deemed an acceptable trade-off for the high-quality sine wave output that this design aims to deliver.A simple low end Audio Function Generator. I want to be able to use the Sine Wave output to test ADC resolution and as a base band signal for RF projects and having very Low Total-Harmonic-Distortion (THD) would be nice. So I`ve decided to build my own Function Generator. Most DIY Function Generators I found online start out with a Square Wave Oscillator feed into an integrator to get a triangle wave, then you feed the triangle wave into a wave shaper and you get a rough Sine Wave output. This is similar to a project I built up last year. This method works, but the wave shaped Sine wave isn`t going to have the low THD I was looking for, so I am taking the opposite approach and starting with a Sine Wave Generator based on the #327 Lamp Wien-bridge Circuit to get the low THD.

I`ll then feed that into a Comparator to produce the Square wave; I am then using the Square Wave to turn on/off a ramp generator circuit. I would rather have a ramp output vs a triangle wave. The ramp circuit will let me play around with different single & dual slope ADC concepts later on. I`ve added a +3. 3V Square wave output to be feed into a frequency counter, so I don`t need to bother to add a display to the function generator.

Mine as well make use of the Frequency counter I have for a display, also having a +3. 3V square wave output would be nice for any micro projects later on. I`ll have a Freq. Adjust Pot, Freq. Range switch, Ramp Current Source Adjustment Pot, and an Output Amplitude Adjustment potentiometer. Below is a rough layout of the proposed design: After sketching out the concept drawings my next step was to test the Wien-Bridge Oscillator circuit I was basing this whole design around. I prototyped up the circuit with the Frequency Range Select switch and 10K pot and was pleasantly surprised to see everything worked well.

The three switch selectable frequency ranges I have are: 16Hz to 600Hz, 160Hz to 6kHz, and 1. 6kHz to 60kHz with the 10K potentiometer adjusting the output frequency continuously through the ranges. The one downside with this Lamp based implementation is there is a settling time of several seconds needed after each major adjustment to allow time for the Lamp to thermally settle.

this is an ok tradeoff for me given I should be able to achieve very low 0. 05% or lower THD. 🔗 External reference