Oscillator Prototyping - Page 1
Forum section: electronics / projects

author: Unknown
author_rank: Unknown
timestamp: August 09, 2012, 10:20:35 pm
content: Hi everyone. My first post on the forum, so I thought I'd share something I'm working on.A little about me first: I have been experimenting with very basic RF circuitry for the past year or so and am contemplating whether or not to become a Ham radio operator. I've built a few low power radio transmitters in the past and am currently designing a new oscillator that should work in the 2-metre Ham band -- I won't use it to broadcast until I get a license... Promise!I recently invested in a Rigol DSA815-TG, so have been using that for my latest oscillator design, as it gives me a better idea of where I am with the circuit compared to my 20MHz oscilloscope and scanner radio!EDIT 1: Oh yeah, I am using a 2N3904 NPN transistor for this oscillator. Trying to source a lower bandwidth transistor so there are less harmonics, but I can live with -52dB from the reference for now. I was using a BC550C but the current gain is far too high and there are peaks right up to 1.5GHz and probably beyond! Impossible to tame.EDIT 2: Changed pictures to attachments instead for easier viewing.P.S. If anyone is into RF circuitry and could give me some tips, I'd really appreciate it! This is about the best I can do at the moment.

author: Zad
author_rank: Super Contributor
timestamp: August 09, 2012, 10:48:02 pm
content: From the comments to Dave's unboxing and initial look, the internal oscillator in the Rigol spectrum analyser has a lot of phase noise and jitter. Consider getting a 10MHz OCXO from Ebay and using that as an external frequency source.Prototyping oscillators is difficult, not least because any impedance change around the components leads and pads is going to change all sorts of parameters, and the higher the frequency, the more this is a problem. I wouldn't normally generate a signal in the 2M band directly anyway, better to use a lower frequency and multiply it up, either in an analogue chain of amp/filters, or more likely a PLL.

author: kg4arn
author_rank: Unknown
timestamp: August 09, 2012, 11:49:08 pm
content: Quote from: Zad on August 09, 2012, 10:48:02 pmYou're going to have big stability problems with an LC oscillator at that high of a frequency. Careful design and layout and using an air variable capacitor, you can get stability good enough for CW operation in the HF region (3-30MHz). The lower the frequency, the easier it is to build a stable LC oscillator.Do you have a 2 meter receiver so you can listen to your oscillator? You'll be able to judge its drift.Also, the phase noise on a decent communications oscillator will be far lower than the phase noise on your spectrum analyzer. Measuring the phase noise of a stable oscillator is not trivial.Go get your HAM ticket. See you on the bands.73 de Ed kg4arn

author: Zad
author_rank: Super Contributor
timestamp: August 10, 2012, 01:54:43 am
content: Quote from: jim_griff on August 09, 2012, 11:32:19 pmBroadly speaking (there are always exceptions) OCXOs have a lower phase noise than Rubidium oscillators. Rubidium's strength is in long term time stability, about which your spectrum analyser doesn't really care a jot.

author: olsenn
author_rank: Frequent Contributor
timestamp: August 10, 2012, 02:57:55 am
content: Just make sure your oscillator is a sine wave and not a square wave (square waves have harmonics). Also, the 2 meter band starts at 144MHz, not 140MHz.

author: deephaven
author_rank: Frequent Contributor
timestamp: August 10, 2012, 11:55:53 am
content: Hi Jim,Welcome to the mysteriousness world of RF! I would suggest the following:1. Modularise the design - Put each section in it's own screened box, power fed via feed-throughs.2. Buffer the oscillator - Add an additional stage just to 'decouple' the oscillator from what it's driving.3. Filter the oscillator output - It's difficult to get the perfect sine wave with absolutely no harmonics, so make the best one you can and then add a bandpass filter to attenuate any remaining harmonics.LC oscillators running at 144 MHz can suffer from microphony. That is to say, you have an air-cored coil and it will change inductance with sound waves. I once managed to produce intelligible speech just by shouting at the coil!Lastly, see what other designs people have already done. Look at the RSGB book store where there are loads of different books on RF. The RSGB Handbook isn't cheap, but covers just about everything you're likely to want to know. There are also more specific VHF/UHF books which might be more appropriate for you.

author: Rufus
author_rank: Super Contributor
timestamp: August 10, 2012, 02:31:48 pm
content: Drifting off topic a bit, if you want a 2m signal I don't see why you couldn't generate it directly using an image from one of those AD9850 DDS generators you can get from ebay for about $10. The 125MHz clock they have isn't a bad choice giving, for example, images at 104, 145, and 230MHz.Could probably directly FM modulate it and add CTSS at the same time.Would need some microprocessor and programming skills though.I bought a couple because they were so cheap. If/when I find some time to play with them it is something I was going to investigate.

