Ideas for varying frequency of oscillator - Page 1
Forum section: electronics / projects

author: akis
author_rank: Frequent Contributor
timestamp: August 02, 2014, 12:37:53 pm
content: Here is a Wein bridge oscillator which I have built and used many times. The FETs serve as pure diodes compensating for temperature changes. I can blow a hair dryer on this until all the components reach 80C and still the amplitude of the sine wave remains very steady. The frequency depends on the RC, I use qood quality Rs and Cs and it is also dead steady. The above circuit is at around 200KHz.I would like the frequency to vary between two limits, say +/- 10% of the fundamental, so in the case above I would like it to go from 180KHz to 220KHz, more or less. I have a 555 square wave with a period of 1.5 seconds, so that would be ideal to switch frequencies on each of the 555's pulses.An easy way to do this would be to alter the R1/R2 around the 6.8K value, eg 6.2K, 6.8K, 7.5K. Can anyone suggest the circuitry required to achieve this?

author: PA0PBZ
author_rank: Super Contributor
timestamp: August 02, 2014, 01:00:26 pm
content: How about a 4052 analog switch?

author: dannyf
author_rank: Super Contributor
timestamp: August 02, 2014, 03:15:12 pm
content: Digital pots.

author: akis
author_rank: Frequent Contributor
timestamp: August 02, 2014, 03:25:00 pm
content: Thanks for the idea. I am already using a DG412 downstream to select amplitude levels but it is not behaving perfectly at 200KHz. I have ordered a few DG409s and a few 4052s to see how they will cope.

author: eneuro
author_rank: Super Contributor
timestamp: August 02, 2014, 03:27:02 pm
content: Quote from: akis on August 02, 2014, 12:37:53 pmMaybe using DIP8 ATTiny85 instead of 555 could be easier to do it by selecting proper fast PWM modeHere someone made even more by overclocking this tinny AVRAVR-based FM-transmitter - Intro, theoryand by adjusting calibration register to tune the frequency of the RC-oscillator which allowed him to go into... FM radio band using its PLL multipplied frequencyThis 2 parts (ATTiny45 +battery) based transmitter generated software made sound which is possible to listen to at FM radio tuned to around 100MHz

author: David Hess
author_rank: Super Contributor
timestamp: August 02, 2014, 04:08:30 pm
content: The RC networks can be shunted with parallel or series values using simple JFET switches. One is conveniently referenced to ground and the other to the output so coupling between the gate drive and the signal should not be a problem. Integrated analog switches would work as well.

author: akis
author_rank: Frequent Contributor
timestamp: August 02, 2014, 05:04:30 pm
content: After some thought, and simulation the requirements change.I have tried the DG409 in simulation but it did not work, due to parasitic capacitances and resistances. The RC network is very delicate and the Rs and Cs have ot be very well matched, else it will not oscillate. The insertion of the DG409 in that positive feedback RC path throws the balance out of the window.I also want the frequency to vary at various levels, not fixed stepped points.So I am thinking of a variable C or a variable R.The first variable R that comes to mind is an LDR, but from the LDRs I have used, they do have a huge range of R (MOhm to a few hundred Ohms), and as far as matching two of them even if driven by the same LED , I think the chances are too small.Maybe some other type of variable R?Variable Cs.I just looked at Varactors / varicaps but have never used them before so am trying to learn now. If you can see how to bolt them into the circuit above please give me a shout.

author: PA0PBZ
author_rank: Super Contributor
timestamp: August 02, 2014, 06:21:17 pm
content: I didn't check the equations but it looks like you can get away with 2 different rc networks, and then you can tune it by just varying the resistor to ground:http://www.zen22142.zen.co.uk/Design/wien_osc/Wien-Bridge%20Oscillator.htmIf this is possible you could use a digital pot to tune the oscillator.

author: dannyf
author_rank: Super Contributor
timestamp: August 02, 2014, 06:48:38 pm
content: QuoteIt can be done with a mcu.1) use the pwm generation. Given the required frequency band is fairly narrow, you can simply filter out the harmonics using one filter.2) a better approach is to use a continuously variable pwm to generate a sine wave form. You will need to run the mcu at fairly high speed to do that.

author: David Hess
author_rank: Super Contributor
timestamp: August 02, 2014, 08:18:25 pm
content: One method I like is to use a clock tunable switched capacitor bandpass filter to track the oscillator frequency.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 02, 2014, 09:58:41 pm
content: If you rearrange the oscillator so that the R1-R2 node is ground, you could use a simple OTA or JFET or biased diode (for really small signal levels..), to vary the resistance (or effective resistance) of both.In the old days, they used variable capacitors. The classic Eico 377 is based on a simplified version of HP's original circuit; it uses a dual air variable cap and spans 20Hz-200kHz in four ranges. Yes, 20Hz -- the resistors are 18M, and the gain isn't very stable (namely, the amplitude isn't well regulated).Worth noting... you... want this electronically controlled, right? Not just trimmable? 'Cuz that's easy..Tim

author: akis
author_rank: Frequent Contributor
timestamp: August 02, 2014, 11:10:02 pm
content: Yes I have a 555 providing a pulse every 1.5 seconds. On each pulse I would like the frequency to change randomly but within limits (say +/-10% of 200KHz).I have experimented (on simulation) with varicaps and got good results in that I can control the frequency by controlling a voltage on the varicaps. Of course the simulation the varicaps are 100% matched and behave perfectly. Also no idea how temperature might affect the amplitude once the varicaps are in.Here is a schematic. The varicaps are isolated via an extra capacitor (47p) and the 1M resistor biases the varicaps while not loading the rest of the circuit. I have never used varicaps before so this is fully experimental.Now the only thing I need is to replace those two extra voltage sources with some sort of automation, some sort of random voltage generated on each pulse from the 555.So I was thinking, recently I have been messing with an Arduino nano. Maybe the Nano should be replacing the 555 and also provide the two voltages I need, only problem is the nano (ATmega328) does not have analogue outputs, well the PWM is not really analogue, so this is a bit of a problem. Maybe I can control the two voltages without using the Atmega328.

author: eneuro
author_rank: Super Contributor
timestamp: August 03, 2014, 12:02:04 am
content: Quote from: akis on August 02, 2014, 11:10:02 pmMaybe replace 555 too and use AVR MCU with hardware TRNG generator depending how good randomness you need and create nice analog sine wave by filtering PWM output?I've found nice application noteAVR131: Using the AVR’s High-speed PWM.Just trying to push to the limits this tiny AVR ATTiny85 and use its high speed PLL PWM, while testing low power AM radio modulation at 500 kHz -1MHz frequencies and I'd like to create nice analog sine waves too, but rather by postprocessing/filtering PWM output and maybe switch on/off additional resistors/capacitors if needed