Network Analysers: The Electrical Kind

Instrumentation has progressed by leaps and bounds in the last few years, however, the fundamental analysis techniques that are the foundation of modern-day equipment remain the same. A network analyzer is an instrument that allows us to characterize RF networks such as filters, mixers, antennas and even new materials for microwave electronics such as ceramic capacitors and resonators in the gigahertz range. In this write-up, I discuss network analyzers in brief and how the DIY movement has helped bring down the cost of such devices. I will also share some existing projects that may help you build your own along with some use cases where a network analyzer may be employed. Let’s dive right in.

Network Analysis Fundamentals

As a conceptual model, think of light hitting a lens and most of it going through but part of it getting reflected back.

The same applies to an electrical/RF network where the RF energy that is launched into the device may be attenuated a bit, transmitted to an extent and some of it reflected back. This analysis gives us an attenuation coefficient and a reflection coefficient which explains the behavior of the device under test (DUT).

Of course, this may not be enough and we may also require information about the phase relationship between the signals. Such instruments are termed Vector Network Analysers and are helpful in measuring the scattering parameters or S-Parameters of a DUT.

The scattering matrix links the incident waves a1, a2 to the outgoing waves b1, b2 according to the following linear equation: \begin{bmatrix} b_1 \\ b_2 \end{bmatrix} = \begin{bmatrix} S_{11} & S_{12} \\ S_{21} & S_{22} \end{bmatrix} * \begin{bmatrix} a_1 \\ a_2 \end{bmatrix} .

The equation shows that the S-parameters are expressed as the matrix S, where and denote the output and input port numbers of the DUT.

This completely characterizes a network for attenuation, reflection as well as insertion loss. S-Parameters are explained more in details in Electromagnetic Field Theory and Transmission Line Theory but suffice to say that these measurements will be used to deduce the properties of the DUT and generate a mathematical model for the same.

General Architecture

As mentioned previously, a simple network analyzer would be a signal generator connected and a spectrum analyzer combined to work together. The signal generator would be configured to output a signal of a known frequency and the spectrum analyzer would be used to detect the signal at the other end. Then the frequency would be changed to another and the process repeats such that the system sweeps a range of frequencies and the output can be tabulated or plotted on a graph. In order to get reflected power, a microwave component such as a magic-T or directional couplers, however, all of this is usually inbuilt into modern-day VNAs.

In a laboratory grade VNA, we have two or four ports where a DUT is connected and the software does everything else for you. The only downside is that these instruments are very very expensive and price varies depending upon the range of RF frequencies or RF band coverage.

A DIY Scalar Network Analyzer

Let’s simplify things a bit. Say I have a simple filter I want to characterize in which case phase may not be necessary for my particular applications. I would just like to obtain the frequency-attenuation plot for the circuit so that I can use it correctly. In such cases, the DIY approach is the best and I would like to highlight a project on for beginners. The idea is simple and involves using the Analog devices AD9851 to generate the desired signals.

The received signal power levels are converted into a voltage using the AD8307 logarithmic amplifier (datasheet, PDF). This voltage is read by a microcontroller and the results, in this case, are plotted using a Python script. Another restriction to this design is the 70 MHz upper limit though it may work for a lot of people getting started with such projects.

In my quest for a simple experiment, I purchased some AD9850 modules, op-amps, and other tidbits from eBay and made a PCB in KiCAD. I built the project in the Arduino UNO shield layout because my intention was to test it on an Arduino and then move up to an STM32 Nucleo which was also bought on the cheap. My revision 1.0 had some basic bugs so it is still a work in progress but I am sure it will work the same as the above project. Feel free to explore it and make one for yourself. Mine is shown below in OshPark Purple.

I did salvage the connectors from an old DVR board I had lying around so I suggest you replace that footprint with whatever you intend to use in your build.

More serious projects

If you are more comfortable with RF circuits and want a more serious project, there is another by [Henrik Forstén] that works from 30 Mhz all the way up to 6 Ghz. The difference here is that his design uses a lot of planning as well as specific RF chips to do the job.

