Calibration of a Piezoelectric Accelerometer by Comparison to a Reference Transducer

Introduction

Today’s modern technology is full of sensors. Sensing temperature, motion, force, humidity, sound, electricity, radiation – basically every imaginable physical quantity – necessary to measure and understand our environment. This is usually done with so-called transducers (sometimes abbreviated as Xducers) which convert the measured physical quantity (e. g. temperature or any kind of a signal) into a different physical quantity (e. g. resistance, voltage) or any other type of signal. In many cases, the transducer converts the measured physical quantity into an electrical signal which is used as an input to a digital voltmeter or an analog-to-digital converter. The conversion into electrical quantities is highly practical in order to be able to connect the transducer with our measurement instruments or our microcontrollers (which are basically small computers). A special kind of transducers I want to talk about here today are piezoelectric accelerometers.

Figure 1: Small selection of newly acquired accelerometers. The accelerometers in the front row are obviously damaged and will not be tested/calibrated. The accelerometers in the back row have no visible defects although they may have some issues. The previous owner labeled them as “replaced due to repair”. Whether they work or not has to be determined.

Just recently I’ve acquired a huge batch of piezoelectric accelerometers in an unknown condition which need to be tested for functionality. The goal of this project is to develop a small prototype calibration device in order to be able to calibrate piezoelectric accelerometers by comparison method.

Piezoelectric Accelerometers

Working Principle

Piezoelectric (PE) accelerometers are basically “acceleration-to-charge” transducers. They rely on the piezoelectric effect which – in simple words – converts mechanical energy into electrical energy. A piezoelectric transducer consists of a piezoelectric material (e. g. quartz, lithium niobate) and a small seismic mass.

Figure 2: Elements of a single-ended compression-type piezoelectric accelerometer, presumably from manufacturer Endevco (Model 213E, 233, 2272 or similar). The accelerometer housing was cut open in order to see the seismic mass, piezoelectric disks and electric connections.

As soon as dynamic forces act on the spring-mass-system along the acceleration-sensitive axis, mechanical stress is introduced on the piezoelectric material which is mounted inside of the accelerometer housing (see Figure 2). The resulting deformation of the PE material causes a polarization which in return generates a change in surface charge density. The change in surface charge density is directly proportional to the mechanical stresses (e. g. force or pressure) and therefore proportional to the acting force or acceleration (if you remember the Newton’s 2nd law \( F = ma \longrightarrow a = F/m \)). The resulting change in surface charge density can be detected, amplified and converted into a measurable voltage with a proper signal conditioner or so-called “charge amplifier”. For simplicity’s sake I’ll refer to “charges generated by the accelerometer” instead of “polarization and change in surface charge density of the PE material”.

Harmonic Oscillator

From a mechanics point of view, the basic construction of a PE accelerometer can be approximated as a spring-mass-system with a low dampening as shown in Figure 3.

Figure 3: Analogy of a piezoelectric accelerometer to a harmonic oscillator.

The harmonic oscillator is a very basic physical model of a spring-mass-dampener system. The huge advantage of this model is its simplicity: the harmonic oscillator equations contain the Newton’s laws of motion (\(F = ma\)) and Hooke’s law (\(F = kx\)) which can be solved analytically using so-called differential equations. While I’m skipping the mathematics part here and just want to mention that in reality things are more complex, some of the results of the differential equation for a driven harmonic oscillator are shown in Figure 3. Applying oscillations on a spring-mass-dampener system leads to the curves (Bode plots) showed in Figure 3. One of critical parameters of a harmonic oscillator is the natural frequency \(\omega_\mathrm{n}\). It’s a particular frequency where the spring-mass-system is oscillated (or “shaken”) in resonance, e. g. the mechanical system responses with very large displacement amplitudes while being excited by very small amplitudes. Resonance phenomena can be experienced in everyday situations like music instruments, swinging bridges, vibrations in cars driving at certain speeds, tuning forks etc.

For example, sinusoidal excitations of an accelerometer at its resonance frequency can lead to damage or change of its specified properties, e. g. sensitivity. A high resonance frequency is achieved by using stiff material (spring constant \(k\) should be high) and small seismic mass. In case of an accelerometer, the resonance frequency should be as high as possible, usually in the order of 30…50 kHz for high-frequency or shock measurements. Brüel & Kjaer suggests in [1] that the typical useable frequency range of an accelerometer is specified to approx 30% of the natural frequency.

The equation \( \omega_\mathrm{n} = \sqrt{k/m} \) for the undamped natural frequency suggests that using no seismic mass would lead theoretically to an infinite natural frequency! In reality, we need a small seismic mass – it has to be just big enough so it can compress or tension our spring (which is basically the PE material) through its inertia. We need to create mechanical stresses on the PE material in order to generate our precious charges. Basically a larger seismic mass leads to a larger signal output which is exploited in the low-frequency range (\(f \ll 10 ~ \mathrm{Hz}\)) and in seismometers.

Measuring Accelerations with a PE Accelerometer

The amounts of charge generated by an PE accelerometer are very minuscule. In order to get a measureable amount of charge, the PE elements are stacked in parallel as seen in Fig. 1. We’re talking about tens to hundreds of femto-Coulombs (fC) per m/s² of acceleration up to few pico-Coulombs (or pC) per m/s². Typical values are in the order of few pC where \(1~\mathrm{pC} = 10^{-12}~\mathrm{A} \cdot \mathrm{s}\). Just imagine charging a small capacitor with a capacitance of C = 100 pF and a voltage of U = 0.1 V and you will get according to the capacitor equation \(Q = C \cdot U\) a value of \(Q = 10~\mathrm{pC}\). High-intensity accelerations in the order of 1 … 100 km/s² – which are found in crash or shock testing – may generate few nano-Coulombs of charge. Measuring such minuscule quantities requires a somewhat specialized test equipment: ultra low noise coaxial cables with limited length and a signal conditioner for impedance matching, signal amplification and filtering.

Figure 4: Measurement setup consisting of a PE accelerometer (Brüel & Kjaer 8305), coaxial cable (Brüel & Kjaer AO0038) and a conditioning amplifier (Brüel & Kjaer 2525) and its equivalent circuit diagram. The PE accelerometer can be described as a charge source. The PE element acts as a capacitor in parallel with a very high internal leakage resistance. Images taken from [1].
The use of PE accelerometers is pretty much straight-forward. The accelerometer needs to be attached to a vibration source which can be virtually anything: electric motor, mountain bike, structure of a bridge, washing machine, car armature, rocket engine etc. In order to perform vibration measurements properly, one has to consider many experimental issues such as mounting, temperature influences, cable fixture, grounding loops, amplifier settings and few more. Informations on this topic can be gathered from instruction manuals and application notes from different manufacturers. In order to perform accurate measurements, the instruments needs to be calibrated.

Calibration of a Piezoelectric Accelerometer

As soon as one buys (very expensive) acceleration measurement equipment, the new instruments will be factory calibrated and the manufacturer will provide calibration certificates to the customer. A calibration certificate contains important information how to establish the relationship between the input quantity (acceleration) and the output quantity (charge or voltage). This information is usually called sensitivity of an accelerometer. The sensitivity of an accelerometer is determined during a process called calibration. According to JCGM:200 (2012), the International Vocabulary in Metrology (VIM), a calibration is

[…] operation that, under specified conditions, in a first step, establishes a relation between the quantity values with measurement uncertainties provided by measurement standards and corresponding indications with associated measurement uncertainties and, in a second step, uses this information to establish a relation for obtaining a measurement result from an indication.

In other words: a calibration is a comparison between input and output quantities of any kind. The input quantity is provided by a well-known standard, the output quantity is provided by a device under test (DUT). In case of an PE accelerometer, the input quantity is an acceleration, the output quantity is charge (or voltage if using a conditioning amplifier).

Unfortunately – when buying surplus stuff – there is always a risk of getting either a defective or incomplete unit. The provided calibration certificates may be either wrong or got lost. Some PE accelerometers are well over 50 years old and may have drifted over time. For my purposes, I’ll have to skip the “measurement uncertainties” part for now because I want to test the accelerometers for their qualitative condition and functionality. I’ll return to the metrology part in a future project.

Description of the Calibration

The calibration process is shown in a block diagram (Figure 5). In order to generate an acceleration \(a(t)\), we need to set our Accelerometer Standard (REF) and the Device Under Test (DUT) in an oscillating motion. This is usually done with an electrodynamic exciter – a technical term for “shaker” or “loudspeaker”. The working principle of an electrodynamic exciter is identical to the principle of the well-known loudspeaker. We’re generating a low distortion sinusoidal signal with a function generator which is fed into a power amplifier. The amplified signal drives the coil of the moving part inside of the exciter which in return creates the oscillating motion. Amplitude and frequency of acceleration are set by the function generator, which are typically in the range from 10 Hz to 10 kHz and 1 m/s² to 200 m/s². The frequency and amplitude ranges depend strongly on the construction of the electrodynamic shaker and the total weight of the DUT and REF accelerometers.

Figure 5: Experimental setup (block diagram) for back-to-back calibration of a piezoelectric accelerometer. The comparison method according to ISO 16063-21 is described in [2] and [3].
The generated motion is applied to both accelerometers, which are physically connected to each other. In this case, the DUT is mounted or screwed on the REF accelerometer in so-called back-to-back or piggy-back configuration. Our goal is now to establish the relationship between the input and output quantities by calculating the acceleration and measuring the output voltage of the DUT measuring chain. Basically, the charge sensitivity \( S_\mathrm{qa,DUT} \) of the DUT can be calculated as follows:

\( S_\mathrm{qa,DUT} = \cfrac{q_\mathrm{DUT}}{a} = \cfrac{u_\mathrm{DUT}}{u_\mathrm{REF}} \cdot S_\mathrm{qa,REF} \cdot \cfrac{G_\mathrm{uq,REF}}{G_\mathrm{uq,DUT}} \)

The shown equation might look scary and complicated but it’s pretty straightforward: we’re measuring the output voltages of both measuring chains and multiplying their ratio with the  charge sensitivity of our reference accelerometer (\(S_\mathrm{qa,REF}\)). Afterwards we’re multiplying the resulting expression with the ratio of transfer functions of our charge amplifiers (\(G_\mathrm{uq}\)), which have to be determined by a different type of calibration. For the sake of completeness, I would like to mention that the sensitivities and transfer functions in general are complex values (e. g. \( \underline{S}_\mathrm{qa} = |S_\mathrm{qa}| \cdot \exp{(\mathrm{j}\omega t + \varphi_\mathrm{qa}}) \)) and we’re dealing with the magnitude \( |S_\mathrm{qa}| \) of the complex transfer function. I’ll try to cover this in a future blog post.

Experimental Setup