author: PA4TIM
author_rank: Super Contributor
timestamp: August 13, 2012, 06:54:52 pm
content: I have build oscillators up to 2GHz using LC tanks and microstrip. But a very funny one was a one I used a piece of copper tubing as an inductor. Here is a picturehttp://www.pa4tim.nl/wp-content/uploads/2010/11/vfo145MHz.jpgImportant is the LC ratio. Most people use to little selfinductance. A good inductor is important. Also temperature stable capacitors and the way you build it.What is that strange bump in the noise floor of your spectrum analyser on some pictures.Always use external attenuators on the SA for safety, and to be sure not to overdrive the input and get intermodulation products. Also look out not to get DC on the input. My HP can handle 30VDC but I do not have much faith in the protections inside of Rigols. I most times use home made EH probes. You do not load the oscillator, and it is save for your SA.Breadboards and RF oscillators are not friends

author: olsenn
author_rank: Frequent Contributor
timestamp: August 13, 2012, 09:06:03 pm
content: QuoteI keep a 30db attenuator (N-male to N-female) and an N-type to BNC adapter perminantly attached to my SA, and even with this, I am able to pick up the faintest of signals using just a wire antenna! It's a very good idea to follow this practice (keeping an attenuator attached for protection). Fortunately, the Rigol DSA815/TG, which is the unit I have, is AC coupled and can take up to 50V DC (as rated) on the input.

author: olsenn
author_rank: Frequent Contributor
timestamp: August 13, 2012, 09:42:02 pm
content: QuoteRemember, the attenuator is not to protect against DC (the unit is already protected up to 50V DC) but rather it is to protect it against AC voltages. Capacitive coupling will only prevent a DC component; which will probably not save you (unless there otherwise would have been an offset greater than 50V). This unit can only take 20dbm (or 0.1 watts) as an input, and that includes ALL frequency components summed together, including ones outside the unit's frequency range. Even if your input is a pure sine wave (no harmonics) at a single frequency (which is the least worrysome possibility) then you can only have little over 2V RMS without damaging the unitIn other words, your $1500 toy is VERY EASY TO BREAK!!!!!! I highly suggest buying (not making) a high quality attenuator that provides at least 30db attenuation. You can get very nice 5 watt rated ones from ebay for like $20, if that.Quote

author: PA4TIM
author_rank: Super Contributor
timestamp: August 13, 2012, 10:21:02 pm
content: Wise words, all harmonics add up.A home made attenuator for 100MHz and up is hard to make. It will probably just be invisible for the signal.Do not load a oscillator with 50 ohm. You want the Q of the tank as high as possible. The ideal oscillator is a pepertum mobile, no energy is lost.A high tank Q gives less phase noise, a clean and more stable signal.Harmonics are not something you repress by loading the oscillator, they are the natural result of the non lineair behaving and they invented filters for thatDo not forget that a 10 pF cap is not as lossless and ideal as we are teached. The esr of a variable cap or trimmer can be high at 145 MHz. Besides that A 200 nH inductor instead of a 100 nH will give a very very small increase in Rs, but a twice higher reactance and a so higher Q.Search in literature like RF design from Bowick or experimental methods in RF design, a very good book is analog seekrets. Look for the square root ( L/C ) ratio.

author: PA4TIM
author_rank: Super Contributor
timestamp: August 16, 2012, 04:18:28 pm
content: http://www.g3ynh.info/zdocs/AC_theory/index.htmlDownload the AC theory pdf, there is a whole chapter with all the info about LC ratios you can dream of.