The AD985x is replaced by the MAX2871 and the detector is replaced by an LMH2110. All the files are available on GitHub for our experimentation pleasure though this may not be everyone’s cup of tea. Though if you are getting a little bit interested in this stuff, be sure to check out the website for all the nice info provided.

Vector Network Analysers

The Vector Network Analyzer is able to generate phase relationships in addition to the magnitude measurements. This allows us to generate complex math models for the components under test and helps identify the capacitive and inductive properties as well. In addition to the above-mentioned applications in the DIY field, VNAs are important tools for analysis of dielectric properties of materials as well. When working with materials such as ceramics in a research environment, a simple method is to apply the silver paste to opposite faces and then use a network analyzer to measure the various parameters. This method is commonly known as capacitance method for measuring complex permittivity.

For higher frequencies where the EM wave needs a waveguide, transmission/reflection methods are preferred. In this method, the material under test is placed inside a waveguide and there is no electrical contact between the terminals and the DUT. This method is commonly called the transmission/reflection line method and is usually employed in the laboratory.

It’s also possible to extend this to make free space measurements, where horn antennas are employed and the DUT is suspended in free space. This allows for the material to be heated or cooled without affecting the instrument or the antennas and is commonly used for temperature analysis of materials.

Measurement Methods for Materials

Once S-parameters are obtained from experiment, this data can then be converted into dielectric properties. Some conversion methods (PDF) are:

  • Nicolson-Ross-Weir method,
  • NIST iterative method,
  • New non-iterative method,
  • Short circuit line method.

The most common parameter evaluated is permittivity or more specifically complex relative permeability (mu-r). The real part is the dielectric constant which is a measure of the amount of energy from an external electrical field stored in the material. The imaginary part is the loss factor and is the amount of energy lost due to external fields. The dielectric constant usually varies with the frequency which means that the same electrolytic capacitor won’t behave the same at all frequencies.

There has been a lot of research invested in creating new materials that will behave favorably at higher frequencies. Today there is a variety of materials being employed to create these devices and research involves characterization of the materials involved.

Another important term is loss tangent (tan delta) and is the ratio of the two. If you are interested in the subject, then I recommend reading the Rhode and Schwarz application note linked just above, as well as papers here and here.

Note: I have not tried to discuss methods like cavity perturbation though it may be of interest to some and can be explored on its own. Take a look at this application note from Keysight (PDF) for more information on the subject.

A short note on VSWR

To complete this write-up, I am going to talk a bit about VSWR which is more associated with antenna and radio setups than materials and VNA. A scalar network analyzer used in HAM radio setups is used to measure a number of things including the Voltage Standing Wave Ratio or VSWR. This parameter is a ratio of energy that was put into an antenna or RF line and the amount of energy that bounced back out of it due to imperfect matching. So essentially, the standing wave ratio (SWR) is a measure of how efficiently RF power is transmitted from the power source, through the transmission line, and into the load. It is ideal to have all the signal converted into RF energy or EM waves at the antenna, however, practically if the impedance of the amplifier and antenna are mismatched, some part will be reflected back just like we discussed in the initial sections. A scalar network analyzer can measure these as well as impedance at various frequencies. RF couplers assist in reducing the mismatch and improving performance in these cases.

What next?

The idea was to explain network analyzers and their applications in brief. You can extend this article by diving into radios and antennas, RF instrumentation, or get into microwave materials for high-frequency applications. For someone working with such materials, a VNA is indispensable as it does the heavy lifting of analysis and presents results in a very straightforward manner.

Image Source

We are moving into ceramics that have a low-temperature coefficient i.e. the dielectric constant remains constant over temperature and LTCC or Low-Temperature Co-fired Ceramics. LTCC allow us to layer components together enabling high-density electronics manufacturing. All that requires analysis which is possible thanks to a combination of advanced instrumentation as well as mathematical algorithms.