Since we need to perform the measurements over a wide set of frequencies, it is highly recommended to automate the task as much as possible. The instrument control, data acquisition and data analysis can be done with a PC. I’m using Python 3.9 with pyvisa, pandas and numpy on a Windows 10 machine. My accelerometer reference standard is a Kistler 8076K piezoelectric back-to-back type accelerometer. For the purpose of this experiment, I’ve tested two different PE accelerometers: Brüel & Kjaer 4371 and Endevco 2276, which are so-called “single-ended” accelerometers. Single-ended type accelerometers can be mounted on the top of a back-to-back type accelerometer and therefore calibrated by comparison method. The vibrations are generated by a Brüel & Kjaer 4809 electrodynamic exciter which is connected to a Brüel & Kjaer Type 2706 Power Amplifier and an Agilent 33250A frequency generator. I’ve used two charge amplifiers  for the accelerometers, basically Brüel & Kjaer Types 2650 (REF) and 2635 (DUT). They were connected to HP 34401A digital multimeters. AC voltage measurements were performed in “ACV mode” which outputs the root mean square (RMS) voltage of the respective measurement chain signal output. An oscilloscope can be used to monitor the output waveforms in order to detect unwanted noise and distortions. This is a small downside of RMS measurements: the DC offsets and noise fully contribute to the measurement result.

Setting up the devices wasn’t very difficult. The electrodynamic exciter needs a stable and massive base along with an adequate vibration isolation. If the vibration isolation is neglected, the vibrations are coupled into the desk and into the building. Using hard foam between the desk and granite block proved being very inexpensive and efficient. The support for low noise cables are also improvised. The cable mounting is a major source of experimental errors. Due to the triboelectric effect, a bending or vibrating coaxial cable also generates charges which are superimposing the measured accelerometer signal. In short words: the reference accelerometer is measuring a slightly higher acceleration than expected. Therefore the sensitivity drops due to \( S = q/a\). This can be seen in the measurement results at frequencies below 25 Hz. At higher frequencies (e. g. > 25 Hz) the displacement amplitude of the vibration becomes very small and the triboelectric effect becomes negligible. I’ve used a torque wrench with 2.0 Nm and the contact surfaces were slightly lubricated in order to prevent deviations at higher frequencies (>5 kHz).

Measurement Results

 

Figure 6: Frequency response (magnitude) of Endevco 2276 piezoelectric accelerometer in comparison with datasheet specifications.

The calibration result can be seen on the left hand side in Figure 6. The top curve represents the charge sensitivity of the DUT plotted vs. excitation frequency. There are some deviations in the frequency response which are really annoying but I’m really satisfied with the overall result. Calculations of the relative deviation of the charge sensitivity at a reference frequency of 160 Hz can be compared with the data provided by the manufacturer. A 5% deviation at 6 kHz is in a good agreement with the specifications! My measurements show even higher deviations at frequencies f > 6 kHz so there must be some kind of systematic error which has to be investigated. Nevertheless, the measurement is automated and it takes approx. 5 minutes for a “sweep” of 31 discrete frequencies in the range from 10 Hz to 10 kHz. I’ve used standardized frequencies which are known as Third Octave Series according to ISO 266. The bottom graph shows the acceleration amplitude over the frequency range. I’m ramping up slowly in order to minimize distortions. A limit of 20 m/s² is set for noise reasons in my apartment – the generated sine tones can be very annoying and I don’t want to wear ear protection all the time.

Summary and Conclusion

This project clearly is a success! It took much time and effort in order to get the experiments straight and to automate the measurements. I was able to perform a calibration of a piezoelectric accelerometer with decent quality equipment. The results are “not bad” although I see much room for future improvements. I’ll have to improve the measuring chains and eliminate noise sources. I’d like to improve the Python code and generate a Graphical User Interface (GUI) for calibration purposes. Playing with a HP 3562A Dynamic Signal Analyzer was also very fun! I was able to dump the FFT measurement data (Thanks to Delrin for his Python hint!) via GPIB and didn’t rely on photographs of the display. A little downside of this instrument is its loudness and electricity consumption in the order of 400 W. I’ll certainly use the signal snalyzer during the winter months in order to heat my apartment 😉 I’m literally scratching on the surface in the fields of vibration measurements and the future will bring more interesting projects. The ultimate goal is to build a laser interferometer as an acceleration reference standard and to estimate the uncertainties of the built calibration devices.

References

[1] Serridge and Licht, Piezoelectric Accelerometer and Vibration Preamplifier Handbook, Brüel & Kjaer Naerum, Denmark, 1987
[2] Methods for the calibration of vibration and shock transducers – Part 21: Vibration calibration by comparison to a reference transducer, ISO 16063-21:2003
[3] Richtlinie DKD-R 3-1, Blatt 3 Kalibrierung von Beschleunigungsmessgeräten nach dem Vergleichsverfahren – Sinus- und Multisinus-Anregung, Ausgabe 05/2020, Revision 0, Physikalisch-Technische Bundesanstalt, Braunschweig und Berlin. DOI: 10.7795/550.20200527

 

Calibration of a Piezoelectric Accelerometer by Comparison to a Reference Transducer Read More »

Agilent E4432B Signal Generator Repair

Introduction

About a year ago, I bought an Agilent E4432B ESG-D Series Signal Generator on eBay. Those signal generators are used in the area of analog and digital wireless communications system testing. The frequency range of my model goes from 250 kHz up to 3.0 GHz, the maximum radio frequency (RF) power output into a 50 Ω termination is in the range from +17 dBm  to -136 dBm. This instrument will be useful in a different project of mine where I need a good spectral quality sinewave at frequencies of about 80 MHz for mixing RF signals. Another very useful feature is the ability to modulate the carrier frequency (AM or FM) which can be demodulated by a Software Defined Radio (SDR). It can be automated via GPIB and synchronized to a 10 MHz reference. Due to its high broad frequency coverage and level accuracy, it would be useful to test my (currently broken) spectrum analyzers, too. Unfortunately, my eBay score had a flaw which I want to talk about.

Fig. 1: Agilent E4432B ESG-D Series Signal Generator

Problems with the Step Attenuator

The unit I received is about 15-20 years old and had already approx. 61000 operating hours (equals to ~7 years of 24/7 operation) and 770 power cycles. It was overall in a good shape although one of the external input BNC jacks was loose and had a slightly damaged thread. After turning the signal generator on, I ran the diagnosis and no faults or errors occurred. I tried to set up an RF signal output at different frequencies and I noticed a very uncommon behavior: there was a sinewave at set frequencies in the range from 250 kHz up to 400 MHz (max. analog bandwidth of my oscilloscope) but the signal wasn’t present at certain amplitude levels. I checked the different amplitude levels noticed some kind of a strange pattern (see Table 1).

Table 1: Tested amplitudes at 10 MHz. The plus sign (+) indicates a present signal, minus sign (-) represents “no signal”
Amplitude (dBm) -60 -55 -50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0
Signal present? ? + + + + + +

The signal at -60 dBm and lower amplitudes was too weak for my oscilloscope to detect but the pattern indicated a problem. Luckily I’ve seen a repair video by Shahriar of TheSignalPath  some time before acquiring this signal generator where he had a similar unit on the healing bench with identical symptoms. This kind of problem seems to occur in HP/Agilent test equipment (e. g. Types HP 8648A or E4400 Series signal generators or HP spectrum analyzers) where mechanical attenuators are actuated by solenoids. The detailed construction and working principle of the mechanical step attenuator is well explained in Shahriar’s video. There is also a very good repair video from YouTube user idpromnut where I got many useful repair tips.

Fig. 2: Aging O-rings as error source inside of the Agilent 33322-60014 step attenuator. Image credit: YouTube/TheSignalPath

While changing the attenuation range in steps of 5/10/20/40/60 dBm, the corresponding solenoid exerts a force on very small rubber O-rings which are used as an interface between a metal plate and plastic plungers (see photos). The plastic plungers are connected to metal strips which are pushed onto resistor traces in order to make electrical contact with a corresponding attenuation resistor. Over time, the O-rings lose their flexibility, become brittle and are either crushed by the actuating mechanics or just fall off their spot. This impairs the ability to switch the attenuator levels properly. Checking the instrument diagnosis revealed over 660k attenuator cycles which supports the faulty O-ring assumption. Luckily, this fault is  easily repairable to a certain degree without having to disassemble the delicate RF parts. Buying a new attenuator wasn’t an option because the current prices on eBay are in the order of $500 per attenuator. The signal generator is worth $700 – $1200 depending on measurement capabilities/installed options so replacing the attenuator would hurt the hobby budget.

Fig. 3: Schematic drawing of the attenuator mechanics and O-ring

In order to repair the attenuator, the O-rings have either to be replaced or glued with a flexible epoxy according to TheSignalPath video. I’ve chosen the replacement method since I don’t have proper epoxy glue. However, idpromnut showed in his attenuator repair video the replacement procedure of O-rings on a similar unit. He suggested to buy “Wrist watch clock Crown-O-Rings” on eBay from RUIHUA No. CO-12. It’s a set of O-rings in different sizes used by watchmakers. I ordered mine from XIAOJIA for approx 9 EUR. The replacement O-ring size is “2.0mm 1.0×0.5” (2.0 mm outer diameter, 1.0 mm inner diameter and thickness 0.5 mm).

20220823_010314.jpg
Fig. 4: XIAOJIA No. 0220 Watch Crown O-Ring set. I used the 2.0mm 1×0.5 O-Rings in order to replace the faulty ones inside of the Agilent 33322-60020 step attenuator

Repair Attempt

Fast forward to August 2022. Back in June 2021 I didn’t have the right lab equipment and spare time. It wasn’t a high priority repair so more than a year passed by. Meanwhile I acquired enough lab equipment to start a repair attempt. My basic tools were: screwdriver with hex/torx bits, flashlight, magnification glass, tweezers and a 1 Nm torque wrench for the SMD connectors. I was a bit paranoid concerning electrostatic-sensitive devices (ESD) so I used an ESD mat and ESD-compliant tools during repair. Wearing latex gloves proved to be useful because of ESD matters and avoiding contamination of sensitive parts and metal surfaces with grease or fingerprints. I had access to other tools like torque screwdriver and a stereo microscope for additional delicate work which weren’t necessary for this repair. I cleaned my lab prior to this repair attempt in order to remove as much dust as possible to mitigate the contamination of the (ESD-)sensitive electronics. I’ll post some pictures showing the repair steps. I’ve uploaded many more pictures into my Piwigo Photo Gallery. Check them out if you want to see more high-resolution images.

