Home Made Tiny Network Analyzer NWA - Page 1
Forum section: electronics / projects

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 08:09:56 am
content: Hi,Electronic is just my hobby and not my profession. I started years ago with digital technic and since about four month I engaged in the analog technic stuff. I decide to design a network analyzer to learn more about filter, amplifier, mixer, oscillator etc. In my point of view, it is a good idea to have an objective. Because defining a way to learn stuff is much easier if you know, or have an idea, about the result and what is it good for.Yes, I know there are a many NWA’s on market – used, new etc. But some time the way is more important than the objective.First of all I will define the major requirements or my major needs to margin work and efforts.The network analyzer should be:- based on modules (easy exchange of function blocks),- inexpensive (use of standard parts, if possible one or two sources for parts to reduce additional cost. E.g. shipment),- PC controlled via USB, Bluetooth or RS-232 (no external controls like switches, displays etc.),- have a frequency range from about 10Hz to max. 50MHz.I will use the NWA for (see attachment to this post)- measure signal level changes,- phase changes and- reflection/impedance of the DUT.I will post my ideas, current status, results, questions and more from time to time in this section.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 08:31:15 am
content: NWA – The Basic ConceptThe NWA have three building blocks or units based on my concept (see attachment).The Signal Generator Unit (SGU) will provide the sine signal (from about 10Hz to max. 50MHz) for the test of the DUT. A signal splitter will provide the reference signal for compare. To get the signal reflection from the DUT I will use a RF coupler.The output of the DUT will deliver a signal to the input of the Signal Detector Unit (SDU). A low pass filter will help to reduce disturbing signals above 50MHz. The final stage of the SDU is the signal detector and ADC.I will use an Atmel ATmega microcontroller to control the SGU, SDU and is the interface to a PC via RS-232/USB or/and Bluetooth. The microcontroller will have a command interpreter for measurement sequence execution (e.g. for signal level vs. frequency).

author: Richard Head
author_rank: Frequent Contributor
timestamp: July 30, 2014, 08:37:34 am
content: BaluConsidering that you are not an electronics professional I think that this is quite an advanced project, and I encourage you.This sort of thing does already exists from a few firms such as MiniVNA and Array solutions. Google them if you aren't aware of them yet.I would try to get a higher upper frequency limit if possible but maybe 50Mhz is a good start.Good luck and keep us posted.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 30, 2014, 08:50:21 am
content: What kind of options do you expect for the oscillator and ADC? How much bandwidth, and how does it interface with an AVR processor?Tim

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 10:19:55 am
content: NWA – The OscillatorThanks Richard – You know – no risks no fun.I chose the AD9803 as the heart of the oscillator. Because the interface is easy, the price is low and I have one of these modules from china.I have made an easy test setup with this module to measure the output signal (level and quality). The result is strange. The first diagram shows the output level vs. frequency without output load. I used a HP54601A oscilloscope for measurement, sure with low precision. But I get the basic information about the signal behavior. The module provides an input (R-I) for amplitude adjustment. I used a MCP4151-10k potentiometer IC to adjust the amplitude depending on the frequency (controlled by an ATmega). The second diagram shows the result with a 200Ohm load at the module output, because the module has an output impedance of 200Ohm. All measurements are done with the HP54601A. The last attached image shows a screen shot of the HP with a signal of 50MHz.The blue line in diagram 2 shows the output signal after adjustment and with a 200Ohm load in Vrms. The signal is very low but much flatter than before. The left signal level differences can be compensated with the calibration process (for each measurement with the NWA).My next step will be the amplifier, filter, splitter and coupler design.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 10:21:08 am
content: Sorry,And now the diagrams.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 10:23:03 am
content: And the schematic for the oscillator module test with the MCP4151-10k (10kOhm) potentiometer IC.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 11:08:36 am
content: NWA – The Oscillator (2)The mean value of the oscillator output level is approx. 77,17mVrms (109,1mVp or 218,3mVpp). Regarding the 200Ohm output impedance of the oscillator I need an impedance matching network to adapt the module to 50Ohm input of the splitter, coupler and other.I chose a LC low pass filter with the following data:fg = 85MhzZin = 200OhmZout = 50OhmThe result is the LPF (see attachment) with two 8,2pF capacitors and a 150nH inductor. The loss of the LPF will be approx. 14dB. The output level of the LPF 8 (with the input level approx. 109mVp) will be about 21,8mVp (15,4mVrms). That means I will get a output level (oscillator/LPF) approx. -23dBm.

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 11:17:29 am
content: QuoteWhat's ad9803?QuoteYour pot is connected to Rset? You may want to read the datasheet and the schematic of your module to see what requirement there is on the resistance.To flat-out the output amplitude, you just need to change the pot's value based on the output frequency and your measurements - aka an open loop control.QuoteAt that kind of frequency, you may also want to take a look at the output waveform to see if it is still good enough for your application.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 11:32:06 am
content: Hi Dannyf,I mean AD9851 - sorry. It is not a good idea to write and read (datasheet of the AD8302) at the same timeThere is a resistor (392Ohm between GND and DAC R-SET Input) and jumper on the module to setup the amplitude level. But the level will change with the frequency. I think my solution with the MCU controlled potentiometer IC works fine. A adapt the software routine to adapt the resistor value regarding the frequency.

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 11:38:07 am
content: You probably want to see if your pot is in serial / parallel with Rset.BTW, 392ohm of Rset is very very low -> Iout is very very high.