Shop Made Squareness Comparator

[Stefan Gotteswinter] has a thing for precision. So it was no surprise when he confessed frustration that he was unable to check the squareness of the things he made in his shop to the degree his heart desired.

He was looking enviously at the squareness comparator that [Tom Lipton] had made when somone on Instagram posted a photo of the comparator they use every day. [Stefan] loved the design and set out to build one of his own. He copied it shamelessly, made a set of drawings, and got to work.

[Stefan]’s videos are always a trove of good machine shop habits and skills. He always shows how being careful, patient, and doing things the right way can result in really astoundingly precise work out of a home machine shop. The workmanship is beautiful and his knack for machining is apparent throughout. We chuckled at one section where he informed the viewer that you could break a tap on the mill when tapping under power if you bottom out. To avoid this he stopped at a distance he felt was safe: 0.5 mm away.

The construction and finishing complete, [Stefan] shows how to use the comparator at the end of the video, viewable after the break.

Continue reading “Shop Made Squareness Comparator”

Hackaday Dictionary: Mils and Inches and Meters (oh my)

Measuring length is a pain, and it’s all the fault of Imperial measurements. Certain industries have standardized around either Imperial or metric, which means that working on projects across multiple industries generally leads to at least one conversion. For everyone outside the last bastion of Imperial units, here’s a primer on how we do it in crazy-land.


The basic unit of length measurement in Imperial units is the inch. twelve inches make up one foot, three feet make up one yard, and 5,280 feet (or 1,760 yards) make up a mile. Easy to remember, right?

Ironically, an inch is defined in metric as 25.4 millimeters. You can do the rest of the math for exact lengths, but in general, three feet is just shy of a meter, and a mile is about a kilometer and a half. Generally in Imperial you’ll see lots of mixed units, like a person’s height is 6’2″ (that’s shorthand for six feet, two inches.) But it’s not consistent, it’s English; the only consistency is that it’s always breaking its own rules. You wouldn’t say three yards, two feet, and six inches; you’d say 11 1/2 feet. If it was three yards, one foot, and six inches, though, you’d say 3 1/2 yards. There’s no good rule for this other than try to use nice fractions as often as you can.

Users of Imperial units love fractions, especially when it comes to parts of an inch or mile. You’ll frequently find drill bits in fractions of an inch, which can be extremely frustrating when you are trying to do math in your head and figure out if a 17/64″ bit is bigger than a 1/4″ bit (hint, yes, it’s 1/64″ bigger).

A socket wrench set in Imperial fractions on the left and metric on the right.
A socket wrench set in Imperial fractions on the left and metric on the right. Metric is so much easier.

If it wasn’t hard enough already, there came the thousandth of an inch. As the machine age was getting better and better, and parts were getting smaller and more precise, there came a need for more accurate measurements than 1/64 inch. Development of appropriate tools for measuring such fine resolution was critical as well. You can call a 1/8″ bit a .125″ bit, and that means 125 thousandths of an inch. People didn’t like to wrap their mouths around that whole word, though, so it was reduced to “thou.” Others used the latin root for thousand, “mil.” To summarize, a mil is the equivalent of a thou, which is one thousandth of an inch. It should not be confused with a millimeter. It takes about 40 mils to make 1 millimeter. Also, the plural of mil is mils, and the plural of thou is thou.


Outside calipers for measuring the outer dimensionBy Glenn McKechnie (Own work) [GFDL, CC-BY-SA-3.0 or CC BY-SA 2.5-2.0-1.0], via Wikimedia Commons
Outside calipers for measuring the outer dimensionBy Glenn McKechnie (Own work) [GFDL, CC-BY-SA-3.0 or CC BY-SA 2.5-2.0-1.0], via Wikimedia Commons
Measuring length is done with a variety of tools, from GPS for long distances, to tape measures for feet/meters, and rulers for inches/centimeters. When it comes to very small measurements, the caliper is the tool of choice. This is the kind of tool that should be in everyone’s toolbox. Initially it started with the inside caliper and outside caliper, which were separate tools used to measure lengths. The Vernier caliper combined the two, added a depth meter and a couple other handy features, and gave machinists an all-around useful tool for measuring. Just like the slide rule, though, as soon as digital options became available, they took over. The digital caliper can usually switch modes between decimal inches, fractional inches, and metric.