20220822_204956.jpg
Fig. 5: Agilent E4432B after removal of the covers
20220822_205646.jpg
Fig. 6: Photograph of the RPP (reverse power protection) module. The step attenuator is located just behind the RPP
20220822_213039.jpg
Fig. 7: After removing two cables, unscrewing the rigid coaxial connectors and removing two screws, the RPP/attenuator assembly can be lifted out very easily
20220822_213953.jpg
Fig. 8: Further disassembly of the RPP and Agilent 33322-60020 step attenuator
20220822_215914.jpg
Fig. 9: Screwdriver used to open up the Agilent 333222-60020 step attenuator. The +20 screws on the top (covered by the Agilent label) were not removed, only the screws on the left and right hand side covers
20220822_220513.jpg
Fig. 10: Agilent 333222-60020 step attenuator close-up. After removing the side cover, broken O-ring fragments fell out
20220822_223049.jpg
Fig. 11: Agilent 333222-60020 step attenuator after removing the shield/housing
20220822_223216.jpg
Fig. 12: Visual inspection of rubber O-rings and plastic plunger inside of a Agilent 333222-60020 step attenuator. One can see clearly a brittle O-ring in the center of the image which will fail somewhere in the future. However, this attenuator stage is still in a working condition
20220822_231828.jpg
Fig. 13: Close-up of the faulty attenuation stage Agilent 333222-60020 step attenuator). The yellow/brown-ish plastic plunger is moved by the metal plate up and down. At a certain point, the O-ring became brittle, opened up and got stuck to the metal housing. The other O-ring (not seen in the picture, hidden behind the silvery screw) already fell apart and crumbled away

At this point, the visual inspection showed one attenuator where O-rings were missing. Other stages were in a decent working condition. However, the impending failure was clearly visible. I decided not to disassemble the whole unit and try to insert new O-rings. This had to be done by fiddling around with tweezers and trial-and-error. It took me about two hours to insert two O-rings. In the end, they fitted perfectly.

20220823_000342.jpg
Fig. 14: I was trying to use sharp tweezers and push the O-ring into its place. The O-ring slipped many times and I had to start all over again
20220823_005940.jpg
Fig. 15: Photograph of the attenuator stage after a successful replacement of the failed O-ring. The newly installed O-ring can be seen on the top of the metal plate (the metal plate is “sandwiched” by two O-rings)
20220823_012240.jpg
Fig. 16: Faulty parts after repair of the Agilent 33322-60020 step attenuator. The rubber O-rings have dried out, become very brittle and failed. The outer diameter of the circular O-ring is approx. 2.0 mm
20220823_013228.jpg
Fig. 17: The assembly was done in the reverse order. It’s important to use a torque wrench for the SMA coaxial connectors. A torque of approx. 1 Nm or 9 in-lbs is necessary according to the service manual. Applying correct torque is needed to prevent damage of the connectors. It also affects the RF performance in the GHz range
20220823_015048.jpg
Fig. 18: Testing of the repaired unit. The signal at 0 dBm amplitude wasn’t present prior to this repair attempt. After repair, all amplitude settings worked without problems!

Summary and Conclusion

I would consider this repair as “easy” thanks to TheSignalPath and idpromnut‘s detailled repair videos. I couldn’t do it by myself because I’m not an RF test equipment expert and I haven’t done such repairs before. It’s just another hobby and I’m relying on some help from the outside. However, this repair was very rewarding and only temporary. The visual inspection showed the impending failure of the remaining O-rings. Servicing this unit will surely be necessary somewhere in the future. I’ll have to replace every O-ring to be sure they won’t fail again for the next few years.

Also one has to consider post-repair procedures as the service manual suggests. I haven’t checked the amplitude over the frequency range because of limited measurement capabilities. I just recently acquired a RF power meter which has to be calibrated first. My spectrum analyzers only cover the frequency range up to 1…1.8 GHz and aren’t very trustworthy. I’ll also have to check the post-repair performance of the step attenuator with a Vector Network Analyzer (e. g. NanoVNA V2 Plus4) in order to be sure the unit is working properly.

Agilent E4432B Signal Generator Repair Read More »

Bicycle Tour 2022

I really love bicycle touring. My last bike tour was back in July 2019 and took like 16 days and approx. 1000 km. The past two years have been very difficult for travelling due to COVID-19 restrictions. The camping sites either closed or the COVID-19 rules were very restrictive and differed from site to site. Travelling in 2020 and 2021 was really difficult and risky. Luckily, the situation changed in 2022 and due to vaccinations, declining COVID-19 pandemic situation and reopening of the tourism and travelling sectors in Germany, it was possible to travel again.

I took the chance and organized a little bike tour during my vacation. My original plan was something like this: travel by bike and tent for 6 days from Hanau to Braunschweig, Germany. It was coupled with a visit to my relatives in Hanau – a mid-sized town near Frankfurt am Main in the state of Hesse. The daily tour distance should be something like 60-80 km and the total distance from Hanau to Braunschweig should be approx. 400 km. Planning the route by OpenCycleMap.org was pretty easy but I missed two important factors: the terrain and total weight of me and my bike. While the terrain in Lower Saxony is mostly flat and very easy to manage – this isn’t the case in the hills of Hesse, especially when one has a 40 kg packed travelling bike and approx. 120 kg of muscles fat riding the bike. So yeah… I kinda underestimated the effort which was punished later 😉

However, I was preparing this tour for about a week. Riding approx. 30 km per day helped to build condition and to get used to sitting on a bike for 2+ hours.

Day 1: Hanau – Gelnhausen – Schlüchtern

The tour started on the hottest days of the month. This wasn’t planned at all. The temperatures were around 37-39 °C and there was not even one cloud from early morning until sunset. This was definitely not my cycling weather. Cycling the first 40 km was easy until the heat drained my powers. The last 20 km were exhausting but I managed to reach Schlüchtern. My first camping site was about 3 km outside of Schlüchtern – “piece of cake” I thought. The camping site was on a hill of approx 250 m height. My mistake was using the Google Maps guide. The suggested route was closed and I spent 2 hours in the woods and hills pushing my 40 kg bike at 12% upward slopes. I finally managed to reach the camping site Hutten-Heiligenborn at 8 pm and was wrecked. The camping site was very nice and I was welcomed by the site manager. Tent, shower, dinner, sleep, RIP.

Day 2: Schlüchtern – Fulda – Schlitz

The cycle route downhill was really nice! I was able to go at 40-50 km/h for about 7 km. 26 km later, I reached the city of Fulda. Fulda was very inviting due to very good cycling roads. I visited the central train station involuntarily because I got lost few times due to bad road signs. Nevertheless, the temperatures rose higher and higher up to 39 °C and my performance dropped steadily. In the village of Kämmerzell I got lost again but this was really bad. The route got me into a 7 km lasting agony of steep hills (remember? 12% upward slope at 39 °C and 160 kg of total mass?) which lasted for like 3 hours. Luckily, I was pushing my bike on forest roads where most places were in the shadows at 35ish °C but that’s it. This unintentional route killed my schedule and I was unable to reach my planned camping grounds.  My provisions have been spoiled by the hot weather and I had to resuppy it on the next day. Luckily, there was a small camping site in the city of Schlitz (where I got lost again, thanks Google Maps). Later at night, there was a thunderstorm but this was no problem for my Hilleberg Unna tent!

Day 3: Schlitz – Bad Hersfeld – Melsungen

I think this was the best cycling day I had in a long time. Due to the thunderstorm and colder weather, the temperatures dropped significantly from 39 °C to a cloudy 23 °C. This was like heaven for cycling – the heatwave was gone and the temperatures were ideal for cycling. My performance on this day was OK: my muscles and my butt didn’t hurt much and I was able to cycle 95 km total. I still wasn’t able to catch up to my schedule because I was like 40 km behind. When reaching the city of Melsungen at 7 pm, I thought I had enough power to make it the next 40 km but as soon as I saw the next camping site, I knew it was time to get some rest. Cycling at night in unknown terrain can be dangerous (you get lost very easily, bad sight during night). So I stopped on a small camping site near Melsungen and it wasn’t a bad decision at all.

Day 4: Melsungen – Kassel – Hann. Münden – Hemeln

Oh yeah, I overdid it on Day 3. The daily goal was set to 90-100 km but I managed to get only 78 km total. The weather was very good (cloudy, 25 °C) and I was progressing very well until I reached the city of Kassel. Here I got lost multiple times due to construction sites and spend like 2-3 hours cycling through Kassel. I stopped here and there to take photographs but wasn’t able to do a sightseeing tour. Kassel was very stressful because I had to take routes on busy roads for a while until I found the correct cycling route. This set me further back in my schedule. The route from Kassel to Hannoversch Münden was very nice and relaxing. I met another elder cyclist which cycled with me for about 12 km. Having company was nice because we were very fast and could talk about the usual stuff (small talk). Hann. Münden was a very nice city – this is the place where the rivers Fulda and Werra combine into the river Weser. I wish I could have stayed there longer. However, I left Hann. Münden at 2:30 pm and at about 3:30 pm, my performance started to decline due to muscle and rear pain. I didn’t want to ignore the pain signs and I visited a camping site in a village called Hemeln. Good decision (as usual). I needed some rest and as soon as my tent was up, I went inside and slept for like 2 hours. Then shower, dinner, sleep 8h.

Day 5: Hemeln – Höxter – Holzminden – Stadtoldendorf – Braunschweig (by train)

Unfortunately the final cycling day. I got up very early in the morning and left the camping site at about 8 am. All the muscle pain was gone and I was able to cycle at a fast pace again. The weather wasn’t very bad and this got me excited because I felt like I could do 100+ km on this day. My goal was Seesen, a small town near the Harz mountains. The distance was calculated at about 140 km. Since 100 km are no problem, an extra 40 km should be possible, too. Wrong! The first 60 km weren’t bad at all. My speed was OK but the temperatures started to rise again. By noon, the temperature was at 28-30 °C and my rear started to hurt every few kilometers. So I had to push the bike for a while until the pain went away but this set me back in my schedule. After visiting few cities such as Bad Karlshafen, Höxter and Holzminden, I left the Weser cycling route and set the route towards east (R1). At 80 km distance, I was really exhausted and had to take breaks every few kilometers. I reached a place called Stadtoldendorf at 4 pm and still had to cycle 50 km to Seesen. At 13 km/h, this would have taken 4 hours at least. I resupplied my water and food in Stadtoldendorf and I got lost again due to a major construction site. Unfortunately, Google Maps calculated a wrong route directing me into steep hills and I gave up.

I re-routed Google Maps to the next train station and started the adventure back home to Braunschweig by train. Luckily, I was able to travel with my 9-EUR-Ticket and the trains were not full at the time. After spending 3 hours in regional trains, I was able to reach home safely. My daily distance was 110.95 km, my new personal record (my highest was at 110.68 km in the year 2019). I must admit, I had to use Ibuprofen due to muscle pain.

Summary

It was a very interesting and adventurous cycling tour 2022 (as usual). I’ve seen many wonderful landscapes and places, cycled about 425 km total. The weather was good and bad and I got lost many times (as always). I learned a bit about planning routes and learned a lot about my cycling performance. Using petroleum jelly for skin lubrication was a winner. I packed the wrong stuff which I never used on tour (gas stove, blanket, accessories, food) but which added to the total weight. My provisions got spoiled by the hot weather so this is an important issue to consider for future routes. I hope to reduce my body weight by winter so I’ll be able to do another cycling tour at the North Sea. I’ve done this before and it was one of the best cycling tours I had so far.

I would recommend everyone to participate in such cycling tours. If you’re not a cyclist, go hiking instead! It’s a challenge to travel alone over the course of many days. For me it’s important to realize that travelling from A to B takes time and effort. Sure, one can drive into holidays or fly by airplane with little to none effort. This behavior has two negative effects: people just don’t realize how hard it is to move things from A to B and we take many modern things for granted. Cars and airplanes may be the foundation stone of our modern civilization but our civilization will have to change significantly in the next few decades or we’ll have really difficult times here on earth (climate *cough* change).

 