author: olsenn
author_rank: Frequent Contributor
timestamp: August 16, 2012, 06:37:58 pm
content: That reference (http://www.g3ynh.info/zdocs/AC_theory/index.html) seems to be really awesome. I was hooked the moment I read:"The teaching of basic science often involves what are known as 'lies to children', and the one about electricity being "electrons flowing through wires" is an intellectual dead-end."

author: Rufus
author_rank: Super Contributor
timestamp: August 18, 2012, 08:45:05 pm
content: Quote from: Rufus on August 10, 2012, 02:31:48 pmI did play with this today. As shown a PIC24FV32KA301 running at 16 MIPS from its internal oscillator lashed up to a $10 ebay AD9850 board. The AD9850 is programmed to generate an Fc+Fo alias at 145.4MHz plus 5kHz deviation for 5v on a PIC ADC input sampled at 16kHz. A 910R resistive probe straight on the AD9850 output feeding the SA. The PIC ACD input was driven by a function generator.It worked more or less as expected but I think it would need some care to get something clean enough to be usable for radio. The worst problem is probably the spurious spikes about 0.8MHz apart seen on the 20MHz span trace, these seem to be mixes of frequency components of data on the SPI bus (the SPI bus was running at 16MHz).The attachments are:-1. The lash up.2. Trace showing Fc-Fo alias, 125MHz Fc, the desired Fc+Fo alias, and I think a spurious at Fc+2Fo.3. 20MHz span trace.4. 1MHz span trace.5. 25kHz span trace.6. 4v pk-pk @1.62kHz modulation showing no carrier to confirm the deviation is as expected.

author: Rufus
author_rank: Super Contributor
timestamp: August 21, 2012, 12:47:42 am
content: Quote from: jim_griff on August 20, 2012, 11:45:23 pmAs Dave says failure teaches you more than success. You need to carry on and fail some more. I don't think I saw a circuit, post one and I'm sure you will get some advice.

author: PA4TIM
author_rank: Super Contributor
timestamp: August 21, 2012, 07:55:04 am
content: Why you think you fail, because you get harmonics ? If so, why you think they invented filters. Every oscillator has harmonics. And 2 meters is not the most easy way to start.Impedance in not that complex. They call it complex because in math it is a complex number, complex not as in difficult but complex like a block of houses together, i do not know the english word but something that looks like one part but is made from many parts. A skyscraper looks like one house but it are a whole bunch houses together. The skyscraper is Z it is one Real house and there are 1000 imaginairy houses inside it so in math a skyscraper is Z = ( 1 + j1000 )This is mathamatical not correct but it should give the idea. Because you can write the absolute value of Z, noted as |Z| and that is the square root of ( R^2 + jX^2) and for a skyscraper that would give a funny number.A capacitor and an inductor have a reactance, theire resistance for AC we call it XThe capacitor has a negative reactance, the inductor possitive.Reactance is in math an imaginairy resistance and is written as jX ( in electronics, pure math uses iX but the letter i (from imaginair) is allready in use for current)A resistor has real resistance, the kind you measure with an Ohm meter, we write it as RIf some component has real and imaginairy resistance we say it has a impedance ( and in fact, a component with only reactance is imaginairy) we write that down as ZXc= 1/2pifC is the reactance of a capacitorXl = 2pifL is the reactance of an inductorU=I X R and U = I x Z and because Z = R + jX you can wite U = I x ( R + jX)For instance an inductor 100 uH on our LCR meter at 1 KHzMeasures R = 2 ohm at our ohm meterSo jX = 0.6283 OhmZ = 2 + j0.6283 , this is called a rectangulair notation because it are the lenght of two vectors.The R in the Horizontal direction, so from left to right.The jX in je vertical direction, up for positive anf down for negative.We start with R at 0,0. in this case R goes 2 units to the right so that is R = (2,0) and from there X goes 0.6283 units up to (2,0.6283) if you draw to lines to the cordinates you have two vectors now draw a line from (2,0.6383) to (0,0) and we have a third vector. If we use phytagoras the lenght of that line is The squarroot ( x^2 + y^2) and that is the same formula you se for |Z|and |Z| = 2.0964 so this the lenght of the vector and beause both units are in Ohm, |Z| is in Ohm too.an other way to describe that vector as using rectangulir coordinates is to describe it in a polair notation. The length |Z| and the direction is in degrees. Arctan(X/R) = 17.4 degreesThe polar notation is now Z = 2.0964 and 17,44degreesFrom there you know 90-17.4 = 72.56 degrees. This is loss angle, delta. And tan delta is 3.183 and called dissipation factor, called D or DF.As you know Q is 1/DF so the Q of that coil at 1KHz is 1/3.183 =0.3141Check : Q= X / Rs so 0.6283 / 2 = 0.3141 so the calculations are correct.For a capacitor the same calculations ar true only this time the X vector goes down because it is negative.You can draw the vectors on paper an just measure them.If you have a series tank circuit you have two Impedances, ond from the C and onr from L. You canAdd them.Zl= (2+j0.6283)and Zc we make (1-j2.5) at 1KHzIf you add those at 1KHz you get (3-j1.87)I you calculate X for every frequency until Xl = Xc then the total Z = ( 3 + j0) so we only have the real part left. This state is called resonance. The lower R anfpd the higher jX and -jX are the higher the unloaded Q of the tank and that makes a stronger more stable oscillator.

author: kg4arn
author_rank: Unknown
timestamp: August 21, 2012, 09:41:58 pm
content: ......Thanks for all that information. I'm reading through several times and still letting it sink in. My brain is a little slow!I fail at oscillators because my harmonics are ......You really are starting out too large here. Try building some lower RF (say 2 to 6 MHz) oscillators using the classic Hartley and Colpitts configurations. Also build at least one crystal oscillator (at say 10 MHz or less) to get a feel for what real stability is like.A good source of circuits to copy (YES COPY) and play with isSolid State Design for the Radio Amateur(out of print but grab one if you can)andExperimental Methods in RF Design(get this one asap). Both texts give a lot of design tips and equations and both are very practical.Build buffer circuits with various isolation properties and see how loading the buffer output can still change the oscillator frequency. Blow some hot air on your LC oscillator and watch it drift all over the place. Blow hot air on the crystal oscillator and try to find it drift. Build a return loss bridge for your Spectrum analyzer and use it with a Tracking generator to measure the S parameters of your buffer amplifiers. EMRFD above tells you how to make one. S12 is actually a measure of isolation. You'll be surprised how bad/good certain circuit architectures are.I could go on and on but you get the point. Start small and copy a few oscillators and play with them. You can't hope to read a bit and fully grasp all the parameters that are at play: circuit Q, component Q, temperature drifts, effect of bias current and bias voltage, oscillator limiting, phase noise, harmonics, parasitic oscillations...Good soldering.