Also, while slightly off topic, if you haven’t seen this video on getting the most out of your tape measure, it’s well worth a few minutes.


Every industry has picked a different convention. Plastic sheets are usually measured in mils for thin stuff and millimeters or fractions of an inch for anything greater than 1/32″. Circuit boards combine units in every way imaginable, sometimes combining mils for trace width and metric for board dimensions, with the thickness of the copper expressed in ounces. (That’s not even a unit of length! It represents the amount of copper in one square foot of area and 1 oz is equivalent to 1.4mil.) Most of the time products designed outside of the U.S. are in metric units, while U.S. products are designed in either. When combining different industries, though, the difference in standards gets really annoying. For example, order 1/8″ plexiglass, and you may get 3mm plexiglass instead. Sure the difference is only .175mm (7 thou), but that difference can cause big problems for pieces that are press fit or when making finger joints on boxes, so it’s important that when sourcing components, you not only verify the unit, but if it’s a normal unit for that industry and it’s not just being rounded.

Often you can tell with what primary unit a product is designed with only a few measurements of a caliper. Find a dimension and see if it’s a nice round number in metric. If it’s not, switch it to imperial, and watch how quickly it snaps to a nice number.

Moving forward

Use metric if you can. The vast majority of the world does it. When you are sending designs overseas for production they will convert to metric (though they are used to working in both). It does take time to get used to it (especially when you are dealing with thou/mils), but your temporary discomfort will turn to relief when your design doesn’t crash into the Mars (or more realistically when you don’t have to pull out the Dremel and blade to get your parts to fit together).

Fail of the Week: Magnetic Flow Measurement Gone Wrong

Physics gives us the basic tools needed to understand the universe, but turning theory into something useful is how engineers make their living. Pushing on that boundary is the subject of this week’s Fail of the Week, wherein we follow the travails of making a working magnetic flowmeter (YouTube, embedded below).

Theory suggests that measuring fluid flow should be simple. After all, sticking a magnetic paddle wheel into a fluid stream and counting pulses with a reed switch or Hall sensor is pretty straightforward, right? In this case, though, [Grady] of Practical Engineering starts out with a much more complicated flow measurement modality – electromagnetic detection. He does a great job of explaining Faraday’s Law of Induction and how a fluid can be the conductor that moves through a magnetic field and has a measurable current induced in it. The current should be proportional to the velocity of the fluid, so it should be a snap to whip up a homebrew magnetic flowmeter, right? Nope – despite valiant effort, [Grady] was never able to get a usable signal out of the noise in his system. 

The theory is sound, his test rig looks workable, and he’s got some pretty decent instrumentation. So where did [Grady] go wrong? Could he clean up the signal with a better instrumentation amp? What would happen if he changed the process fluid to something more conductive, like salt water? By his own admission, electrical engineering is not his strong suit – he’s a civil engineer by trade. Think you can clean up that signal? Let us know in the comments section. 

Continue reading “Fail of the Week: Magnetic Flow Measurement Gone Wrong”

Crowdfunding: A Wireless Oscilloscope

One of the most ingenious developments in test and measuring tools over the last few years is the Mooshimeter. That’s a wireless, two-channel multimeter that can measure voltage and current simultaneously. If you’ve ever wanted to look at the voltage drop and power output on a souped up electrified go-kart, the Mooshimeter is the tool for you.

A cheap, wireless multimeter was only the fevered dream of a madman a decade ago. We didn’t have smartphones with Bluetooth back then, so any remote display would cost much more than the multimeter itself. Now this test and measurement over Bluetooth is bleeding over into the rest of the electronics workbench with the Aeroscope,  a wireless Bluetooth oscilloscope.