Bicycle Tour 2022 Read More »

Tektronix TDS 754D, Four Channel Digital Phosphor Oscilloscope

Introduction

Over the past two years, I have acquired a decent amount of Tektronix analog oscilloscopes. I would say “decent amount” because having 10+ oscilloscopes is not that much compared to other Tektronix enthusiasts. Nevertheless, my colleagues already started questioning my sanity. Different topic. I really like Tek analog oscilloscopes and I love to work with them. However, doing everyday measurements in analog has its downsides in terms of comfort and workflows. It was about time to go digital!

Analog vs Digital

Do you want to do a “quick” measurement and document it? Sure: turn on the oscilloscope, set the ranges/triggering and observe the electron beam trace! Experienced users can set up the measurement in seconds to less than a minute. However, when it comes down to taking quantitative measurements, this process may take a while. If the values of the amplitude, phase or frequency of a signal are not of importance, e. g. one does qualitative measurements where just the shape of the signal is of interest (sinewave, squarewave, noise), the measurement can be done in a matter of seconds. However, if quantitative measurements are of importance (amplitude, phase, frequency, risetime), the average user will spend a lot of time counting the marks on the graticule which can be prone to errors, too.

In order to document the measurements, one has to take photographs of the screen. Unfortunately, some analog oscilloscopes have no measurement annotations on the screen. The user has to take care of this – it can be a huge trap for young players. I’ve been there before and it wasn’t easy figuring out why I have 13 pictures of oscillograph curves but only 10-ish lab notes documenting the oscilloscope settings… Which setting did I use for Channel 1 and Channel 2? Why are the images blurry? How about those annoying reflections on the screen? Another downside of an analog oscilloscope would be of a “first-world-problem” type: at very low frequencies (in the range of few Hz), it’s very difficult to view a complete image of a single waveform. The electron beam  sweeps too slowly across the screen – it doesn’t leave a persistent trace which makes reliable measurements difficult. However, it is possible to view single waveforms with an analog storage oscilloscope.

Fast-forward to the 1990’s to 2020’s – the era of digital oscilloscopes. The early digital models were slow and limited in their measurement capabilities. The advances in technology (improved analog-to-digital converters, more RAM and storage, digital signal processing, automation) helped digital oscilloscopes to become very powerful instruments. As the name suggests, a digital oscilloscope converts an analog signal into a digital one. Once the time-dependent (analog) voltage has been converted into basically numbers, one can play with waveforms and do useful calculations. It’s very easy to calculate values such as min/max/average or standard deviation. Implementation of sophisticated signal processing algorithms opened the doors to Fast Fourier Transform (FFT), logic analysis, complex triggering and much much more. Digital oscilloscopes also have one huge advantage over their analog counterparts: one can capture and store a single waveform for viewing (e. g. zoom in in order to see more details). Tektronix released a very nice publication on this matter, The XYZs of Oscilloscopes Primer. It can be downloaded for free from Tek’s website.

Purchase Criteria for a Digital Oscilloscope

In my case, I just needed a general-purpose digital oscilloscope in order to make quick measurements and do the documentation stuff.

Now what to look for? The key specifications would be: number of channels, analog bandwidth, sampling rate, memory and vertical resolution. Modern-day oscilloscopes have all kinds of additional features such as interfaces (USB, RS-232, Ethernet, GPIB), touchscreen display, integrated digital multimeters, VGA/HDMI/DisplayPort, input termination (1 MΩ/50 Ω) and much more. Those features can improve your workflow and speed up your work. I should mention that the size of the oscilloscope can be important, too. Digital oscilloscopes can be very compact and take almost no space on the bench compared to their analog counterparts. This is important for people with space constraints like a student’s living room or a small garage. There is one more parameter which sums up the features: the price 🙁

I’ve scrambled few hundred Euros in order to buy myself a 2nd hand digital oscilloscope. Since 2010’s/2020’s oscilloscopes are a little bit too expensive, I’ve looked into the mid 1990’s to mid 2000’s era digital oscilloscopes. By the end of 1990’s, digital oscilloscopes had quite potent measurement capabilities. Tektronix and Agilent Technologies (successor to Hewlett-Packard, now Keysight Technologies) designed excellent oscilloscopes for all kinds of applications – mobile communications, digital design and debugging, video and others. Other brands to consider would be Fluke/Philips, Hameg (today Rohde & Schwarz) or LeCroy. Fast-forward 25 years into the future and a 1990’s 20k USD high-end oscilloscope can be bought today in the order of just few hundreds Euros. I guess the only reason I’m stuck with Tektronix oscilloscopes in general is their excellent documentation (User and Service Manuals) and the ability to repair it according to the documentation. Huge props to Kurt of TekWiki and also to all the TekWiki contributors and enthusiasts which maintain the wiki pages and manuals archives. Another invaluable source of Tektronix-related information is the mailing list TekScopes@Groups.io.

Speaking of few hundreds of Euros: the price range below 1k EUR is in direct competition with modern-day digital oscilloscopes! I certainly had considered whether to spend let’s say 500 EUR on a new Rigol oscilloscope (which can be hacked/upgraded to a multi thousand dollar machine) or  on a 25 year old vintage chobby which has possibly seen darkness, torture, abuse and failures. I’ve been hesitating buying different brands such as PeakTech, Rigol, Siglent or UNI-T for different reasons. Don’t get me wrong – they manufacture great and affordable oscilloscopes. The devil is in the details.

Tektronix TDS 754D Series Oscilloscope

The Tektronix TDS Series seemed to fit very well in my scope scheme. I was looking for a decent amount of analog bandwidth (at least 400 MHz), a high sampling rate (if possible 5x to 10x the analog bandwidth) and 4 channels. Tektronix TDS 784D came in my mind because it had everything I needed. Unfortunately, it wasn’t available at the time on German markets like eBay or eBay-Kleinanzeigen (German analogy to craigslist). So I was looking for a suitable alternative. The EEVBlog community has quite a few threads on TDS Series oscilloscopes. One in particular was interesting: the models TDS 754D and 784D are electronically nearly identical. It is possible to convert a TDS 754D model (500 MHz bandwidth) into a TDS 784D (1 GHz bandwidth) by means of a small modification. This modification (removing a resistor and few capacitors) is well documented and can be done very easily. Since there were few Tek TDS 754D oscilloscopes on the market, I thought to give it a try.

First Impression

Tektronix TDS 754D is a compact unit when compared to my 7000 Series “boat anchors”. It has a very clean designed front panel, color display and vents for a large fan (approx 15 cm diameter) on the left hand side. The noise generated by the fan is a little bit annoying but tolerable. Since the heat generated by the oscilloscope has to be carried away, it’s crucial to maintain a proper airflow. There are many ventilation slots on the housing which need some clearance, otherwise the oscilloscope may be damaged due to overheating. Booting up the device takes about a minute and the warm-up time is at least 15 minutes. The color display is a little bit strange: while moving my head, the display colors are splitted into their red/green/blue components (color fringing). This is a little bit annoying but on the other hand, the image quality (in resting position) is very good – sharp image, rich colors, “dark theme” which is pleasing for my eyes when working in dim or darker environments. The oscilloscope takes quite a lot of space on the workbench. Placing the oscilloscope outside of ergonomic positions is not recommended because one has to push many buttons and turn the knobs in order to find optimal settings.

Quick Check of the Four Channels

The pictures provided by the seller showed a deviation on Channel #2 which was a little bit worrying. He attached the probe and got no signal displayed. The root of cause could have been anything ranging from a defective channel to false user setting. Luckily, it turned out to be a false setting by him. All four channels were tested with a function generator in 50 Ω and 1 MΩ (“High Z”) terminations. The amplitude was set to 1 Vpp at various frequencies – The sine waveforms were clean without any visible noise or distortion. I was able to test the analog bandwidth with my Leo Bodnar Fast Pulse Generator. It generates a 10 MHz squarewave with a very steep rising edge. When measuring the 10% to 90% rise time, one can determine the oscilloscope bandwidth as shown in my previous blog entry. The rise time of channel 1 through 4 with a 50 Ω termination was in the order of 680 ps which corresponds to a -3 dB bandwidth of 514 MHz.

Menus and Settings

The menus and settings are easily accessible through push buttons and knobs. The response is good, the menus and sub-menus are arranged in a logical order. Some settings are a little bit hidden, e. g. the switch between XY and YT display modes and waveform average settings. Nevertheless, with a little bit of practice, one will memorize the location of the settings automagically. The numerical keyboard is very convenient as soon as exact setting values are needed (e. g. if you want to set the trigger level to an arbitrary value, you don’t have to turn the knob and fine-tune).

Tektronix WaveStar and Remote Control via GPIB

I must admit, this one blew my mind. I was concerned how to transfer screenshots and images from the oscilloscope to my PC. I have bunch of 3.5″ diskettes lying somewhere around and an “old PC” (IBM ThinkCentre from the early 2000’s) which could be used for data transfer. However, transferring the data from oscilloscope to an ancient PC and from there to the local network would have been a workflow horror. According to the oscilloscope manuals, the data transfer was possible either via serial interface (RS-232) or the general-purpose interface bus (GPIB). Older oscilloscopes with GPIB interface (e. g. the Tek 2465B) can be controlled remotely but the user is unable to readout the measurements. TDS Series oscilloscopes do have this capability! It’s possible to control the oscilloscope remotely and fetch the waveform data in a human-readable ASCII format. The communication with the oscilloscope can be established either via RS-232 or GPIB. The setup is straight-forward in case of GPIB: set up a GPIB address on the device, connect the oscilloscope via a GPIB controller to the PC, install VISA drivers and it should work. Once everything is installed, the communication with the oscilloscope can be checked by sending the *IDN? command.

Installing Tektronix WaveStar and Setting Up the Oscilloscope Communication

The Tektronix WaveStar Software manages the communication between the remote controllable oscilloscope and the PC. Unfortunately, the software isn’t maintained or supported by Tektronix anymore. I’m not sure if WaveStar can be obtained from the Tek website directly – however, there is a downloadable ZIP file on TekWiki. The product key for this application is available on the internet (e. g. Tektronix user forum). I have successfully installed WaveStar on my Windows 10 (version 21H2) PC. Windows 7 or Windows XP should work, too. I’ve set up an image gallery with screenshots from the installation.

Tektronix WaveStar GUI

Using the Graphical User Interface or GUI wasn’t very intuitive after starting it. WaveStar has a Explorer View which allows access to the oscilloscope functions, such as settings, measurements, cursors etc. In order to transfer data from the oscilloscope to the PC, one has to generate a new datasheet. The selection of datasheets leads to different types of measurements. The YTSheet for example is able to plot the voltage vs. time. In order to create a “screenshot”, one has to create a new datasheet “NotesSheet” and drag-and-drop the “Screen Copy” from the Explorer View Local > TekTDS454D > Data > Display > Screen Copy (Color) into the newly created NotesSheet. After downloading the Screen Copy into the NotesSheet, it is possible to copy & paste it into different applications, such as LibreOffice Writer or MS Paint. The resolution of the image is 640 x 480 px and good enough for quick documentation purposes.

