Tone generator problem

AnalogKid

Joined Aug 1, 2013
12,169
Will a square wave signal be adequate for the project, or do you need a sine wave. A low-quality sine wave, such as from a phase shift oscillator, will be much cleaner than a square wave even with filtering.

However, at 15 kHz, the first square wave harmonic is the third, at 45 kHz. Your speaker cannot reproduce that, and you cannot hear it, so you might be ok with a 555 circuit followed by a small speaker driver such as an LM386.

Here is the schematic for a 555 oscillator that is adjustable, yet makes a 50/50 square wave output at all frequencies. Add a variable resistor in series with R1, and select the two resistor values to get a reasonable adjustment range.

ak

LM555 50 duty cycle.PNG
 

Audioguru again

Joined Oct 21, 2019
6,826
The output voltage of an original old bipolar 555 is not symmetrical so the oscillator does not produce 50/50 squarewaves. A newer Cmos 555 is symmetrical when not overloaded.

I made a variable frequency sinewave oscillator with a digital stepped "sinewave" made from a digital counter IC that is filtered with a Cmos switched capacitor Butterworth lowpass filter IC. The variable frequency clock for making the steps is the same as the clock for setting the cutoff frequency of the filter. The level is constant over a wide range of frequencies and the distortion is extremely low.
 

atferrari

Joined Jan 6, 2004
5,016
The output voltage of an original old bipolar 555 is not symmetrical so the oscillator does not produce 50/50 squarewaves. A newer Cmos 555 is symmetrical when not overloaded.

I made a variable frequency sinewave oscillator with a digital stepped "sinewave" made from a digital counter IC that is filtered with a Cmos switched capacitor Butterworth lowpass filter IC. The variable frequency clock for making the steps is the same as the clock for setting the cutoff frequency of the filter. The level is constant over a wide range of frequencies and the distortion is extremely low.
Used the same in a dual oscillator controlled by a 16F84A, long time ago.
 

Ian0

Joined Aug 7, 2020
13,158
I made a variable frequency sinewave oscillator with a digital stepped "sinewave" made from a digital counter IC that is filtered with a Cmos switched capacitor Butterworth lowpass filter IC. The variable frequency clock for making the steps is the same as the clock for setting the cutoff frequency of the filter. The level is constant over a wide range of frequencies and the distortion is extremely low.
Here’s the paper.
https://www.tinaja.com/glib/rad_elec/digital_sinewaves_11_76.pdf
Any number of stages can be used but 5 is popular as the CD4018 does all the logic for you.
For a fixed frequency output a two pole low pass analogue filter is all that is needed, because the digital part of it gets rid of the low frequency harmonics, leaving the filter only 9th and upwards to deal with.
 

Ian0

Joined Aug 7, 2020
13,158
The digital sinewaves article is "only" 45 years old. Wasn't it printed in RE which was Radio Electronics magazine?
I've been aware of it for decades, but had never seen the original paper. I had always thought it was a bit of a gimmick until you mentioned it a couple of months ago, which prompted me to find the original.
I assumed it would work with different numbers of stages, but never knew how to calculate the resistors. Everyone seems to use 5 stages as it corresponds to the CD4018.
It's a pity there isn't a 74HC4018, as the higher speed and lower output impedance would be advantageous. I'm thinking of a 74HC175 and half a 74HC74 to make a fully differential version.
 
Top