[Alexander] and [Jonathan], the devs for the Aeroscope got the idea for this device while debugging a mobile robot. The robot would work on the bench, but in the field the problem would reappear. The idea for a wireless troubleshooting tool was born out of necessity.

The specs for the Aeroscope are about equal to the quite capable ‘My First Oscilloscope’ Rigol DS1052E. Analog bandwidth is 100MHz, sample rate is 500 Msamples/second, and the memory depth is 10k points. Resolution per division is 20mV to 10V, and the Aeroscope “Deluxe Package” that includes a few leads, tip, clip, USB cable, and case is about the same price as the Rigol 1052E. The difference, of course, is that the Aeroscope is a single channel, and wireless. That’s fairly impressive for two guys who aren’t a team of Rigol engineers.

As is the case with all Bluetooth test and measurement devices, the proof is in the app. Right now, the Aeroscope only supports iOS 9 devices, but according to the crowdfunding campaign, Android support is coming. Since the device is Open Source, you can always bang something out in Python if you really need to.

While this is a crowdfunding campaign, it’s hosted on Crowd Supply. Crowd Supply isn’t Indiegogo or Kickstarter; there are people at Crowd Supply vetting projects. The campaign still has a month to go, but the first few pledges are putting the Aeroscope right on track to a successful campaign.

Zero Parts-Count Temperature Sensor

Quick: What’s the forward voltage drop on a conducting diode? If you answered something like 0.6 to 0.7 V, you get a passing grade, but you’re going to have to read on. If you answered V_F = \frac{T-T_0}{k} where T0 and k are device-specific constants to be determined experimentally, you get a gold Jolly Wrencher.

vsd%2C+n-01[Jakub] earned his Wrencher, and then some. Because not only did he use the above equation to make a temperature sensor, he did so with a diode that you might have even forgotten that you have on hand — the one inside the silicon of a MOSFET — the intrinsic body diode.

[Jakub]’s main project is an Arduino-controlled electronic load that he calls the MightWatt, and a beefy power MOSFET is used as the variable resistance element. When it’s pulling 20 or 30 A, it gets hot. How hot exactly is hard to measure without a temperature sensor, and the best possible temperature sensor would be one that was built into the MOSFET’s die itself.

There’s a bunch of detail in his write-up about how he switches the load in and out to measure the forward drop, and how he calibrates the whole thing. It’s technical, but give it a read, it’s good stuff. This is a great trick to have up your sleeve.

And if you’re in the mood for more stupid diode tricks, we recommend using them as solar cells or just stringing a bunch of them together to make a thermal camera.

Up Your CAD Game with Good Reference Photos

I’ve taken lots of reference photos for various projects. The first time, I remember suffering a lot and having to redo a model a few times before I got a picture that worked. Just like measuring parts badly, refining your reference photo skills will save you a lot of time and effort when trying to reproduce objects in CAD. Once you have a model of an object, it’s easy to design mating parts, to reproduce the original, or even for milling the original for precise alterations.

I’m adding some parts onto a cheap food dehydrator from the local import store. I’m not certain if my project will succeed, but it’s a good project to talk about taking reference photos. The object is white, indistinct, and awkward, which makes it a difficult object to take a good photo for reference use in a CAD program. I looked around for a decent tutorial on the subject, and only found one. Maybe my Google-fu wasn’t the best that day. Either way, It was mostly for taking good orthogonal shots, and not how to optimize the picture to get dimensions out of it later.

There are a few things to note when taking a reference photo. The first is the distortion and the setup of your equipment to combat it. The second is including reference scales and surfaces to assist in producing a final model from which geometry and dimensions can be accurately taken. The last is post-processing the picture to try to fight the distortion, and also to prepare it for use in cad and modeling software.

Continue reading “Up Your CAD Game with Good Reference Photos”