Downloading the measurement into WaveStar YTSheet
Arrangement of different measurements: WaveformMeasurement, DatalogMeasurement, NotesSheet and YTSheet

Further Data Processing

After playing few hours with WaveStar, I figured out how to extract measurement data in different ways: as vector graphics and as comma separated values or CSV. Vector graphics are very nice when it comes to publication quality images. It is possible to print out the YTScreen as a PDF file (Windows 10 offers a PDF printer driver natively, otherwise you’ll have to install one manually). The informations inside of the PDF are vector graphics which can be imported into a suitable program such as InkScape (another well-known programs would be Corel Draw or Adobe Illustrator). InkScape is an open source vector graphics editor which allows to manipulate vector graphics. Vector graphics are basically numbers which contain x,y-coordinates for lines to be drawn. Bitmap graphics on the other hand are color and brightness informations stored in a matrix. Whenever scaling bitmap images, one has to deal with (ugly) scaling artefacts where vector graphics can be scaled (or zoomed in) indefinetely.

After printing out the YTSheet as a PDF file, I imported the PDF into InkScape. It is possible to manipulate the vector images as one wishes!

Last but not least, I was able to export the WaveformTabular data into a CSV file. A CSV file can be loaded into a spreadsheet application such as LibreOffice Calc or Microsoft Excel. The waveform data can be processed afterwards – doing statistics or digital signal processing (e. g. with Python) can be done very easily!

Exporting waveform data into a CSV and plotting it in LibreOffice Calc.

Conclusion

Well, I’ve got myself a very powerful digital oscilloscope now. I still haven’t tested the full capabilities of this instrument but I’m very satisfied with its performance at this point and can recommend it to anyone seeking a 20-30 year old instrument. Although I paid far too much for it (it was well over 500 EUR), it was worth it. I’ll test its measurement capabilities during my vacation which is starting next week 😉

Tektronix TDS 754D, Four Channel Digital Phosphor Oscilloscope Read More »

My “9 Euro ticket” Travelling Experience

Introduction

Since June 1st 2022 it is possible to travel within the whole country of Germany by public transportation system with a flat-rate ticket which costs only 9 Euros per month. The ticket is time-limited and valid only during the current month. It applies only to the German public transportation system (e. g. trains of German Railways such as DB RegionalBahn, RegionalExpress, S-Bahn, also metropolitan transportation  systems such as U-Bahn, busses & trams). The ticket doesn’t apply to inter-regional trains such as ICE, IC or EC and doesn’t cover 1st class travelling in any of the mentioned transportation systems.

It was proposed by the German Government as a time-limited experiment in order to motivate people to drive less cars and as a financial relief due to very high energy and gasoline prices. The 9 Euro ticket will be obtainable during months June, July and August in 2022. The financial losses to the transportation companies due to this very cheap ticket will be compensated by the taxpayers. I think this is a good idea although its execution wasn’t very well planned. Nevertheless, it’s a step in the right direction! The German public transportation system is “OK” but isn’t able to handle – let’s say – sudden passenger increases of 20% or more very easily.

My Trip from Braunschweig to Meschede

I’ve bought myself a 9 Euro ticket and went on a trip from Braunschweig to a small city called Meschede. I’ve been living and working in Meschede for about 1.5 years before moving to Braunschweig. Although its location is in mid-western Germany and it’s only 260ish kilometers distant, it is a remote location because it’s surrounded by forests and hills of the Sauerland region. There is no easy way to get inside or outside of Sauerland 😉 My trip planner calculated a total travel time of about 5 hours and 21 minutes with approx. 1 hour of exchange durations. Travelling from Braunschweig to Meschede and back by train will be at least a 10 hr and 42 minute trip (which was the case).

I’ve started from my apartment at roughly 6:30 in the morning and took the bus to the central station. My first train went from Braunschweig to Bielefeld, a ~2hr trip. The two floor train was very clean and there was enough room for passengers and bicycle users. Changing train in Bielefeld offered a different image. The train was heading in direction to Dortmund. It was pretty full with passengers and commuters but I was able to get a seat in the bike wagon. People standing around me were 10 drunk ladies (bachelor party) which were very funny and entertaining. In Dortmund, the train filled up to its maximum capacity where I felt sorry for the passengers. They were stuffed like canned tuna. I’ve spent about 20 minutes on the Dortmund central station gathering some fresh air. Nothing special: cops everywhere, fewer-than-usual soccer fans, LGBTQ pride flag carriers, occasionally religious fanatics and beggars. It’s a wild place but somehow appealing. The last section of the route was from Dortmund to Meschede. The train was OK – clean, not too full, a little bit loud due to its diesel engines. I found a seat near a group of drunk guys which were also very funny and entertaining. At one of the train stations, another drunk guy joined and collected refundable bottles. This was so unreal, he looked like a 70 year old smashed alcoholic, barely able to walk but the drunk party donated like 10-12 empty bottles of beer instantly to him 😀

To my surprise, all trains were on time and there were no major delays. I arrived in Meschede at 12:40 so the total travelling time starting from my apartment was approx. 6 hr 10 min. I couldn’t stay for a long time in Meschede because of the 6h return trip so I planned to stay for about 4.5 hours. This is one thing to consider when using 9 Euro ticket: the travel duration killed most of the day and reduced the visit duration significantly.

However, I was able to visit my old workplace and say hello to my former colleagues and some old friends. The Open-Door Day at University of Applied Sciences in Meschede offered a rich program of science, engineering, entertainment and food. The weather was excellent and very inviting.

 

The return journey was very tiring: the train from Dortmund to Bielefeld was 15 minutes late and full to the max. We were standing for about 30 minutes without any room to move until a portion of passengers left the train. Luckily due to long exchange duration, the meanwhile 20 minute delay didn’t affect the connecting train from Bielefeld to Braunschweig. The section from Bielefeld to Braunschweig was OK – no problems whatsoever. About 90% of people inside of trains were wearing a face mask due to COVID-19 pandemic which was very nice. The current infections are very low in the region of 350 per 100 000 inhabitants but one has to be careful anyways. There may be a new infection wave in the autumn this year…

Summary and conclusion

Dortmund central train station – definitely an interesting place to be! 😉

I’ve spent most of my day travelling in trains. It was cheap but also do-able. I was able to travel from Braunschweig to Meschede and back in one day for 9 Euros! This trip would have cost at least 50 Euros instead without much improvement in travel quality. I’ve been to Meschede few weeks before this trip by car and the gasoline alone cost me 80 Euros.  The quality of trains (size, cleanliness) and its connection vary significantly from region to region. One has to consider that trains will be full during commuting hours and empty outside of them. During weekends, bicyclists take up a lot of space in the trains so this can be an issue, too. The people are usually friendly and very helpful but there are also exceptions: drunk and loud people, some of them smell badly due to sweat or even urine. The toilets are in an acceptable condition but don’t rely on this – try to take Number One/Number Two at a train station instead inside of a train toilet.

The 9 Euro ticket is definitely worth it and should be used to visit all kinds of places in Germany. There are wonderful towns and regions which should be visited during the summer time. I haven’t been to cities such as Rostock, Schwerin, Konstanz, Kiel, Flensburg, Saarbrücken and many others so I’ll try to catch up with my visits.

My “9 Euro ticket” Travelling Experience Read More »

Controlling Test Equipment via GPIB and Python

Introduction

Taking measurements with electronic equipment doesn’t require much skill and effort: turn the device on, set up the measurement parameters such as input channel/range/sensitivity, trigger the measurement and read the numbers on the screen (if there are any). The same procedure can be applied in everyday situations – whether you have to read the time from a clock or check the temperature in your fridge/oven.

But what if one does have to take thousands or even million of measurements  every day? What happens if measurements have to be performed 24/7? There surely are applications where it is necessary  to take measurements manually but putting a human behind a bench and performing boring and repetitive measurements during a 8-hour-workday is prone to exhaustion and errors. This is where automated test equipment (ATE) kicks in. It is possible to let a computer do the “boring stuff” while the human operator may spend his or her precious time on solving problems instead of doing repetitive work. I’ve successfully stolen borrowed and tested foreign Python code and want to demonstrate how to control a digital multimeter and a function generator via General-Purpose Interface Bus (GPIB) and Python’s pyvisa module.

GPIB

GPIB is a 8-bit parallel interface bus which has been invented in the late 1960’s by Hewlett-Packard (see Wikipedia article). Prior to its standardization in the late 1970’s as IEEE 488, it was known as HP-IB (Hewlett-Packard Interface Bus). It allows interconnection between instruments and controllers. It is system independent of device functions. This de facto standard has been around for a while and is well established in the Test & Measurement industry. Fast forward to the year 2022, GPIB is still present in test equipment although in recent two decades, communication with instruments have been enabled with modern-day interfaces such as USB or Ethernet. GPIB allows a very diverse topology – one can connect all instruments either in a Daisy Chain or parallel configuration or even in a combination of both of them. There are certain GPIB-specific limitations concerning cable lengths, maximum number of connected devices, data transfer speeds and others which have to be considered when automating test equipment.

Experimental Setup

Schematic of my test test setup. The HP 3325B function generator provides a sinusoidal voltage for the HP 34401A digital multimeter in order to measure a well-known test signal. Both instruments are connected via GPIB to a GPIB/Ethernet controller.

I’ve connected a HP 34401A digital multimeter to a HP 3325B function generator in order to generate a sinusoidal test signal, which can be represented by an equation \(v(t) = v_0 \cdot \sin (\omega t) \) with \(\omega = 2\pi f\). Both instruments are connected to a GPIB controller National Instruments GPIB-ENET/100. The GPIB-ENET controller acts as a bridge  and allows communication to GPIB devices via ethernet, which is highly convenient in my lab. It allows me to control the instruments via LAN from any of my computers. This device requires drivers from National Instruments so I’ve chosen NI MAX v17.5 along with NI-488.2 driver in order to be able to use the legacy GIPB-ENET/100 controller. I’m using Windows 10 along with the WinPython distribution. WinPython comes along with Python 3.9.10 and hundreds of useful modules, such as numpy, pandas, matplotlib etc. (which are optional). The pyvisa module needs to be installed manually via pip, see PyVISA’s project website for further installation instructions.

National Instruments GPIB-ENET/100. This unit is legacy and is not supported by current NI drivers anymore. The last known driver version which supports this unit is v17.5. The GPIB-ENET/1000 (1 Gbit/s version) is currently supported by National Instruments.

Important notice for new users

