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 Hackaday.io 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.

Hacker Maketh Kingsman Umbrella

Yes! Someone made the Kingman umbrella and yes it can shoot and yes it has a display on the inside. [James Hobson] just put up a video on YouTube for this excellent project detailing the process that went into creating this live working prop and it is amazing.

The build starts with finding a rugged umbrella and was tested by standing on it as well as decimating a few household objects. Compress CO2 cartridges provide the fuel for propelling blow darts as well as other non-lethal forms of ammunition. The coolest part of the project is the screen inside the portable that allows you to see-through the dome. This is accomplished by a combination of a small camera and a portable mini projector. Simple yet awesome.

The camera is mounted near the muzzle whereas the projector is sliced-up and integrated into the grip. The handle in question is itself 3D printed and includes a custom trigger into the design. Check out the video for a demonstration of the project.

Movie props have a special place in every maker’s heart and this project is an excellent example of imagination meeting ingenuity. After seeing this video, security agencies are going to be giving umbrella owners some suspicious looks though creating own of your own could be a very rewarding experience. If you are looking for a more obvious prop, then check out the PiPBoy Terminal from Fallout which is sure to get everyone’s attention. Continue reading “Hacker Maketh Kingsman Umbrella”

Relay Computer: You Can Hear It Think

Modern digital computers have complex instruction sets that runs on state-of-the-art ALUs which in turn are a consequence of miniaturized logic gates that are built with tiny transistors. These tiny transistors are essentially switches. You could imagine replacing with electromagnetic relays, and get what is called a relay computer. If you can imagine it, someone’s done it. In this case, [jhallenworld].

The Z3 was the first working programmable, fully automatic digital computer designed by Konrad Zuse. The board employs modern semiconductor devices such as memory and microcontrollers, however, the CPU is all relays. A hexadecimal keyboard allows for program entry and a segment display allows tracking the address and data. The program is piped into serial to the parallel decoder and fed to the CPU where the magic happens. Since the core is electromechanical it is possible to connect the output to peripherals such as a bell as demonstrated near the end of the video.

This project is a good balance of retro and modern to be useful to anyone interested in mechanical computers and should be a lot of fun for the geek kind. Hacking this computer to modify the instruction set should be equally rewarding and a good exercise for students of computing theory.

There is a SourceForge page dedicated to the project with the details on the project including the instruction set and architecture. Check out the video below and if you are inspired by the project, be sure to check out the [Clickity Clack]’a Videos on designing a relay computer bit by bit.

Me Casa es Techno Casa

“Jarvis, make me a sandwich” is not a reality yet. Though there exist a lot of home automation products out there today, commercial solutions just don’t make the cut for the self-respecting geek. So [Matias] took the DIY route with his La CasaC Home Automation project and achieved the functionality he was after.

[Matias’] project is one of the most elaborate and large-scale DIY home automation projects we have seen in recent years. With over 200 nodes, this project took a number of years of planning and execution. The core of the design is the ever popular Raspberry Pi running OpenHAB to ease the pain of customization and integration with various protocols. To further simplify the ginormous task, the design uses RS485 to communicate between master and slave devices.

Each wall node is managed by a nearby Arduino which in turn talks to a central Arduino Mega. OpenHab takes care of the higher functions such as UI, integration with existing hardware such as the solar heater, media center control,  and RFID and keypad control. Sensor data aggregation and building management is done centrally with data funneled to a separate NAS system as long-term storage.

What makes this project awesome is that [Matias] did not integrate a Raspberry Pi into his house, no! He actually integrated his entire house around the system because this build includes the construction of the house as well. Take a look at this Google Photos Gallery to see the photographic progress of the build. That is amazing!

The code and snippets are available on GitHub for your viewing pleasure though that seems the easy part. If this inspired you, then also take a look at the Raspberry Pi Home Automation of a Gingerbread House if you’d like to try it out before fully committing.

Control Thy LED

In a previous article, I discussed LEDs in general and their properties. In this write-up, I want to give some examples of driving LEDs and comparing a few of the most commonly used methods. There is no “one size fits all” but I will try and generalize as much as possible. The idea is to be able to effectively control the brightness of the LED and prolong their life while doing it. An efficient driver can make all the difference if you plan to deploy them for the long-haul. Let’s take a look at the problem and then discuss the solutions. Continue reading “Control Thy LED”

DIY Mocha Cooker

Food-grade 3D printing filament is on the rise and it is nice to have a custom coffee mug in the office to instill a little envy in the locals. [Stefan] took it upon himself to create a Mocha Machine that he would 3D print and test the boundaries of his filament.

[Stefan] used Fusion 360 to replicate the famous Bialetti Moka Express pot in it true octagonal shape. Since the pot brews coffee under pressure, he tested tolerances in Fusion 360 to make sure all the thicknesses were right. While the design was being printed, a steel washer was added to facilitate induction heating since you can’t really put a plastic pot over a flame. The print uses Formfutura Volcano PLA which is annealed for an hour at 110 degrees Celsius.

Below is a video of the whole process and though the material may not be food grade, the project is definitely a step in the right direction. Since the printed parts can withstand temperatures of up to 160 degrees Celsius, projects that involve boiling water or experiments with crystallization can benefit from a custom design.

We really hope to see more projects that use this technique, however, for those looking at their coffee machine right now, take a look at more coffee machine hacks as well as alarm clock hacks to get the coffee brewing in the morning.  Continue reading “DIY Mocha Cooker”

Finishing A Mini PS One: SLA vs Extruded

One of the biggest lessons learned by first time 3D printer users is that not everything can be replicated and a printer is a machine and not a miracle worker. It has limitations in terms of what it can print as well as the quality of the output. For teeny tiny objects, the 0.8 mm nozzle will just not do and with resin printers on the rise, the question is, ‘are extruder printers obsolete?’

[Dorison Hugo] has made a mini version of the PS One using a Raspberry Pi which you can play games one. The kicker is that in his video, he does a comparison of an SLA printer and a cheaper extruder one for his enclosure. He goes through a laundry-list of steps to print, file, fill, repair, sand paint, sand, paint etc to try to get a good model replica of the original PS One. He then proceeds to print one with an SLA printer and finishes it to compare with the first model. The decals are printed on an inkjet for those who are wondering, and there is a custom cut heatsink in there as well that was salvaged from an old PC.

Spoiler alert! The SLA wins but in our view, just slightly. The idea is that with enough elbow grease and patience, you can get pretty close to making mini models with a cheaper machine. The SLA print needs work too but it is relatively less and for detailed models, it is a much better choice. We really enjoyed watching the process from start to finish including the Dremel work, since it is something that is forgotten when we see a 3D print. Creating something of beauty takes time and effort which stems from a passion to make.

Take a look at the video below of the time lapse and for  SLA printer fans, have a look at the DIY SLA printer which is a Hackaday Prize Entry this year. Continue reading “Finishing A Mini PS One: SLA vs Extruded”