author: tinhead
author_rank: Super Contributor
timestamp: July 30, 2014, 11:49:43 am
content: Quote from: balu on July 30, 2014, 11:32:06 amthat should be normaly 3.92kQuote from: balu on July 30, 2014, 11:32:06 amsure, that can work, but i would not use 8bit pot to set values for 10bit DAC. There is example circuit in the datasheet, why you not use it? (or at least something similar and not a pot)

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 11:55:17 am
content: Thank you for the information.I have an MCP4822 (simple 12Bit DAC) and will try the solution with a DAC.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 11:56:30 am
content: NWA – SGU Signal Generator UnitI have made my first concept for the signal generator unit. The picture shows the signal level (dBm) for each stage. As a splitter I chose a simple tee circuit. It is not the best and I have to look for a better solution.

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 11:56:38 am
content: QuoteThe two (8-bit pot vs. 10-bit dac) are unrelated.QuoteThe two approach are identical - by changing the equivalent resistance on Rset pin.

author: PA0PBZ
author_rank: Super Contributor
timestamp: July 30, 2014, 12:45:52 pm
content: I'd put C2 on the other end of L1.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 05:09:45 pm
content: Hi PA0PBZ,C1 and C2 will be one capacitor with 16,4pF. But this value will not be available and I use two 8,2pF in parallel as a reminder.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 05:20:59 pm
content: NWA – SGU Signal Generator UnitNow I have my first and draft version of the schematics for the signal generator unit SGU. Part 1 is the oscillator module with amplitude adjustment, the impedance matching network as a low pass filter and the first RF amplifier stage.The second schematic is part 2 of the SGU. The input signal to this part comes from the output of the RF amplifier of part 1 and goes into the pi-attenuator (loss: -27dB). The following stages are the splitter, two RF amplifiers and the RF coupler.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 07:23:20 pm
content: NWA – SGU Signal Generator UnitFor test purposes and to get information about the possible mechanical dimensions I have made a draft version of the PCB layout for the signal generator unit part 1 and part 2. I will use metal shield housing for each module. My favor electronic supplier offers two types of these housings. A small one with 54x29x16mm (2,12x1,14x0,62”) and the other with the dimension of 54x50x19mm (2,12x1,96x0,74”).