Many of the GPIB-USB adapters sold on eBay are fakes or counterfeits. They are sold very cheap (different brands such as National Instruments, Agilent/Keysight, Keithley) in the price range of 100 EUR to 120 EUR per piece whereas the genuine GPIB-USB adapters often cost more than 400 EUR. Buying a new unit directly from the manufacturer will cost in the order of 900 -1200EUR which is kinda crazy! Nevertheless, some of the fake GPIB-USB adapters seem to work pretty well and are recognized by the official drivers. However, some EEVBlog users also report having problems with fake adapters… So it’s really a gamble.

I’ve bought a 2nd hand “fake” GBIB-USB-HS for cheap which didn’t work for the previous owner but works perfectly on my Windows 10 machine. I haven’t tested it with Raspberry PI yet which will be done in a future project. The GPIB-ENET/100 unit is a little bit pricy (~200ish EUR) but the most affordable interface cards are the PCI-GPIB types. I’ve seen genuine units being sold on eBay for 40-80 EUR. No need to spend hundreds of Euros for a GPIB interface. Microcontroller-based GPIB-USB projects also exist where one can assemble a GPIB-USB or GPIB-LAN controller for cheap (which may not work always but gets the job done). Proper GPIB-cables can be expensive, too, but I’ve seen them being sold for approx. 7 … 12 EUR per piece occasionally. Custom-made GPIB cables out of ribbon cable and Centronics/Amphenol connectors may also work and get the job done.

NI GPIB-USB-HS adapter. Unfortunately, this unit is a fake (counterfeit). Despite being a fake, it works on my PC.

Example Code

First of all we’re gonna need to import some Python modules. pyvisa is mandatory, other modules will be useful.

# Import Python modules
import pyvisa
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import datetime
import time

Next step: we need to open the pyvisa Resource Manager. We need to know the GPIB addresses of our instruments. For example, I’ve assigned GPIB address No. 4 to my digital multimeter dmm and the frequency generator fgen has the GPIB address No. 18. GPIB 22 is another digital multimeter which isn’t used in this example.

# Open pyvisa Resource Manager, print out a list with active devices
rm = pyvisa.ResourceManager()
print(rm.list_resources())

The print(rm.list_resources()) statement gives us the GPIB addresses of the connected devices, such as: ('ASRL3::INSTR', 'GPIB0::4::INSTR', 'GPIB0::18::INSTR', 'GPIB0::22::INSTR').  Now we can open a connection to the resources.

# Assign GPIB address 4 to dmm and open resource
dmm = rm.open_resource('GPIB0::4::INSTR')
dmm.read_termination = '\n'
dmm.write_termination = '\n'

# Assign GPIB address 18 to fgen and open resource
fgen = rm.open_resource('GPIB0::18::INSTR')
fgen.read_termination = '\n'
fgen.write_termination = '\n'

The dmm and fgen objects have been created. The statements dmm.read_termination = '\n' deal with line feed and carriage returns. The next step will set the DMM settings and call an identify string via a SCPI command *IDN?

# Set the DMM for measurements
print(dmm.query('*IDN?'))                      # Identify string
print(dmm.write('CONF:VOLT:DC 10,0.001'))      # Set DC voltage range and 4.5 digits of resolution

The same commands are applied to our frequency generator. The output of the DMM looks something like (name, model, firmware version):
HEWLETT-PACKARD,34401A,0,4-1-1
22

# Set the FGEN for measurements according to the manual
print(fgen.query('*IDN?'))             # Identify string
print(fgen.write('AM 2.0 VO'))         # Set amplitude to 2 V_pp
print(fgen.write('FR 0.1 HZ'))         # Set frequency to 0.1 Hz

The parameters such as measurement range, frequency and amplitude have been set. Now let’s take a single measurement. This is done via query command. A query is a short representation of dmm.write() and dmm.read() commands. The READ? command fetches the current measurement value from the digital multimeter.

# Example 1: Take a single measurement
print('Measured value: {} Volts.'.format(dmm.query('READ?')))

Measured value: -9.97000000E-02 Volts.

We have measured the voltage! Yaay! Its value is -99.7 mV, written in the engineering notation. Our next code example will be used to take 2048 measurements and timestamp them. I’ve used the pandas DataFrame as a convenient structure to store the data. This could have been done with numpy arrays for sure! OK, after setting the Number of acquired samples to N = 2048, I’ve created an empty pandas DataFrame. It will be filled with our precious data. The next line (6.) prints out the date and time. The t0 variable in line (7.) is used to get the timestamp value at the beginning of the measurement. This value will be subtracted from the timestamps generated by time.time().

The for loop starts at the value 0 and calls two commands according to line (9.). It writes a timestamp and measured value into the DataFrame df at index 0. After execution of line (9.), the for loop is repeated N-1 = 2047 times. As soon as the for loop finishes, we need to convert the string-datatype voltages into floating point numbers, otherwise Python will have difficulties handling  them with further calculations.

# Example 2: Take N numbers of measurements
N = 2048                               # Number of samples to acquire
df = pd.DataFrame(columns=['t', 'V'])  # Create an empty pandas DataFrame

# Print date and time, write data into the DataFrame
print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f'))
t0 = time.time()
for i in range(N):
    df.loc[i] = [time.time()-t0, dmm.query('READ?')]

# Convert dmm readout strings to a float number
df.V = df.V.astype(float)

That’s it! We’ve acquired 2048 measurements. Just imagine sitting there and typing all these numbers in Excel! Such a waste of time 😉 The next line of code extracts the total measurement time from the DataFrame timestamps. The measurement took approx. 25.8 seconds to complete. This corresponds to approx 79.2 samples per second at 4.5 digits of precision.

# Show elapsed time in seconds
df.iloc[N-1].t

25.846375942230225

# Calculate the sampling rate in Samples per Second
str(np.round((len(df)-1)/df.iloc[N-1].t, 3))

'79.199'

The last step of this example will be to plot the results into a graph figure. First we create an empty figure called fig with sizes 11.6 x 8.2 inches at 300 dpi resolution. The plt.plot() command needs the \(x\)– and \(y\)– values (or time and voltage values) as function arguments in order to plot a nice diagram. We label the axes, set a title and grid. The figure is then saved as PNG file and displayed. See picture below!

# Plot the results, annotate the graph, show figure and export as PNG file
fig = plt.figure(figsize = (11.6, 8.2), dpi=300, facecolor='w', edgecolor='k')
plt.plot(df.t, df.V, 'k.')
plt.xlabel('Time (s)')
plt.ylabel('Voltage (V)')
plt.title('HP 34401A measurement (Range: 10 V (DC), Resolution: \n 4.5 digits @ ' + str(np.round((len(df)-1)/df.iloc[N-1].t, 3)) + ' Sa/s, $f$ = 0.1 Hz, $v_0$ = 2 V$_{pp}$)')
plt.grid(True)
plt.savefig('Measurement_result.png')
plt.show()
Measurement result after data acquisition of 2048 samples.

Now we could do some statistics or fit a sine function to it. I’ll explain this in a future blog post. A small bonus can be achieved via the following command:

dmm.write('DISP:TEXT "73 DE DH7DN"')
HP 34401A with a custom text message, sent to the device via GPIB.

Controlling Test Equipment via GPIB and Python Read More »

Salvaging, desoldering practice

I’m still in the process of building my electronics lab. After two years of acquiring test equipment, it will still take some time to get it to a satisfactory level. The measurement capabilities have been extended to electrical quantities such as voltage, current, resistance, impedance, capacitance, inductance and frequency. Unfortunately, I’m reluctant to buy new general-purpose parts like BNC connectors or electrolyte capacitors. Luckily I was able to find some useful components in the dumpster, which is currently my main source of electronics components. The components are still useful and of value. Those were doomed of being thrown away.

I have few days off right now and some spare time to desolder and sort the components. They will be very useful for future my projects! It’s been a while since I’ve been (de)soldering and this takes forever. It’s hard to forget how to solder but if one doesn’t practice, it takes some time to get the muscle memory back.

Everything one needs for desoldering action: JBC CD-2SE soldering station, Keysight U1733C LCR Meter, soldering pump and some pincers and pliers.
Few of the desoldered components which have been saved from the dumpster/landslide.
More work: There is certainly something meditative about desoldering and sorting electronic parts… 😉

Salvaging, desoldering practice Read More »

More Tektronix Oscilloscopes in 2022

About 2 weeks ago I traveled through the country in order to pick up – as one may guess – another Tektronix oscilloscope! Who would have thought? This unit was very special: a Tek 7904A with many high-speed plugins such as 7A19, 7A24, 7B92A… just to name a few.

The seller was very kind and showed me more stuff laying around in the basement. There were some vintage instruments on a dusty shelf but the Tektronix R556 dual-beam oscilloscopes really caught my eye. We discussed about the future of some of the test equipment and we agreed to “dispose” it the “proper” way: load it in my car and drive it to a place where it will be treated with love and respect… my apartment! 😉

20220515_153643.jpg
Those are beefy and heavy… boat anchors… err oscilloscopes 😉

I’m a TEA with somewhat heavy GAS, that’s for sure. But I have never possessed anything like a Tektronix 556 dual beam oscilloscope. Two of them. It was very difficult to carry them around because of its mass of approx. 30 kg per unit. 

20220527_141549.jpg

Nevertheless, the units made it to my home without problem. Initial visual inspection showed a somewhat pristine condition! Besides dust, all vacuum tubes were present and all knobs/plugins/parts were without any visible damage.

20220527_141110.jpg
Side view of Tektronix R556 Dual-Beam oscilloscope. Amazing piece of late 1960’s/early 1970’s technology!

I was lucky to get two fitting bezels from Matt@Wellenkino and a proper AC power cord from eBay (type NEMA 5-15R). I’ll have to wait with power-up until order has been restored in my apartment. 😉

IMG-20220516-WA0012.jpeg
The back side of the Tek R556 oscilloscope. It has a standard NEMA 5-15 AC power plug.
20220527_141359.jpg
Receptacle of a NEMA 5-15R cable.
20220527_141516.jpg
Waiting for power-up! I’ll have to check the unit first and replace old and leaky electrolytic capacitors before powering this unit up.

 

More Tektronix Oscilloscopes in 2022 Read More »

Night Mode Image Quality = meh

I shot some oscilloscope images yesterday with my smartphone and I was really wondering about the bad image quality of the 10 MHz sine wave. Today I tried to repeat the experiment and unfortunately I got the same results. As it seems, the bad image quality is the result of using the “Night Mode” and simultaneous digital zoom-in. The image shot took 5-8 seconds in a motion stabilized environment. However, the heavy compression artifacts are still there.

Night Mode, zoomed out.

Night Mode, zoomed in. Crappy image…

After tinkering around with the camera app, I discovered the “Pro” Mode where the user is in control of camera parameters such as ISO, focus, camera lens and exposure time. The results are much better – sharper image and no compression artifacts. The phone is a Samsung Galaxy S22 with Android 11 operating system.

“Pro Mode”. Selected Tele-Lens, ISO-200 and 4 s exposure time.

The results are comparable to my Nikon D7200. Unfortunately, the workflow from shooting photographs to transferring to the PC is a horror. I’m currently trying to figure out how to shoot quick photographs, process them and upload them as quickly as possible.

Night Mode Image Quality = meh Read More »

