2
\$\begingroup\$

We are trying to produce a sound wave with speaker. We also need to be able to control the frequency (we don't have specific numbers, about 50-500Hz).

As far as we are concerned we are looking for a function generator or a VCO (voltage-controlled oscillator). We would love to know which specific component we need.

We will synchronize this sound wave's frequency with another timer controlling an electromagnet; information about this connection will also be helpful.

Please take into mind that I don't have much electronic knowledge (learning physics in school, including electromagnetism).

EDIT: What we are actually trying to achieve is to make two sine sound waves. One is constant and the other can be changed by hand with a potentiometer or so. For example if the constant is 440Hz, the other can be changed between 170Hz to 270Hz or something similar. Another timer will turn on and off an electromagnet, it will be turned on and off with a frequency linear to the changing sound wave's frequency.

Thank you

\$\endgroup\$
  • \$\begingroup\$ What is the purpose of this? \$\endgroup\$ – starblue Feb 4 '12 at 12:09
  • \$\begingroup\$ What kind of sound wave? Do you want a sine wave, square wave, triangle wave, ...? How exactly do you want to control/sync the frequency - by hand (e.g. potentiometer) or light/sound or...? \$\endgroup\$ – Oli Glaser Feb 4 '12 at 12:20
  • \$\begingroup\$ I have edited to message. I need a sine wave which can be changed by a potentiometer or something similar... \$\endgroup\$ – Someonation Feb 4 '12 at 12:33
3
\$\begingroup\$

For a low distortion audio sinewave, the Wien Bridge oscillator is widely used:

Wien Bridge Oscillator

The RC filters provide a 0 degree phase shift at the desired frequency providing positive feedback to keep the oscillation going. You can think of them like a high pass filter followed by low pass filter to give a bandpass response.

The negative feedback needs an exact gain of 3. Since component values vary in practice, we can't just use two resistors, we need an AGC (automatic gain control) In the circuit shown this is achieved using the lamp as the bottom of the resistive divider. The lamp is like a resistor with a PTC (positive thermal coefficient) or a PTC thermistor. So when the voltage rises on the output, the lamp heats up and the resistance rises. This causes the voltage drop across it to rise and more negative feedback to be applied to the opamp inverting input, therefore reducing the gain and keeping the circuit stable.

The frequency is controlled with a dual gang pot (VR1A and VR1B)
The circuit shown should give from ~145Hz to ~1590Hz. Obviously you can adjust the component values to give different ranges. The formula is: f = 1/(2 * pi * R * C) with R1 = R2 and C1 = C2.
So for the pot at max (100k + 10k) we get:
1 / (6.28 * 10e-9 * 110e3) = 144Hz
and with the 100k pot at minimum (10k) we get:
1 / (6.28 * 10e-9 * 10e3) = 1592Hz

ESP has a some good info on audio oscillators and plenty of example circuits.

The other option if you are familiar with microcontrollers is digital synthesis. You can get far more control but you need a quality DAC to give comparable THD to the circuit above.
I made a little audio test oscillator which gave excellent results from a dsPIC33FJ64GP802 which has 2 good quality 16-bit audio DACs onboard. Simply feed the outputs into an opamp (and write the code of course)
There are also function generator ICs out there that could do the job, have a look on Mouser, Farnell, etc. You could also add a (preferably quite sharp) low pass filter to Russell's 555 circuit to give you your sine wave if you don't mind a bit of extra distortion.

\$\endgroup\$
1
\$\begingroup\$

There are many ways of doing this.
To be sure that the solution meets your requirement completely it wi=ould be usful if you can tell us as much as possible about what you are trying to do.

A common and cheap way of producing a voltage controlled oscillator that can drive a speaker is to use a "555" counter-timer IC. A circui which does this is shown below. While this will work as show, if we know your actual requirement in more detail, ut may be possible to modify the circuit to better meet your need.
This circuit is from here

enter image description here


The functionally identical circuit may also be found here
I included this circuit as well as the text has some better explanation about the control voltage effect, and you can see by comparing the two diagrams that varying the potentiometer has the same effect as varying the external control voltage.

enter image description here


NE555 pricing here - $US0.42 in 1;s.

NE555 datasheet here

They say:

Features

■ Low turn-off time
■ Maximum operating frequency greater than 500 kHz
■ Timing from microseconds to hours
■ Operates in both astable and monostable modes
■ Output can source or sink up to 200 mA
■ Adjustable duty cycle
■ TTL compatible
■ Temperature stability of 0.005% per °C

Description

  • The NE555, SA555, and SE555 monolithic timing circuits are highly stable controllers capable of producing accurate time delays or oscillation.

    In the time delay mode of operation, the time is precisely controlled by one external resistor and capacitor.

    For a stable operation as an oscillator, the free running frequency and the duty cycle are both accurately controlled with two external resistors and one capacitor.

    The circuit may be triggered and reset on falling waveforms, and the output structure can source or sink up to 200 mA

\$\endgroup\$
  • \$\begingroup\$ Thanks for the comment! I have edited my message to make it more specific. \$\endgroup\$ – Someonation Feb 4 '12 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.