author: Berni
author_rank: Super Contributor
timestamp: July 30, 2014, 07:33:28 pm
content: I don't have much experience in terms of RF design but that Impedance matching network seams like a bad idea. You proabobly don't want to put capacitors directly on the DAC output and I don't see how that looks like 50 Ohm except at the just right frequency when that inductance happens to have such a Z. Certainly not over the wide frequency range.As for those RF amplifier blocks I'd more likely use opamps. These RF amplifier blocks are not meant to do stuff as low as 10Hz (Not saying they don't work so low, but might be quite unpractical). It is not too hard to find 500Mhz GBW opamps to give you plenty of gain at these high freq. As a plus opamps don't care about the exact input and output impedance, so you don't need to worry about them as long as you keep traces between chips short.

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 07:36:40 pm
content: QuoteYou probably want to do some math to see how those RF amps work in your circuit. Most RF amps, like those MMICs, have very low input impedance. Mating them to an electrolytic capacitor (with high ESL) may not produce the desired frequency response for you.It is better that you do more homework upfront.

author: balu
author_rank: Regular Contributor
timestamp: July 30, 2014, 07:55:19 pm
content: Hi Berni, hi dannyf,Thank you for the hints. The RF amp stages are my major pain. I need amplifier with a relative high gain. Opamps with a GBW of 500MHz and more are not really inexpensive and not easy to get (for me). My idea is to use MAR-8A+ amplifier from micro-circuits with the amplification for DC to 1GHz. I have ordered one of these amplifiers and will make tests. I hope, I will get this amp tomorrow.

author: Berni
author_rank: Super Contributor
timestamp: July 30, 2014, 08:25:21 pm
content: The passives around the RF amps are going to be very troublesome, that inductor that feeds it power needs to be large enough to not pass 10Hz and such.Also you if you keep the gain levels low (I don't see a problem with that since the DAC has a large output voltage) then you can get away with like 100MHz opamps and in case of larger gain use 2 or 3 stages to get there. It's very easy to get a super flat frequency response with them too.You can also try asking TI for a few samples of there fancy high speed opamps (might even have to fill a form since supposedly they can be used to build a guided missile or something ridiculous like that)

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 08:31:29 pm
content: QuoteI don't know what filters you intend to put in front of the RF stage but you should think hard about the potential of the low input impedance loading down the filter (if you use one). A buffer (like a jfet follower) may be needed here - actually one of the VGA modules by 3G has an interesting output stage utilizing npn+pnp pairs.Other options are video opamps or CFB opamps (they are typically good for 100Mhz or more).My own favorite is AD603 - it has the added benefits of allowing each AGC.

author: KJDS
author_rank: Super Contributor
timestamp: July 30, 2014, 08:47:29 pm
content: If I get some spare time tomorrow I'll do a proper design of the RF amp using transistors. What you have won't work well as the impedance matching network will only work at one frequency and the inductor for the amplifier will either be too small to block the signal at 10Hz or make it bigger and it will look like a capacitor at higher frequencies.

author: KJDS
author_rank: Super Contributor
timestamp: July 30, 2014, 09:24:16 pm
content: So I've now had time to look at this a little.Your analysis of the filter shows a loss of 14dB, but that is measuring the input level before the 200R, and that measurement of input level should be after the 200R. If you think about it, at 10Hz your matching circuit will do nothing, put in the reactances of the C and L at 10Hz to see what I mean. You won't have 14dB loss there, you'll have no loss.There's nothing wrong with a resistive T splitter, and that's a subject that's been covered elsewhere recently on here. It will have 6dB loss, not 12dB as shown on your diagram.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: July 30, 2014, 09:49:38 pm
content: Balu and the group,Have you seen the VNA that was developed by Paul, callsign N2PK?You can find it herehttp://n2pk.com/Paul uses an oscillator with a sine and cosine outputs. He then uses direct conversion to obtain the vectors from the unit under test. It is an interesting approach.His unit covers the range 50 kHz to 60 MHz. I don't know what it would take to extend the design to lower frequencies.There have been some enhancements to this design. Here is one of them:http://www.makarov.ca/vna.htmRegards,Jay_Diddy_B

author: balu
author_rank: Regular Contributor
timestamp: August 01, 2014, 05:54:45 pm
content: Hi,I didn’t get the MAR-8A+ but I get one ERA-3+ MMIC from micro circuits. I build a quick and dirty test amplifier (see attachment) and make some measurements. The pdf contains the results and the diagram shows the curve based on the values.I use my Siglent SDG1020 function generator with 50Ohm output impedance and -20dBm output for the sine signal. For measuring the input and output RMS voltage level I used my old HP54601A oscilloscope and my homebrewed power-meter (based on the AD8307). I supplied the amplifier with 5V (current approx. 18...20mA) for operation.The result is not so bad, but I think to use opamps as amplifier (e.g. AD8009). I hope it will reduce the issues with impedance matching, inductor and frequency etc. And I think – I must change the requirement about the frequency range from 10Hz up to 50MHz into 1kHz or 10kHz up to 50MHz.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 01, 2014, 06:13:18 pm
content: Quote from: Berni on July 30, 2014, 08:25:21 pmA good substitute would be a transistor current source (if it's acceptable for bias), or more likely I think, a gyrator (using a bootstrapped transistor to emulate a higher impedance while maintaining DC bias stability).Tim

author: rastro
author_rank: Frequent Contributor
timestamp: August 01, 2014, 09:05:46 pm
content: Hello Balu,You may want to check out yahoo group: Poor Ham's Scalar Network AnalyzerSimple scalar network analyzer using: Arduino UNO, AD9850 DDS , AD8307 RF power detectorhttps://groups.yahoo.com/neo/groups/PHSNA/infoIt may not be exactly what you're doing but they might be a good reference.Regards,Rastro

author: balu
author_rank: Regular Contributor
timestamp: August 04, 2014, 10:06:02 am
content: MMIC Amplifier TestBased on the results about the amplification of the ERA-3+, I have two questions.1. What is the value of the input impedance of this amplifier?2. What happens when I connect the oscillator module direct to the amplifier input without the impedance matching network?Because I learned an impedance matching network will work only for one frequency and not for the needed frequency range.I made a small test setup (see schematic) and use the idea of a resistor divider to get the input impedance of the amplifier. I hope the methodology, to get the impedance, is okay for the amplifier and the frequency range. The table shows the result.(Frequency Generator Output Impedance: 50Ohm, Oscilloscope Input Impedance: 50Ohm)And I think I will do a test setup to get the answer for my second question (results will follow).

author: Bud
author_rank: Super Contributor
timestamp: August 05, 2014, 12:30:44 am
content: Balu,you should stop right there and go back to your signal source AD9851 and get it right first. Basically based on what you posted before it puts out garbage. Carefully read the datasheet and compare with what you get from that ebay board.Forget about amplitude control for now, disconnect it. Just run the board with your microcontroller and get the output right. You should be getting I think 1V peak-to peak, not some millivolts that you measured. The amplitude drop across 60MHz range should be gradual and not anywhere that rippled as on your screenshots. Check in the Datasheet fig.12 what you should be getting in terms of amplitude.Note that because your ebay board has a 30MHz clock oscillator, you have to programmatically enable x6 multiplier on the DDS chip, otherwise your output is limited to less than 30MHz/2, and the 70MHz low pass filter is useless, passing all the garbage right through.

author: yramgu
author_rank: Contributor
timestamp: August 05, 2014, 07:43:53 am
content: I have to agree with Bud, you have to consolidate your first stage. I have used a similar module (not the exact same one) and I get 1Vpp output amplitude in single ended configuration. After a few MHz though the amplitude starts to drop and at 10MHz I get ~200mVpp.14dB loss in your LPF is a lot of losses!Considering you're not (well barely) in the RF range of frequencies, why not replacing your amplifiers/attenuators etc.. by an AD603 as somebody suggested already? This chip is awesome! You wouldn't even need the splitter anymore.And to answer your questions:Quote from: balu on August 04, 2014, 10:06:02 amThe answer is on page 1: " Internally matched to 50 ohms"Quote from: balu on August 04, 2014, 10:06:02 amYou will lose powerQuote from: balu on August 04, 2014, 10:06:02 amIndeed, that's what makes it fun to designQuote from: balu on August 04, 2014, 10:06:02 amYour methodology should be ok given the frequency range. Although normally for such measurements we use... a VNAEDIT: Your measurements seem to be wrong: I took the S parameter files on minicircuits's website and ran them in RFSim (see picture). Turns out this amplifier wasn't characterized below 50MHz. But from looking at the smith chart, the lower the frequency, the closer we get to 50Ohms. At 50MHz, the amplifier is already 50Ohms so at lower frequencies it will be too.

author: dannyf
author_rank: Super Contributor
timestamp: August 05, 2014, 10:52:07 am
content: QuoteCouldn't tell from your measurement, unless you can show the signal genreator's Vout.

author: G0HZU
author_rank: Super Contributor
timestamp: August 05, 2014, 11:06:44 pm
content: I've only skimmed over your block diagram and glanced at your PCBs but there's lots of issues.It isn't clear how you will be able to measure amplitude and phase with your ADC. Most VNAs sample or mix down to an IF in order to do the detection. Some mix to dc. I'm not sure which detection method you have adopted? Are you undersampling?The rest of your block diagram shows a lot of issues.Your coupler is only rated down to about 1MHz and has very poor directivity. Can you use a resistive bridge here instead? The PCB layout for the MAR8 amplifiers has poor grounding and will very likely cause instability. Also the I/O signal routing for the amplifier is too close together at the connector. Not ideal for stability.The MAR series of amplifiers is very old anyway and they have poor performance wrt temperature and bias stability.eg the gain stability and and I/O matching is markedly inferior to later generations of MMICs from MiniCircuits. But I wouldn't use a MMIC amplifier here anyway.Also, I think you maybe need to look up what things can compromise the performance (eg measurement uncertainty) of a simple VNA like this. eg the source and load impedance needs to be very well controlled because this isn't a full 2 port VNA. At present, your port source/load impedances will be quite poor in this respect.The chinese built AD9851 DDS board you are using looks to be heavily based on the clock generator eval PCB circuit from AD. This has a 70MHz elliptic LPF with very high passband ripple. High ripple is not a problem for a clock generator but not ideal for a VNA signal source. Maybe you should tweak this filter to improve the flatness response? I'd be tempted to redesign for 50R operation.Besides, your DDS flatness plots suggest to me that either you have got the frequency scaling wrong or the LC values on your chinese DDS board have been changed away from the values on the PCB silk screen. This is because the peaks and dips in the response aren't where I would expect to see them for a 70MHz LPF. Therefore, is it still a 70MHz LPF or has it been modded to maybe 60MHz?Also note that the DDS board already has a shunt 200R output termination resistor on its PCB because it has been copied across from the clock generator EVAL PCB from Analog Devices. This is correct for a clock generator but maybe not so good for your application.The LPF at the VNA input port (port 2) will add lots of phase slope across your range and I'd question the need for an LPF here?I would avoid the AD603 for this application because it won't perform well at 50MHz.My best advice to you would be to try and produce a set of spec requirements for your VNA. Then try and prove the performance of the raw detector and the ADC wrt amplitude and phase accuracy and stability. It isn't clear what detection method you are using here. Usually, I'd expect to see a design that exploits the ability to generate signals precisely in quadrature using two DDS chips and then mix down to dc or a low IF.

author: Bud
author_rank: Super Contributor
timestamp: August 06, 2014, 02:55:32 am
content: Quote from: yramgu on August 05, 2014, 07:43:53 amThis is wrong, perhaps same as Balu you did not engage the x6 multiplier on the DDS chip ?

author: PA4TIM
author_rank: Super Contributor
timestamp: August 06, 2014, 05:44:41 am
content: Why not take the n2pk vna as a base. It is a real VNA and I heard on VNA forums it is a great performer with a huge dynamic range. the software is good but it also works with the even better software from Tom, the designer of the VNWA. It can be fun designing your own SNA or maybe just a wobbulator but it is no fun if it does not work. (I tried too and learned a lot from that) Building Pauls (n2pk) VNA will be still a challenge but you then know the dersign is good.Fred (After the experiments I builded the VNWA kit a few years ago)

author: yramgu
author_rank: Contributor
timestamp: August 06, 2014, 06:32:45 am
content: Quote from: Bud on August 06, 2014, 02:55:32 amNope. As a matter of fact it wasn't an AD9851 but an AD9850, and it had a 125MHz crystal on board (so no need to engage a mutliplier). I had 3 boards / 2 different models but all behaved the same way. It was a while ago, I had to pause my project because of lack of free time but I'll definitely have another look at itAs for the N2PK VNA, it is indeed a beautiful piece

author: balu
author_rank: Regular Contributor
timestamp: August 06, 2014, 05:56:54 pm
content: Hello,Thank you for all the notes, hints and tweaks.Yes, I have to go back to start – the AD9851 module. I enabled the 6x multiplier on the DDS module and make new measurement of the output amplitudes vs. frequency (without changing Rset). And the result looks not good. It looks like that the LPF is not really a 72MHz LPF. The amplitude values go very quick down before 72MHz (see attachment). I have done the measurements with my old HP54601 oscilloscope (high impedance).And a good hint is about using an opamp and not the MMIC amplifier. It is possible for me to get an AD8005 or AD8009. But first I will look at 72MHz LPF and fix this issue.BTW my idea was to use an AD8302 and two ADCs for amplitude, phase detection and signal conversion. The microcontroller should be used only for control and interface purposes. Signal analysis and all other will be done on the PC. But this is the future and I must understand and fix the current issues first.

author: Bud
author_rank: Super Contributor
timestamp: August 07, 2014, 03:58:55 am
content: Quote from: balu on August 06, 2014, 05:56:54 pmDid you measure the actual output frequency or you relaying on your programming - mistakes in programming may cause you to think the LPF is bad. Make sure that output frequency is what you program it to be.

author: Bud
author_rank: Super Contributor
timestamp: August 07, 2014, 04:21:54 am
content: Quote from: balu on August 06, 2014, 05:56:54 pmYou are making a classic "young players" mistake by wanting to use a wideband power detector. It will collect all the garbage from low frequencies to 2.7GHz which will skew measurements and in some cases will make it impossible - think about measuring an antenna that has 1 or more RF voltage induced from radio broadcast or TV stations, mixing with your source. A device with such a detector will have limited application.