Quick Test

Just writing some text and uploading a picture for testing purposes 😉

10 MHz sine wave. Nothing special.

Unfortunately the quality of this picture isn’t good.

Maybe this is better?

…aaaand hitting that PUBLISH button! Yay!

Quick Test Read More »

Leo Bodnar Fast Risetime Pulse Generator

A new and useful addition to the lab is a (30 ± 2) ps Fast Risetime Pulse Generator from Leo Bodnar Electronics. A pulse generator is needed to test oscilloscopes for their analog frequency bandwidth and risetime. Other applications for pulse generators would be for example time domain reflectometry (TDR) or high-speed broadband measurements (radar, semiconductors). The function description and details of the Leo Bodnar Pulse Generator are very well explained in a YouTube video by Shahriar from TheSignalPath.

So, having all the informations I need, I made some photo(n)graphs and did a quick measurement on my Tektronix 2465B analog oscilloscope. Its specified bandwidth should be 400 MHz. By measuring the rise time \(T_\mathrm{r}\), one may estimate the analog bandwidth \(\Delta f\) by using the following equation:

\(  \Delta f = \cfrac{0.35}{T_\mathrm{r}}.  \)

For example, if the rise time is measured in nanoseconds, the bandwidth will be stated in GHz because… physics: \( f = 1/T \).

The pulse generator is a very compact device. Its dimensions are approx. 24 mm x 24 mm. It is equipped with an USB and Trigger (SMA) connectors on the front side and a oscilloscope connector (BNC, SMA or 2.92 mm microwave) on the back side. In order to operate it, one needs a USB cable with a power supply (e. g. a PC or an USB power bank), various adapters (SMA to BNC) and a short coaxial cable in order to connect the trigger output to the oscilloscope.

DSC_0602.JPG
Leo Bodnar Fast Risetime Pulse Generator.

I ordered a SMA version of the pulse generator, however they shipped me the 2.92 mm version which is slightly more expensive (99 pounds). The shipping from UK to Germany took approx. 2 weeks and added 20% costs due to customs and shipping. Yeah, Brexit has a price tag for all of us. The 2.92 mm version has a slightly higher upper frequency specifications (40 GHz) compared to SMA (18 GHz). They provided me a calibration chart with determined rise times of approx 30 ps (rising edge) and 28 ps (falling edge).

DSC_0593.JPG
In order to connect the 2.92 mm microwave connector to an oscilloscope, one needs a proper adapter (shown on the left handed side). The adapter is not shipped and has to be bought separately.

DSC_0591.JPG
Pulse generator with SMA to BNC adapter.

I’ve added some cool stereo microscope close-up pictures in my gallery, check them out! Here for example, one can see the center pin of the 2.92 mm connector. The center pin is surrounded by air as dielectric, as opposed to PTFE (Teflon) on a standard SMA connector. The center pin is very delicate and one has to handle it very carefully in order to minimize the wear out.

20220206_008.jpg
2.92 mm microwave connector.

The pulser is powered via USB. The USB and SMA cables were not included. I powered the pulse generator via a battery/power bank. The RF output was connected into a 50 Ohm terminated Channel 1, the trigger output was connected to Channel 2. Trigger settings were set to Channel 2 rising edge.

DSC_0578.JPG
Experimental setup.

The first signal one should see is a 10 MHz square wave with approx. 1 V peak to peak (1 Vpp) amplitude. If you’re using 1 MΩ termination instead of 50 Ω, the amplitude will be 2 Vpp.

DSC_0566.JPG
Leo Bodnar pulse generator: 10 MHz square wave.

 

DSC_0569.JPG
Measurement of the 10 MHz square wave.

Next step will be the determination of the rise time of the rising edge. One has to zoom in to the maximum value (e. g. 5 ns/div) and activate the x10 magnification. This will lead to a 500 ps/div time scale.

DSC_0584.JPG
Tektronix 2465B with Leo Bodnar fast risetime pulse generator.

Taking the measurement is quite straight-forward. One has to determine the 10%-90% rise time. The lower image shows how the measurement is performed.

DSC_0582.JPG
Measurement of the rise time on a Tektronix 2465B. The baseline is placed on the 0% dotted line. Now we seek the intersections of the 10% and 90% horizontal lines with our trace. The cursors are used to pinpoint the intersections. The rise time is approximately 0.84 ns.

Now plugging in the measured value of \( T_\mathrm{r} = 0.84~\mathrm{ns} \) into the Bandwidth Equation gives us:

\( \Delta f~ \mathrm{[GHz]} = \cfrac{0.35}{0.84~\mathrm{ns}} = 0.416~\mathrm{GHz} = 416~\mathrm{MHz}. \)

A resulting bandwidth of 416 MHz for a 400 MHz analog oscilloscope is quite acceptable! This is almost my fastest analog oscilloscope. Since I’ve acquired quite a few of Tektronix 7000 series oscilloscopes over time, I will test the pulse generator on my 500 MHz units. I’ll share the results here.

73, DH7DN

Leo Bodnar Fast Risetime Pulse Generator Read More »

Installing PCI Digitizer Cards and a Graphics Card in my old PC

I spent the past weekend primarily with chores. I ordered some nice ESD-protected boxes in order to store all of my sensitive components which are mostly used for my electronics and optics projects. The cleaning of my apartment was a full success and I’m happy with the results.

ESD boxception.
My newly ordered ESD boxes. Size: 40 cm x 30 cm x 22/30 cm.

I also spent some time upgrading my old PC for a future project. Approx. 12 years ago, I bought a second hand PC from a German reseller called ITSCO for about 450 EUR. It’s a workstation PC, type Dell Precision T5400 (2x Intel Xeon E5440 2.83 GHz, 4096 MB RAM (DDR2 667 ECC Fully Buffered, PC2 5300F), DVD-RW+ and whatnot). It was my daily workhorse until 2021. Using a PC for 11 years is quite impressive if compared to older generation PCs from the mid-1990’s until ~2006. Those old PCs were prone to obsolescence because of Moore’s Law.

Over the years, I experienced only few minor problems with the Dell workstation: I’ve lost few RAM modules (error correction code memory, ECC) due to thermal issues. The RAM modules got pretty hot (70 °C – 80 °C) during operation. If one does not take care of dust and proper ventilation during hot summers, those electronic parts will inevitably fail. Luckily, the ECC DDR-SDRAM prices for those kind of PCs fell significantly over the past years so I was able to restock my RAM module supply with many replacement modules for a minor investment of ~20ish EUR.

Unfortunately, the user experience declined over time. Upgrading to Windows 10 and Google Chrome as a web browser in 2019 was a pain in the ass. Those applications are very power-hungry, especially when it comes to RAM. An average PC with 4-8 GB RAM – while being very decent in the years ~2010…2015 – is totally crippled by modern day software. Booting a PC and loading a web browser already consumes 4-6 GB or RAM! So I moved on and acquired another workstation (hp Z440) as an intermediate solution because of the ongoing global shortage of electronic components.

Nevertheless, my Dell workstation is still of great value! Due to its age, the motherboards from the 2006-2009 era were produced with PCI and PCI Express (x16). Modern day PCs and motherboards are produced with PCI Express slots exclusively although there are PCIe-to-PCI bridge solutions out there. While PCI slots are becoming more and more obsolete, there is still valuable hardware out there which is based on this kind of technology: PCI-based oscilloscopes. I bought over the past years such PCI oscilloscope cards which in return can be used as high-speed digitizers. A digitizer is a piece of test equipment which converts analogue signals (e. g. voltages) into digital ones. The digitized values are called samples. Digitized signals have one huge advantage: since the samples are basically just numbers, they can be treated numerically for further calculations! A digitized and recorded signal can be further processed, e. g.: arithmetic, regression analysis, spectrum analysis (FFT), waveform arithmetic and analysis, plotting, digital filtering, etc.. This will be very interesting for a super secret future project 😉

So in order to install two of those oscilloscope cards, I had to rearrange few cards. My old “gaming graphics card” (AMD Radeon 7700XT Series) had to be replaced by a smaller graphics card (Nvidia Quadro FX 580). The graphics card needed to be smaller in size because of the limited space inside of the PC housing and PCI/PCIe slot arrangement. After installing the oscilloscope cards, it is very necessary to leave space between card in order to prevent thermal failures by heat buildup. The oscilloscope cards may heat up in the order of 60 °C during operation and maybe up to 65 °C during data acquisition. If one does not take care of this issue, the cards may overheat and fail over time. I also cleaned the PC with air duster and a vacuum cleaner in order to clear the slots from dust.

I hope this workstation will last few more years. I have already found an external PCI solution. A friend of mine ordered an unbranded adapter from China (based on an IC type P17C9X) for a very low price of ~25 EUR. It’s a PCIe-to-PCI bridge which serializes the PCI signals and transmits them via a USB-like cable to a PC. Since the whole thing is standardized, no further Windows/Linux drivers are needed. This concept proved to work with few tested PCI cards (e. g. NI PCI-GPIB) where the power consumption is fairly low. However, the PCI oscilloscope cards  need certain amounts of power (~25 W) during operation and therefore an external power supply is necessary. If the PCIe/PCI-bridge does not provide the amount of power needed, the PC will freeze and one will have to reboot the system in order to recover. This can be solved by attaching a Molex to SATA power connector from the power supply to the PCIe/PCI-bridge. The “Chinese “module does not work with full-length PCI cards as seen in the pictures. I’ll try to desolder the SATA connector and arrange it differently in order to avoid the collision.

Installing PCI Digitizer Cards and a Graphics Card in my old PC Read More »

New Addition to the Lab: NanoVNA V2 Plus4

While browsing the Internet, I stumbled here and there upon a nice little gadget for ham radio amateurs called NanoVNA. This is a compact Vector Network Analyzer (VNA) — a piece of test equipment which allows to measure radio frequency (RF) properties of a Device Under Test (DUT) such as Magnitude and Phase. This is very useful in order to characterize RF components such as antennas, filters, cables or amplifiers – the usual ham radio stuff. Few weeks ago I ordered a NanoVNA in order to perform simple tests on my RF equipment. This article will be about  a quick set up of NanoVNA and doing some simple measurements.

Prices for “Maker/hobbyist level” VNAs  vary from 50ish EUR to ~550 EUR (DG8SAQ VNWA V3) depending on model and additional accessories. More sophisticated vintage test equipment (HP/Agilent, Rohde&Schwarz) may be found on eBay in the range from 1k+ EUR to ~3.5k EUR. Brand new entry level VNAs start at ~2k EUR without upper price limit,  depending on its measurement capabilities. As soon as you buy a VNA you will also need accessories such as torque wrench, lots of adapters (Type N to SMA to BNC and vice versa) and calibration standards (short/open/load/through, SOLT) in order to perform correct measurements. Professional calibration standards (e. g. metrology grade SOLT) are extremely expensive (~3…10k USD) and unaffordable for the low budget hobbyist – so yeah…

