Generating a sine wave - Page 1
Forum section: electronics / beginners

author: renzoms
author_rank: Regular Contributor
timestamp: December 11, 2021, 06:30:08 pm
content: So I checked the forum. Ran across some answers. They were hard for me to read but they primed me to some of the previously given answers.Might build this Wein Bridge oscillator fromhereI have the parts (1N914. They used an LT1028 whereas I have a TL084CN, LF412CP, AD820ANZ, LM741CN, and LT1078. I'm new at hands-on so idk what I have yet. In other words, would you please tell me?)I reviewed gain bandwidth and recall slew rate so, asking, I should be checking if the op amp I choose will perform at 200kHz? Any advice/recommendation?This has been nice, instructional.I also ran across some other ideas (buying,Colpitts, Hartley, using a AD9850 Direct Digital Synthesizer?, and an Arduino) [this stuff: I found hard to read]I'm inclined to build one. Not sure where to go. I thought along the lines of "use a DC voltage and some RC circuitry... Maybe use a NANO, Pro Micro, or TinyFPGA BX somehow..."Popped open Practical Electronics for inventors and sawthis worth reading. Popped open AOE, an exciting future read, and found this,out of my leagueInventory incl: Op amps, Regulators, Comparators, Diodes, transistors, a NANO, Pro Micro, and TinyFPGA BX.Slowly but surely, with your help hopefully, I can learn to walk on my own two feet among these components.Thanks allEdit: So should I just build this thing?

author: HB9EVI
author_rank: Frequent Contributor
timestamp: December 11, 2021, 06:41:23 pm
content: real low noise wien-bridge sine oscillators commonly used an incandescent lamp. you can reach quite low noise with diodes but not the same levelcolpitts and hartley osc. are more suitable for RF, at least I have never seen an AF oscillator based on colpitts or hartley so far;DDS chips like the ones from Analog Devices have their charme in a rather broad spectrum of frequency generation and easy control by a mcu, but even on AF level their signals are far away from being low noise, specially the signals from the low end DDS like the AD9850. you can use those signals for most test purposes, but if you really need low noise, there are not many useful alternatives to wien-bridge or phase-shift oscillators

author: TimFox
author_rank: Super Contributor
timestamp: December 11, 2021, 06:50:40 pm
content: I'm curious why the mis-spelling "Wein bridge" for the correct "Wien bridge" is so common.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: December 11, 2021, 06:52:40 pm
content: I think about that every time, but I don't like to play the teacher; it can just happen. maybe it should be renamed to vienna-bridge to eliminate this problem, though I don't know if there actually is a relation to the capital of austria

author: TimFox
author_rank: Super Contributor
timestamp: December 11, 2021, 07:30:50 pm
content: I posted this previously: Max Wien invented the bridge circuit in 1891, and it was used in audio oscillators shortly before WW II at General Radio and Hewlett Packard.

author: renzoms
author_rank: Regular Contributor
timestamp: December 11, 2021, 07:41:44 pm
content: Thanks HB9EVI. I'm taking what you've said as: noise seems like an important issue.Responding to that, I'm not sure how important noise is for me. I just want a source of sine wave to experiment with (i.e. transistor amplifier).After reviewingPractical Electronics for Inventors, I knocked everything out (mentioned i.e. Colpits, Hartley, DDS), except fora Wien oscillator,as shown hereorherejumping into buildinga 555 timerand somehow converting the square/triangle wave to sine wave...and this"simple triangle/square wave generator"and doing the same thingIt's worth building all of these circuits to me and I don't know what else I have surrounding me in this topic so thanks, I have to go to work soon so I hope to come back to replies.You guys are cool. Thanks.

author: james_s
author_rank: Super Contributor
timestamp: December 11, 2021, 08:45:27 pm
content: If you put a square wave through a low pass filter you will get a sine wave, but that only works if you are using a single fixed frequency. Noise should not be too critical for a hobby experiment, and you will not hurt anything by trying. Build a Wien-bridge oscillator on a breadboard and try swapping in different op-amps, you may learn something interesting.

author: renzoms
author_rank: Regular Contributor
timestamp: December 11, 2021, 08:49:29 pm
content: Cool. Will. Thanks

author: radiolistener
author_rank: Super Contributor
timestamp: December 12, 2021, 01:11:35 am
content: It depends on what is your requirements for spectral purity, phase noise expectations and frequency stability for the output.

author: ledtester
author_rank: Super Contributor
timestamp: December 12, 2021, 04:59:10 am
content: Check out chapter 15 of the classic TI publication "Op-amps for everyone":https://web.mit.edu/6.101/www/reference/op_amps_everyone.pdfA good reference for some of the commonly used op-amp sine wave generators. Lots of theory and explanation, but also shows some practical circuits.

author: David Hess
author_rank: Super Contributor
timestamp: December 12, 2021, 05:26:59 pm
content: Quote from: renzoms on December 11, 2021, 06:30:08 pmAt 200 kHz the operational amplifier needs a slew rate of 1.2 volts/microsecond or higher per volt(peak) of output so it is definitely a consideration. A 200 kHz 0.07 V/us LT1078 is not going to work and it is marginal at best for a 741.https://en.wikipedia.org/wiki/Slew_rateAnd page 5 ofAnalog Devices MT-045.Quote from: HB9EVI on December 11, 2021, 06:41:23 pmCheck outLinear Technology application note 43starting at page 29 for a discussion about Wien bridge gain control and distortion.Build the circuit with diode stabilization and incandescent lamp stabilization and compare them (at the same output level).

author: rstofer
author_rank: Super Contributor
timestamp: December 13, 2021, 01:51:47 am
content: Just for giggles, I used an Analog Discovery (1) to create a 200 kHz sine wave and then ran it through the spectrum analyzer tool. You can see the fundamental harmonic at 200 kHz and the rest of the harmonics (2d, 3rd) are pretty far down. 14 bit DACs and ADCs will do a decent job.The point is, DDS can produce very nice waveforms and it is instantaneous in terms of mocking up the project. Connect the two scope inputs (differential pair) to the waveform output and ground. Select a few options and done!The old ways are interesting from a historical perspective and I used an HP signal generator back in '69 or so for college lab classes but they aren't in the same league with a modern DDS unit.It took longer to get Paint to crop the images than it did to create the output.Attached are the waveform and FFT plots from Waveforms. I edited this post because I had initially done the test at 20 kHz and the topic is 200 kHz which are now included

author: vk6zgo
author_rank: Super Contributor
timestamp: December 13, 2021, 02:12:13 am
content: Quote from: HB9EVI on December 11, 2021, 06:41:23 pmLC oscillators for AF were somewhat more common back in the Tube days---they were often fixed frequency devices, due to the difficulty obtaining high value variable capacitors.Variable devices were much more likely to be Wien bridge or phase shift types.

author: David Hess
author_rank: Super Contributor
timestamp: December 13, 2021, 04:50:36 am
content: Quote from: rstofer on December 13, 2021, 01:51:47 amEven achieving 16 bit levels of distortion is difficult in the analog domain and verifying the performance of 16 bit and higher resolution converters is very challenging. Special circuit techniques are used to avoid thermal feedback and common mode distortion.QuoteIt depends on what you want. The lowest distortion sine waves are still produced in the analog domain for testing 18 bit and higher ADCs. These types of oscillators are so good that their performance cannot be verified with current digital test systems.Quote from: vk6zgo on December 13, 2021, 02:12:13 amThe variable frequency Wien bridge designs I have seen, like the Tektronix AF501 and SG502, use switched capacitors for range and dual potentiometers for frequency control.Check out PMI (Precision Monolithic Incorporated) application bulletin AB-112 included below for an example of how to make a single resistor tunable Wien bridge oscillator.

author: james_s
author_rank: Super Contributor
timestamp: December 13, 2021, 05:28:06 am
content: Quote from: rstofer on December 13, 2021, 01:51:47 amEven those $15 DDS boards from China can do a remarkably good job, I think they use a chip made by AD.

author: Terry Bites
author_rank: Super Contributor
timestamp: December 13, 2021, 09:16:24 pm
content: You need a gain of at least 3 at 200KHz. So use the fastest opamp in your drawer. That looks to be the LF412.Even so, for really low distorion you might want to go higher still. Say a GBWP of 6MHz. (200000*10*3)You can ease up the bandwith by filtering a squarewave with a bandpass filter. You need about 10x 200KHz, so a 2MHz amp will do.Gain stabilisation is crucial or your oscillator will not oscillate at all or turn into a square wave generator.There are many schemes using diodes, lamps, thermistors and a multitude of more complex mehods. Diodes are the simplest and cheapest.Take care to use caps with a low temperature coefficent or your frequency will wander. Dont allow draughts to blow on your diodes- this will cause amplitude drift.That VCO is a triangle wave generator not a sine source.Stay analog, any fool can count to one!

author: Zero999
author_rank: Super Contributor
timestamp: December 14, 2021, 12:40:41 pm
content: Using diodes to limit the amplitude is simple, but results in more distortion than other methods. A transistor, or small incandescent lamp can also be used. The lamp results in a nice, signal, with little distortion, but the thermal time constant of the filament limits the lowest operating frequency. A transistor, such as a FET, gives slightly more distortion, than a lamp, although less than a lamp, but can work down to a much lower frequency.Here are some links to other useful threads.https://www.eevblog.com/forum/projects/sine-wave-using-a-wein-bridge-oscillator-for-a-certain-frequency/https://www.eevblog.com/forum/beginners/best-way-to-amplify-a-sine-wave-without-distorsion/25/https://www.eevblog.com/forum/projects/wien-bridge-oscillator-ltspice-simulation/I agree that digital is the best way to go, although you can still learn a lot from the old analogue methods.

author: BILLPOD
author_rank: Frequent Contributor
timestamp: December 14, 2021, 07:32:49 pm
content: Good Morning Renzoms,Do yourself a favor and get a UTG962 AWG for Christmas and you can generate all the waves you want.Click here:https://youtu.be/ORkJGdViAhg

author: basinstreetdesign
author_rank: Frequent Contributor
timestamp: December 14, 2021, 09:56:01 pm
content: Quote from: renzoms on December 11, 2021, 06:30:08 pmYeah, build that thing.That'll get your feet wet and show you just what a circuit like that is capable of and what can be troublesome about it.Then decide if/how you want to improve on it.I can tell you right now:- diode gain trimming like that will get you distortion no better than about 0.1%- changing frequency with a dual pot may have problems with resistance value tracking from pot-to-pot. To the point where the oscillation may become undampened and oscillate amplitude or so weak as to just stop altogether.- make sure there is plenty of decoupling cap RIGHT ON the +ve and -ve power pins of the chipThe LT1028 is a high-class piece of well-behaved silicon.Good luck!

author: rstofer
author_rank: Super Contributor
timestamp: December 14, 2021, 10:18:25 pm
content: Quote from: BILLPOD on December 14, 2021, 07:32:49 pmMy Siglent SDG2082 AWG is rated for 80 MHz but you need to read the fine print. The only waveform it will generate up to that frequency is a sine wave. Everything else is limited to 25 MHz. So, if it's high speed square waves you want, this isn't the AWG to buy.Same story with the UTG962. Supposedly it is a 60 MHz signal generator but anything other than a sine wave is limited to a much lower frequency.This is a link to a scanned image of the User Manual, it isn't searchable. Bah!Document pages 39 and 40 have the specs...https://www.uni-trend.com/uploadfile/2019/1118/20191118091436691.pdf