I didn’t want to spend 500+ EUR for a piece of test equipment which may result in even greater financial commitment. Based on the positive reviews and my requirements (easy to use, convincing measurements), I bought the NanoVNA V2 Plus4. It’s a compact 2-port VNA with integrated 4″ touch screen display, the specifications are listed here. The total price was ~215 EUR for NanoVNA + shipment + customs. The delivery from China to Germany took approx. 3 weeks from November till December 2021 (standard shipment, no express parcel).

The accessories are shown in the picture above: NanoVNA V2 Plus4 enclosed in a metal housing, two SMA cables, SOLT calibration set, USB cable and a small stylus for the 4″ touch screen. A 4/3 A type 18650 rechargeable Li-Ion battery was not provided due to transport restrictions of hazardous materials (exploding Li-Ion batteries on aircrafts…). The rechargeable battery had to be bought separately (+13 EUR). I’ve added few pictures of my NanoVNA V2 Plus4 here.

The usage of the VNA is pretty much straight-forward: turn it on, set sweep parameters, perform SOLT calibration and test your DUT. The basic measurement results provided by a VNA are Magnitude and Phase over the set frequency range. Those measurements are used to calculate very useful quantities such as  VSWR (voltage standing wave ratio), ESR (equivalent series resistance), LCR (inductance, capacitance, resistance) and plotting a Smith chart. The result can be seen directly on the 4″ display and read by different cursors. This is a perfect tool to do quick performance or sanity checks on RF components.

As soon as one wants to do systematic measurements on different components, it becomes a little bit inconvenient to photograph the Smith chart due to glare, mirror reflections and possible motion blur while taking photographs. However, it is possible to control the NanoVNA via USB and read out the measurements to the PC. The readouts can be stored and processed via standard software such as MS Excel, LibreOffice Calc, Python/matplotlib, MATLAB, GNU Octave and others. This is where the fun begins.

NanoVNA readout via USB

An user from the EEVBlog (joeqsmith) tested early versions of NanoVNA and was quite unhappy with the provided tools at the time. He developed a very useful software front end for the NanoVNA which is based on LabVIEW 2011. In his software, commands are sent via USB protocol to the NanoVNA in order to set measurement parameters and to perform SOLT-calibrations. After triggering the measurement, the data is transferred to to PC and displayed graphically and processed through math equations. He put a lot of effort in the development and the results are astonishing. His software is capable of controlling NanoVNA via comprehensible user interface, taking measurements, performing calibrations, calculating almost all imaginable RF quantities in time and frequency domain. This is very helpful for newbies like me who have never worked with a VNA before. His software can be found on GitHub, downloaded and used freely with no limitations or charge. Props to joeqsmith — he maintains an active and educational YouTube channel so check it out if you’re interested in RF or handheld Digital Multimeter testing methods.

First steps

Buy NanoVNA, plug in the USB cable and turn it on. If you’re using Windows 10, the device should be recognized as USB CDC (Communications Device Class) on a virtual serial port (e. g. COM6). Next steps will be a little bit annoying: create an account on the National Instruments (NI) homepage, download and install the NI LabVIEW Runtime Engine (Version 2011 SP1 32-bit, size ca. 215 MB) and NI VISA. I have installed VISA v17.0 which is a 750 MB chonker.  It contains drivers for USB/Serial communications any many others (also some important drivers for my obsolete GPIB test equipment which aren’t supported in the newer versions anymore). Install VISA and the Runtime Engine and spend your precious life with many reboots. I highly recommend to read Joe Smith’s User Manual, otherwise you may run into problems. Unfortunately, NI software is closed source/BLOB but everybody is encouraged to develop his own  free and open source software for NanoVNA.

After the Installation is complete, download, extract and run the Runtime Version Executable (NanoVNA_V2Plus.exe) from Joe’s GitHub. Execute the File (abort the file dialogue if you don’t have any stored calibration files) and you should see something similar to the screenshots below. Setup the connection parameters (COM-port) and establish a link to your NanoVNA.

After starting NanoVNA V2+4, one needs to select the proper COM Port. Switch to “Main” tab afterwards.

Click on the “Link” button and your NanoVNA should display “USB Mode”. The NanoVNA identifier message should appear.

Photograph of the NanoVNA V2 Plus4 in the USB Mode.

Start the sweep by clicking on the “Sweep” button. One should see some activity during the sweeps. I’ve connected a 50 Ohm load on Port 1 as seen in the Smith chart.

Alright, now we’re ready to go. Next step: SOL(T) calibration, taking measurements and data analysis. The usage of this software is described in Joe Smith’s User Manual or on his YouTube channel. He has a plenty of demonstration videos how to make proper measurements with NanoVNA V2 Plus4. This is easily done by clicking on the “2PortCal” button followed by some dialogues. After the SOLT calibration is performed, it can be saved and reused. A calibration is necessary as soon as the frequency span changes.

Sanity Tests

It’s a good practice to somehow validate your measurements. This requires some additional gadgets like filters or self-made circuits. I’ll gather some over time. I’m currently checking if the attached SOL standards are displayed correctly.

Testing a coaxial cable

50 Ohm coaxial cables such as RG58 or RG174 are widely used as transmission lines for radio frequency signals. Some important electrical properties of this cable type are: characteristic impedance (typical 50 ± 2 Ohm), capacitance per unit of length (96 pF/m), attenuation per unit of length (0.67 dB/m) and its operating frequency range (DC – 1 GHz). Data taken from Radiall’s RF and Microwave assemblies. For amateur radio operators, the SWR (standing wave ratio) is another important quantity which determines the match between impedances of the source (e. g. transmitter) and the load (e. g. an antenna). In case of an impedance match Z = Z_0, we obtain a SWR close to 1:1. We can measure the impedance Z with a little help of a VNA over a wide frequency range.

NanoVNA measurement setup. DUT: Tektronix 012-0482-00 Precision Coaxial cable. Inside of the cable loop are my BNC “calibration standards”.

This is what the measurement setup looks like. I’ve connected the NanoVNA ports to two SMA cables (blue) in order to perform a SOLT calibration. My DUT will be a Tektronix 012-0482-00 Precision Coaxial Cable which has a length of 36″ and an impedance very close to 50 Ohm. I’ll set up the measurement for 1 MHz to 300 MHz and check the SWR, attenuation/losses and its impedance. The measurement results can be seen in the figures below.

Measurement result: Smith Chart. Comparison between two coaxial cables of slightly different lengths. Frequency range: 1 MHz to 300 MHz.

Measurement result: Transmission Rectangular. Comparison between two coaxial cables of slightly different lengths. Frequency range: 1 MHz to 300 MHz.

Measurement result: Standing Wave Ratio (SWR). Comparison between two coaxial cables of slightly different lengths. Frequency range: 1 MHz to 300 MHz.

Measurement result: Reflection Coefficient. Comparison between two coaxial cables of slightly different lengths. Frequency range: 1 MHz to 300 MHz.

Measurement result: Impedance Rectangular. Comparison between two coaxial cables of slightly different lengths. Frequency range: 1 MHz to 300 MHz.

Conclusions

There you have it! Both cables show a similar performance. Tektronix 012-0482-00 shows an impedance slightly closer to 50 Ohms and a slightly better transmission compared to a no-name brand RG58 C/U. Well, maybe the sharp drop of the reflection coefficient coincides with the fact, that this cable has to be used along with Tektronix SG 503 Levelled Sine Wave Generator in order to perform oscilloscope bandwidth checks. Tek SG503  covers the frequency band from 250 kHz up to 250 MHz. Very interesting! Maybe this information may be useful to other Tektronix users. I’ll try to characterize the Tektronix coaxial cable with a “slightly better equipment” later this year, just to validate the NanoVNA measurements. Please take the provided information “as is”. It might be wrong after all.

NanoVNA – would recommend

The NanoVNA is a very useful, nice and affordable addition to a hobbyist electronics lab. Using Joe Smith’s NanoVNA software works pretty well and offers a rich repertoire of calculations and graphical diagrams. I didn’t experience any kinds problems on my Windows 10 machine while using Joe’s software. The installation and setup was straightforward and I was able to obtain plausible measurements. Unfortunately I don’t have coaxial cables with matching lengths in order to make comparison measurements with my Tektronix 012-0482-00 but that’s the part where one starts going down the RF rabbit hole…

Few things to consider

Please be aware that the components used in combination with NanoVNA are very cheap. The quality is “OK” or let’s put it in another way: “good enough for the job”. The devil is in the details. In order to perform reliable and comparable measurements, one needs quality cables, good connectors, good adapters, better calibration standards and a torque wrench. If you’re possessing good RF gear, please be careful when interchanging the components. It’s very easy to damage quality gear with cheap rubbish. I’m trying to maintain two ecosystems: the cheap components will be used for non-critical projects and quick and dirty measurements. The quality equipment will be used for careful measurements and calibration.

Going down the RF rabbit hole?

What if one already possesses quality accessories — a question might arise why not spending money on a good vintage VNA anyway? Unfortunately I’m not an RF engineer and I don’t test or develop commercial RF circuits. RF is just a hobby and not my daily business. This kind of affordable tool lets you make a first step into the world of RF components and circuit testing. I don’t need to emphasize its usefulness for testing and debugging of RF circuits or performing sanity checks. I’ll keep looking for a vintage HP/R&S VNA because the answer to this question is always YES.

73 de DH7DN

New Addition to the Lab: NanoVNA V2 Plus4 Read More »

Happy New Year 2022

Tek 7904

During the past year and a half, I’ve build my electronics lab. I’m able to measure many electrical quantities like voltage, current, resistance, capacitance, inductance, frequency, spectra and much more. I surely am suffering to the Gear Acquisition Syndrome and I’ve already posted some pictures inside of the TEA-thread (Test Equipment Anonymous) of the EEVBlog. I wasn’t kidding when I posted that I have sold my soul for Tektronix. I’d like to start restoring/repairing/calibrating/maintaining the older Test Equipment in order to do be able to do some exciting electronics projects in the years to come!

After half a decade of changing jobs, cities, apartments, relationships, … — I think it’s time to finally follow my passions and share them with like-minded people 🙂

Happy New Year 2022 and see ya around!

vy 73 de Denis (DH7DN)

Happy New Year 2022 Read More »

Blog design and further testing

Hello there!

During the past few days I’ve made some progress concerning the design and functionality of this blog. I think I’ll use the current dark theme called “Astra”. Although the “Pro” version of this theme is quite expensive, the functionality is far better than other minimalistic dark themes.

LaTeX and Python code

Let’s test some Python code highlighting. For example…

# Useless code snippet
k = [1, 2, 3]
for i in k:
    print('Hello World!')

And now one famous equation written in \(\LaTeX\)

\( E = mc^2 \)

Alright, this stuff seems to work! 😀

Blog design and further testing Read More »

piwigo Image Gallery

I’m testing some stuff with piwigo, a very nice and easy to use photo gallery written in php.

Let’s see, if the picture is parsed correctly:

Unfortunately, the WordPress Media Library is not suitable for sophisticated photo management. I’m planning to publish high quality photographs of test equipment and repairs.

Another nice picture…

piwigo Image Gallery Read More »