DH7DN

Studied Engineering Physics, now I do Ham Radio and like to ride my bike. Occasionally writing in my blog about my hobbies and travel.

Avatar

Tektronix TDS 3034B bandwidth upgrade

Tektronix TDS 3034B four channel color digital phosphor oscilloscope.

A “new” oscilloscope arrived in the lab just recently thanks to my friend Matt, who relayed the offer to me. It’s a wonderful instrument from the early 2000’s era: a Tektronix TDS 3034B Four Channel Color Digital Phosphor Oscilloscope. The oscilloscope’s analog bandwidth is specified at 300 MHz with a sample rate of 2.5 GS/s per each channel. It has a ton of options (e. g. FFT, 3LIM, 3TRG) and a communication module with VGA monitor output and GPIB/Ethernet/RS-232 for communication and control. There is also a battery compartment, however, the battery was not included. The “Waveform Intensity” knob simulates the intensity control of an analog oscilloscope with a cathode ray tube – therefore a “Digital Phosphor Oscilloscope” or DPO. The size of the oscilloscope is very convenient and perfect for a desk use – doesn’t take much space and it’s fast and responsive compared to my older Tektronix TDS 754D oscilloscope.

Tektronix TDS 3034B back side with battery/probe compartment.

I was able to set up the communication to my PC via GPIB (IEEE 488). Since I already had the Tektronix WaveStar Software for Oscilloscopes installed on my Windows 10 PC, I was able to quickly transfer screenshots/hardcopies, measurement data and sample data from the instrument to my PC. No diskettes or USB drives were needed. It is possible to control the oscilloscope remotely which is absolutely fantastic for measurement documentation and measurement automation purposes! It’s a great addition to the lab and it will serve to me as my daily workhorse among other oscilloscopes, of course.

Tektronix WaveStar for Oscilloscopes. Easy way to transfer screenshots and data from Tek TDS 3034B to a Windows PC.

Bandwidth Upgrade

It seems to be very common (even nowadays in 2024) that the oscilloscope manufacturers design a generic oscilloscope parts which can be used for different models. The oscilloscopes are then assembled with similar to identical hardware components (presumably because it’s cheaper manufacturing-wise) but the measurement capabilities are determined either by hardware (jumper settings) or by software (locked/unlocked options).  For example, Rigol DHO 800/900 Series Oscilloscopes can be upgraded from 70 MHz to 100+ MHz via software. Thanks to Matt, he gave me a hint that the guys at EEVblog have figured out how to perform an upgrade of the Tektronix TDS Series oscilloscopes to different models. So already having an excellent 300 MHz & 2.5 GS/s oscilloscope at my fingertips, I was curious if I could upgrade it to the 3064B model which has 600 MHz analog bandwidth and 5 GS/s sample rate. I tried out the EEVblog’s upgrade procedure and it seemed to work without bricking the oscilloscope. I’ll just quickly summarize the procedure here.

  • Boot up the device and set up the communication via GPIB (e. g. GPIB address and talker/listener mode). Connect the device to your GPIB controller
  • I used the National Instruments GPIB-USB-HS controller device along with current NI’s GPIB drivers (driver version doesn’t matter much, you could also use the VISA drivers from Keysight, Tektronix or Keithley). The TDS 3034B Firmware Version was v3.39
  • The communication between the PC and the oscilloscope was established with NI Measurement & Automation eXplorer’s (NI MAX) own GPIB Instrument Communication. I guess you could use any GPIB communication software, e. g. pyvisa for Python
  • Check whether the oscilloscope responds to the *IDN? query. If yes, proceed, if not – try to find the problem and fix it (obviously)
  • Send the following commands to the oscilloscope
    PASSWORD PITBULL
    MCONFIG TDS3064B
    Just send (write) the commands in the order as shown above! Do not use a “GPIB query” since there will be no response action from the oscilloscope. Upper/lower case letters don’t matter.
  • Now power-cycle the oscilloscope (turn it off, wait few seconds and turn it on again). It should boot up with a new screen and new model. If it doesn’t show the new model, something went wrong with command transmission via GPIB. As far as I could tell, some models accept only different MCONFIG-commands, such as “MCONFIG TDS3054” without the letter “B” at the end. Anyways, after sending the commands via GPIB and power-cycling the oscilloscope, it should show up with the new model
  • Changing the TDS model will result in an uncompensated waveform. I observed a DC offset and noise on my CH1 through CH4 waveforms post-update. The solution to this problem is quite easy: wait some time (at least 10-15 minutes) for a warm-up and perform the Signal Path Compensation (SPC), which can be found in the Utility → System Config → Cal
    menu. This will perform an internal calibration where the noise and offset errors are compensated. The oscilloscope should be ready for performing measurements afterwards

That’s how it worked out for me. It took me just few minutes to convert a Tektronix TDS 3034B into a TDS 3064B. I’d recommend to check out the linked EEVblog thread for further information on the TDS 1000/2000/3000 Series upgrades. Of course I can’t be held responsible if you try it out and damage your instrument (e. g. calibration data or warranty is lost or the device is bricked) since I’m sharing this information and tried it out on my own oscilloscope. This is solely done at one’s own risk! Please be careful when trying out this procedure and please read the EEVblog thread prior to changing the instrument. Always make backups of your oscilloscope firmware prior to changes. Also hacking the device in order to use unlicensed software options is… well… “illegal”… I guess… Keysight’s Agents will hunt your PC down! 😉

Excerpt taken from the Keysight N1500A EULA. This is not a joke (well, it’s a well-known meme), see it for yourself: https://helpfiles.keysight.com/csg/N1500A/License_Agreement.htm

Checking the Oscilloscope Analog Channel Bandwidth

I did some initial bandwidth testing with my Leo Bodnar Fast Risetime Pulse Generator. The pulser generates repetitive 10 MHz square waves (~1 Vpp) with a rise time of around (30 ± 2) ps. It can be used to easily test the oscilloscope’s analog channel input bandwidth. The analog bandwidth of an oscilloscope can be calculated as follows:

\( \mathrm{BW [GHz]} \approx \cfrac{0.35}{t_r ~\mathrm{[ns]} } \)

So a measured 10%-90% rise time of \(t_r = 1.000 ~\mathrm{ns}\) results in an analog bandwidth of \(0.35/(1.000 \cdot 10^{-9} ~\mathrm{s}) \approx 0.350 \cdot 10^9 ~\mathrm{Hz}\) or 0.35 GHz which is basically 350 MHz. So prior to the bandwidth upgrade we were expecting an oscilloscope bandwidth of ~300 MHz at a 2.5 GS/s sample rate, post-upgrade it should be around ~600 MHz and a 5 GS/s sample rate. I’ve measured the rise time of all four channels in order to see if there are any significant differences between them. The oscilloscope settings were as follows: Coupling: DC, Termination: 50 Ω, Trigger: External, Acquisition Mode: 64× average per acquisition at 10k points and 5.00 GS/s. The trigger was delayed by approx. -10 ns.

The measurement results are summarized in the table below.

Analog bandwidth calculations from measured rise times for each oscilloscope channel. Comparison between Tektronix TDS 3034B before model upgrade and after model upgrade to TDS 3064B.

As we can see, the full bandwidth of 600 MHz for a Tektronix TDS 3064B has not been achieved. However, there is a measurable improvement. Channels 3 and 4 seem to have a slightly higher bandwidth than channels 1 and 2. The rise time measurements deviate on each acquisition so I would estimate an uncertainty in the rise time measurements of approx. ±10 ps. I also wonder if the overshoot/undershoot calculations are correct. I’ll have to look into this manually, since the data samples can be exported in a CSV file.

Conclusion

Nevertheless, the bandwidth upgrade was successful! 500 MHz analog bandwidth at 5 GS/s is more than enough for my needs before stepping into the GHz time domain regime. And no need for a battery if there is a food compartment in your oscilloscope! Tested successfully with carrots! 😉

Tektronix TDS 3034B food compartment.

Tektronix TDS 3034B bandwidth upgrade Read More »

January 2024 Gadgets

It’s currently cold outside (-8 °C) here in Germany and I skipped my cycling tour yesterday. Instead I got myself some stuff to play with during the cold and dark winter days.

Some new gadgets on the desk.

A “new” handheld oscilloscope Tektronix THS 720 (STD) appeared in my lab! It had a dead Ni-Cd battery so I replaced it with a new one. It seems to work, however, it also seems to have the usual aging issues with optocouplers. Channel 1 shows some DC offset while Channel 2 looks fine DC-wise. The price for this scope was really “OK” (<200 EUR), it’s great for troubleshooting switch-mode power supplies due to fully isolated oscilloscope input channels. It has a built-in multimeter to check voltages simultaneously – great tool for repairing broken test equipment! Well, this instrument also needs a repair, so it’s some kind of repairception? hmm

On the bottom right, we have four Sprague TANTAPAK® wet slug tantalum capacitors, 820 µF, 20-30 V(DC) each. If they haven’t been abused and aren’t leaky, maybe they will be used as decoupling capacitors for a nanovolt noise measurement of a LTZ1000ACH. Need to be tested for their capacitance, ESR values and leakage current. See Jim Williams’ work on Linear Technology Application Note 124.  A HP 10514A mixer can be seen on bottom mid. Bought it out of curiosity, will test it. Top left shows a 10 MHz OCXO for a HP 53131A type of frequency counter. On the left hand side, a SUNSHINE IC socket fixture can be seen. A friend told me it was used along with an ancient SUNSHINE EPROM programmer PC card, the one with an 8-bit PC/XT-bus maybe?

Bottom left shows a Raspberry Pi 5 (8 GB) with a cooling fan. Raspi5 was announced in November 2023 but I couldn’t buy it in online shops because there were none available. It took them almost 6-7 weeks to restock their supply. I didn’t want to pay high prices for a Raspi 5 on second hand markets because the offers were 30-50% overpriced in the order of 130 – 150 EUR (which is crazy!). Will be a nice upgrade to my Raspi 3B standing army. I’ve ordered some accessories such as a cooling fan, the 27 Watt USB-C Power Supply, a black case, RTC battery, Micro HDMI adapter cables and a microSD card.

Raspberry Pi 5 8 GB.

And there is a possible repair project on the horizon. A HP 3458A has presumably lost its calibration data due to a dead battery of the Dallas DS1220Y-150 Nonvolatile-SRAM. The NV-SRAMs in a HP 3458A store settings/preferences and calibration constants. As long as the unit is powered up, the battery coins inside of the Dallas ICs aren’t discharged. However, once the digital multimeter is turned off for a longer periods of time (e. g. months, years), the battery is slowly discharged. Unfortunately, the discharge curve of a NV-SRAM does not show any signs of discharge when measuring its voltage – instead the battery voltage drops suddenly below a power-up threshold and all stored data is lost. The life time of the battery can last between ~8 up to 30 years and it strongly depends on environmental and usage factors. Therefore: please do backup of your IC contents in order to prevent a potential nightmare.

 

After power up, “RAM TEST 1 HIGH” message appears. With some luck, the batteries of the calibration data NV-SRAMs may be still alive…

HP 3458A is a famous example but there are also oscilloscopes out there (e. g. Tektronix 2465B/2467B, older TDS Series) with a memory-loss time bomb. I’m currently taking care of ordering replacement NV-SRAMs and will try to revive the unit.

I’ll resume my cycling efforts tonight. It’s no pleasure doing this at -8 °C mostly because of cold wind blowing into the face for about an hour or so. Nevertheless, there is no bad weather, only bad clothing!

January 2024 Gadgets Read More »

Happy New Year 2024

The new year is already 5 days old. Nevertheless, happy new year to everyone who reads this blog. As always, I’ll try to post on a regular basis about my adventures in the fields of bike touring, amateur radio and test equipment / gear acquisition syndrome. Keep up the good work, may your projects be fulfilled in 2024. Stay healthy and sound and keep up a positive attitude.

73, Denis (DH7DN)

Hiroki test lead with a rather dangerous adaption 😉

Happy New Year 2024 Read More »

Test Equipment Adventure Time – Tektronix 576

I bought a Tektronix 576 Curve Tracer on the second hand market some time ago. Unfortunately, the seller wasn’t able to ship it and he did not live in my region. The pick-up place was near the town of Düsseldorf – a 350 km distance from my place. Oh boy…

The problem with this particular curve tracer is its size and weight: it can’t be hand-carried for long distances because it’s a 35 kg (~70 lbs) chonker. Even if it’s carried by one person, one has to be very careful not to damage delicate parts and also for health and safety reason when carrying heavy instruments in a wrong posture. Shipping this curve tracer via regular parcel service is almost impossible or very expensive. Since I don’t have a car right now and car rentals are also very expensive, I tried to pick it up and bring it back home by train. The idea was to use a small hand truck for transportation in busses and trains. This way, it should be possible to treat it as luggage.

Well, it kinda worked out somehow! I started my journey in Braunschweig at around 8 am and headed towards the central train station by public transport. Luckily the connecting trains were on time so I reached Düsseldorf at 12 pm. The seller was very kind and agreed to meet at the nearest train station where he handed over the curve tracer with a manual. It took me about 20-30 minutes for packaging and securing the curve tracer with straps.

The journey back from Düsseldorf to Braunschweig was much more difficult and was delayed multiple times. However, time was not an issue and I managed to get back home with a 2 hours delay at 7 pm. The total price for travelling by train in both directions was around 70 EUR which is comparable to current gasoline prices for a ~700 km route.

I used some cardboard pieces and soft foam to protect the knobs and sensitive parts. Hard foam was used to protect the back side and a grey soft foam mattress was added for additional cushioning. The bubble wrap was used as thermal isolation and rain protection (temperature shocks aren’t good for electronic and plastic parts). The straps were used to secure the instrument so it doesn’t fall over. The blue masking tape is really useful for attaching the cardboard to the housing. The masking tape is very easy to remove without leaving tape residue or peeling off the paint.

After getting back home, it took me some time to unpack the Curve Tracer.  I’ve waited at least 24 hours to power up the unit since it had to acclimate to the ambient temperature. It’s not a good idea to power up a cold instrument which has been exposed to low temperatures for hours. I was very tired after the travel but everything seemed to work out very well.

I couldn’t find any broken or damaged parts. Taking a look inside of the instrument showed no signs of a transport damage. From my experience, such a delicate instrument needs to be handled properly, you can’t always trust the parcel service. Taking care of the transportation is the only way to ensure the instrument will “survive” the move from A to B. Who else didn’t experience the “Courier Transformation” at least once in their life?  By the way, it’s a nice pun to the “Fourier Transformation” 😉

As you can see, heavy instruments can be transported by train, at least here in Germany. However, this transportation method becomes very impractical as soon as the round trip times exceed 12-13 hours. Travelling 12+ hours by train is no fun for sure therefore it’s not always a viable method.

That’s it for today. The next blog entry will show some post-power up experiments and shots of the Tektronix 576 innards.

Test Equipment Adventure Time – Tektronix 576 Read More »

LTZ1000 based Voltage References and CERN’s HPM7177

Introduction

I don’t consider myself as a voltnut. I don’t design precision circuits and I don’t do crazy and expensive things like selecting, binning or matching of super-expensive components (Zener voltage references, foil resistors or opamps). I don’t spend my evenings on Christmas doing circuit simulations in LTspice. However, I like the idea of DIY-ing of an existing precision circuit  design and verifying its performance. Thanks to Illya Tsemenko, Marco Reps and the voltnuts all around the world and their endless efforts in searching for the best design for a DIY voltage reference – it is nowadays possible to build a laboratory-grade, high-performance solid state voltage reference using off-the-shelf components which performs very close to their commercial available counterparts and costs just a fraction of its price (perhaps less than 10%). In this self-shaming blog entry, I want to talk about how I totally didn’t build my own voltage reference yet and how I am trying to measure ADRmu based voltage references by using CERN’s HPM7177 high-precision digitizer I also didn’t build myself. Please note: I’m not a metrologist. The reality is much more complex and the devil is always in the details. I hope that the informations provided here aren’t too far off. If so, please consider consulting ChatGPT for further guidance 😉

Voltage references – A quick summary

Voltage references are electronic devices used as a representation of the physical quantity “direct voltage” (DC volts). In the early days of DC volts metrology, voltage references were based on electro-chemical cells (Clark cell, Weston cell) before they were superseded by Josephson Voltage Standards (JVS) during the early 1970s and 1980s. Weston cells are very delicate devices and contain hazardous/toxic materials (mercury and mercury/cadmium amalgam, cadmium sulfate and mercurous paste) and therefore are not the kind of electronics device one wants to keep at home.

Quantum Metrology Porn: PTB’s Josephson Arbitrary Waveform Synthesizer (JAWS) IC (left), Programmable Josephson Junction Series (top right) and Quantum Hall Device (bottom right) as seen on Maker Faire Hannover in 2022.

JVS is the most accurate device for generation of DC voltages, however it’s very complex and expensive due to its needs for very specialized equipment (microwave feed, cryostat, probe, superconducting integrated circuit chip, readout and control system).

There is currently only one viable and affordable voltage reference option for a precision electronics hobbyist: an ovenized Zener voltage reference. This solid state voltage reference design revolves around a subsurface (“buried”) Zener reference with a heater resistor for temperature stabilization and a temperature sensing transistor, which also compensates the temperature coefficient (TC) of the Zener reference. Ovenized Zeners are widely used as a DC volts reference in laboratories and as an integral part of high-precision test equipment such as digital multimeters (e. g. HP/Agilent/Keysight 3458A, Fluke 8588A), calibrators (Fluke 5700A, Fluke 5730A) and ADCs/DACs. They can also be used as voltage standards for digital multimeter calibration, as part of a Kelvin-Varley voltage divider or act as a so-called transfer standard – a transportable artifact with a well-known and predictable properties (stability, noise, TC) in order to “transfer” the quantity “direct voltage” between two laboratories.

Linear Technology’s LTZ1000ACH Ultra Precision Reference.

Building a world class DC voltage reference is difficult

Building a voltage reference based on Linear Technology’s LTZ1000/LTZ1000ACH or its successor Analog Devices’ ADR1000 takes a bit of effort and… money! Almost every serious design relies on precision electrical components because every component contributes to the performance of the future voltage reference. It starts with the printed circuit board (PCB). The voltnuts have figured out how to arrange the components on a PCB in order to deal with thermal gradients and thermocouple effects, electromagnetic interference (EMI), circuit protection and different sources of noise. There are many PCB designs available online, such as xDevs’ KX/FX, Dr. Frank’s LTZ1000 or Marco Reps’ ADRmu. The Gerber files can be downloaded free of charge and can be used for submission to a PCB manufacturer (e. g. JLC PCB or PCBway). You can also DIY the printed circuit board by etching the traces by yourself. Ordering a PCB would be the easy part because you get a very good quality PCB without having to deal with chemicals and drilling holes. Everything else concerning building the voltage reference can be considered as very difficult or even “hard mode”.

Voltnutting equipment. Top: two LTZ1000ACH, Mid: an early prototype of ADRmu, Bottom: Sticker, 3D-printed caps for the LTZ1000ACH (preventing air streams) and a book from Fluke “Calibration: Philosophy in Practice”, 2nd Edition. Thanks to Reps Precision Group (RPG) for design and dissemination of future ppms.

Ordering precision electronic parts isn’t a straight-forward process. In most cases, one has to check multiple online shops in order to find the suitable components. Some parts are really expensive while others are very difficult to obtain. Last time I checked the LTZ1000ACH prices at Mouser Electronics (September 2023), its was around $93 per piece (excluding VAT). The price used to be around $65 per piece before 2020. Speaking of 2020: who doesn’t remember the electronics components shortage which resulted in LTZ1000 lead times up to 52 weeks (Mouser, DigiKey, Farnell, …)? This was a real thing just about half a year ago. Meanwhile, the stocks have been replenished. However, the prices have risen significantly (+30%) compared to pre COVID-19 times. Buying precision electronic parts off second hand market (eBay, craigslist) can be a winner but I would consider this as a gamble . Depending on your source, there is always a risk of buying counterfeit, defective parts or parts with a poor performance. Precision resistors, which are needed according to the Linear Technology’s reference design, are also very expensive ($25..30 per piece, 4 needed) and difficult to obtain. Another difficult to obtain components are the low thermal EMF binding posts (~ $25 per set). I participated in an EEVblog group buy which took about 2 months from placing the order until receiving the binding posts (Thanks to branadic! This was entirely done voluntary by him and free of extra charges). Just be aware of those time and money sinks.

Low thermal EMF binding posts. Thanks to branadic at EEVblog for taking care of the group order from Asia.

Building an ovenized Zener voltage reference ought to be a long-term project of mine. I don’t want to rush things and plan to accumulate the necessary components over time, perhaps during a timeframe of 2 to 3 years. I already have two LTZ1000ACH waiting in my desk but everything else is missing. I need to order the precision resistors, the PCBs, the enclosures, transformer cores and I have to find some time for assembly.

Precision parts have arrived – what’s next?

Once you have obtained the essential parts, you’re ready to do the assembly. But hold on for a second – you have to know what you’re doing and you have to do it very carefully. For example, if you apply too much heat when soldering your precision resistors or LTZ1000 to the PCB, it can result in a disaster. Overheating a precision resistor can either damage it and render the specifications void or introduce an unwanted hysteresis, which makes it either susceptible to temperature changes or drift over time. Those drifts directly influence the stability of the future voltage reference and greatly reduce its performance. Assembly is crucial and early-made errors are punished much later in the future. And don’t forget the obligatory bottle cap in order to prevent air streams. Be careful when handling precision electronics parts: always wear gloves to prevent contamination with grease/dirt and also take ESD precautions. Try to use quality parts over “Chinesium”.

ADRmu

In order to kick-start the project, I was fortunate to grab one ADR1000-based ADRmu for myself, which Marco built and tempco-tuned by himself. I needed a point where I would be able to get started with DCV metrology and to accumulate few thousand hours of operation time. One of the ADRmu’s design goals was to be compatible with LTZ1000(ACH) and ADR1000. ADRmu has protection circuits, a gain stage to shift the voltage from typically 7.2 V to a value close to 10 V and an eXtReMe isolation transformer for common-mode suppression. It’s possible to fine-tune the gain stage with discrete resistors in order to get the voltage output close to 10 V (if necessary). Very interesting features of Marco’s design is the possibility of use of resistor networks with an option for using discrete precision resistors. Resistor networks consist of thin film resistors manufactured in one process, which are thermally coupled through their substrate and hermetically sealed inside of their package. A resistor network has a very stable resistance ratio (e. g. 13 kΩ/1 Ωk) which is crucial for the LTZ1000(ACH) stability. That’s an advantage compared to discrete resistors (e. g. 13 kΩ and 1 kΩ) which have their own TC and drifting characteristics and therefore contribute to the performance of the LTZ1000(ACH) circuit.

Innards of ADRmu, Marco’s voltage reference design.

Once it’s built – the adventure starts

Once you have built your voltage reference, it’s time for the first measurement. Depending on the voltage reference, this measurement should be done with a high accuracy DMM under stable environmental conditions with proper leads. Typically it can be done with a 6.5 digit DMM (HP 34401A, Keithley 2000) or even better ones, such as 7.5 digit (Keysight 34470A, Keithley 2001) or maybe 8.5 digit class DMM (e. g. Keysight 3458A, Keithley 2002, Datron 1281 etc.). During the first several months or maybe during the first year of operation, the voltage reference will show some kind of measurable drift. The magnitude of this drift will be in the range of few ppm (2…5 ppm/year maybe, just to name some numbers).

Voltnutting equipment shown at Maker Faire Hannover 2022: Keithley 2400 SourceMeter (top), HP 3458A (middle), Fluke 5700A (bottom). HP 3458A is running in 7.5 digit mode (d’oh!).

This is a well-known property of solid state voltage references. Initially they drift few ppm over time but settle after many hundreds or thousands of hours of operation. It’s called “aging” and the reasons for aging processes are hidden behind the “semiconductor physics curtains” (changes in mechanical stresses acting on the semiconductor, outgassing and diffusion processes, electrical changes in the circuit elements). Also power-cycling a voltage reference can lead to so-called hysteresis due to thermal shocks which are experienced during powering on/off the oven (having a ΔT of 40-60 °C in a precision semiconductor circuit isn’t very healthy). So the goal is to keep the voltage reference powered on permanently, at least for months or perhaps years. Voltnuts are serious about this issue and rely on uninterruptible power sources (UPS). Good and stable voltage references change in the order of <0.3 ppm per month – not every voltage reference will reach this kind of performance “out of the box”. It is possible to select best-performing Zeners from a production sample. However, it’s an expensive gamble if you plan to select maybe two or three “good ones” out of 20.

In order to get reliable and somewhat predictable results, every voltage reference needs to be characterized in terms of stability, low-frequency noise and temperature coefficient. A voltage reference with an unpredictable drift is basically worthless because it doesn’t meet the stability criteria and therefore doesn’t qualify as a reference or standard. Currently I’m not able to do the noise and TC characterization yet because of lack of a ultra low-noise amplifier and a climate chamber. That’s another rabbit hole which has to be skipped yet 😉

How do you measure the stability of a world class DC voltage reference?

A high-accuracy DMM such as Keysight 3458A has built in a LTZ1000(ACH) as a voltage reference for its ADC. What happens if we measure another LTZ1000 with this kind of meter? We are basically comparing two similar voltage references to each other. Now let’s suppose the DMM’s internal DC volts reference shifts for 1 ppm. As a consequence, the indicator on the DMM’s display would show a voltage shift of 1 ppm. But in reality, we wouldn’t know if our instrument’s internal DC volts reference or our Device Under Test (DUT) shifted! The only way to know which one changed (DUT or DMM) is by comparison between a larger number of voltage references (e. g. 2, 3 or 4). One possibility would be to use two Keysight 3458A to measure one voltage reference. This way it would be possible to identify whether one of the DMMs or the DUT shifted. Since a 8.5 digit DMM is a very expensive piece of equipment, it’s much cheaper to build few more DC volts references and compare them to each other within a group of references.

So the answer to the question would be: one rather compares the voltage differences between multiple voltage references and observes the long-term stability between them. This is usually done with a calibrated high-accuracy DMM or (if you’re a vintage kind of a guy) so-called Null Detector. This way we are gaining confidence in the stability of the DC voltage reference and simultaneously we’re building a calibration history of each unit.

CERN’s HPM7177

I do own a HP 34401A (6.5 digit DMM) which is good enough for 99% of measurements but not good enough for voltnutting or DC volts metrology stuff. 6.5 digit metrology isn’t something I really look forward to do (like some guys over at EEVblog). In order to monitor the stability of my voltage reference(s), I’ll need a 8.5 digit class meter. Since the market for HP 3458A is currently overheated and buying such an expensive device is associated with potential risks (bad or drifty U180 ADC), there might be a possible alternative within a hobbyist’s budget.

HPM7177 sitting there and gaining ppm dust. It’s a beautiful design and very well crafted by A Random German Guy (ifyouknowwhatimean).

Few years ago, CERN TE-EPC group’s member Nikolai Beev has proposed a design of a metrology-grade ADC called HPM7177 which has been published as an Open Hardware project in the meanwhile. HPM7177 is based on Analog Devices’ AD7177-2 Sigma-Delta ADC, Linear Technology’s (now Analog Devices) LTZ1000ACH ultra precision reference and Vishay’s PRND Thin Film Resistors. It’s a single channel ADC card with a native sampling frequency of 10k SPS with  a maximum bandwidth of 5 kHz. An effective resolution of 23 bit for a bandwidth below 10 Hz can be obtained. The measuring range is ±10 V with a 30% over-range. A really nice feature are the thermo-electric coolers for temperature stabilization of the temperature sensitive parts.

Two HPM7177 units have been built by Marco. He documented the assembly in one of his YouTube videos. I “inherited” this HPM7177 from That Random German Guy 😉 some time ago. However, I wasn’t able to use it due to lack of time, projects and most importantly: I wasn’t able to do a proper calibration of this metrology-grade ADC. Meanwhile it’s been powered up since March 2023 and a calibration and characterization has been performed in May 2023.

One small downside of HPM7177 is its inconvenient operation: the incoming data is encoded as a 32-bit integer, which it needs to be read out via USB at a fixed sample rate of 10 kHz and post-processed after data acquisition. Recording all samples generates a huge amount of data in the order of 100-250 kB/s. This is no problem for a modern-day computer and Python, however, long-term measurements may generate lots of gigabytes of data very easily. At a certain point it’s becoming highly impractical to save raw data in a human-readable CSV file so one has to consider using different formats such as NASA’s HDF5.

Soon™

HPM7177 has been powered since early 2023. Let’s hope the internal references did not drift too much. Next calibration in 1-2 years will tell.

Alright, this is already too much text I’ve written as an introduction to my voltnutting ambitions. I’ll write another (shorter) blog post how I did the calibration of HPM7177 and share some measurement results. There will also be some integral nonlinearity (INL) measurement results here which I was able to perform with suitable instruments.

LTZ1000 based Voltage References and CERN’s HPM7177 Read More »

Cycling around Denmark’s Jutland Peninsula

“It’s summer. Holidays. What are you going to do with your free time?” The answer to this question was quite easy: cycling! I’m still pursuing my long-term goal to cycle the North Sea cycle route R1, which is basically a 7000 km long route around the North Sea. I’ve already covered most parts of the German leg (Ostfriesland and Nordfriesland) in the years 2018 and 2019 but as we all know, COVID-19 happened in early 2020 and all travelling plans had to be cancelled and postponed.

Four years later, it was about time to continue the journey. My plan was to cycle Denmark by bike and tent. I’ve never been to Denmark before and I had no idea what to expect there. The concept of Nature Camping Sites and Shelters was very intriguing and I wanted to give it a try. Prepared a route with OpenCycleMap, packed my stuff and off I went to the island of Sylt where I ended my last bike tour in the summer of 2019.

Getting to Sylt by train…

Travelling to Sylt by train on weekend wasn’t the best idea. The route from Hamburg to Sylt was overwhelmed by tourists. The trains were mostly full, delayed and there was little to none space for cyclists. I had to skip a change in Elmshorn just because the train was hopelessly full and people were travelling like canned fish. After arriving in Sylt on the late afternoon, I had to discard my plans for the first day. I tried to find a camping site near the city of Kampen. I entered a camping site in Wenningstedt, set up my tent and after half an hour or so, I was approached by the security guy. He told me that the camping site was “full” and that I had to leave. So basically I was thrown out because I arrived too late and didn’t book my stay. I’ve never experienced this before, packed my stuff and left speechless. Since wild/stealth camping in Sylt is illegal and there is always a beach police, I was forced to sleep on a bench. This unintended situation gave me a huge pain in my back so I had to use painkillers for the next couple of days. I really disliked Sylt (even back in 2019) and just wanted to leave as quickly as possible. I won’t visit this island anymore. It’s just overcrowded, expensive (FCK KURTAXE) and you get treated like an animal. No thanks.

How to avoid Sylt’s “Kurtaxe”: just get kicked out of the camping site and sleep on a bench like a homeless person.

However, the next morning (Day 1), I cycled to the so-called Ellenbogen (“Sylt elbow”) and visited the List lighthouses and the northernmost location of Germany. The sunrise was really beautiful and rewarding. I cycled back to the List harbor and took the ferry to Havneby (Rømø, Denmark) at around 08:30. After leaving the island Rømø at around 10 o’clock, I started cycling the Route R1 on Jutland.

Welcome to the northernmost location of Germany!

Week 1 – West Coast Route R1 from Sylt/Rømø to Skagen

This route was (officially) about 550 km long and it took me 7 days from Havneby to the northernmost location in Denmark. The west coast route was beautiful. Besides beautiful landscapes (dunes, forests, fjords, bays, sea) and mostly good to excellent cycling weather, the cycling roads were in a very good condition and also varying in quality: asphalt roads, gravel, sand/beach, forest paths, hills. I had little to no trouble with winds because the cycling routes were guarded by wind-stopping forests, dunes or dikes. 50% of the cycling time I had a weak wind, 25% back wind and 25% head wind. Day 3 was very rainy, the rain lasted for several hours but was gone in the afternoon. The route signs on the route were mostly visible, at some points they were either hidden, missing or inconclusive. This resulted in many extra kilometers because I lost track of the route. In the end, I cycled around 620 km.

Camping sites were in a good to very good condition although a bit expensive in the range from 160 to 230 DKK per night which corresponds to 23 to 32 EUR per night. It’s a bit much for cyclists with a tent if you compare it to Germany (price range from 12 EUR to 20 EUR per night). However, the shelters were free of charge so spending every second or third day on a camping site in order to get a shower and to charge up batteries was sufficient. Unfortunately, someone stole my fast charger and power bank during my stay in Ribe on Day 1. Luckily I carried a backup power bank and a charger – albeit much slower to charge – so I had to turn on the flight mode and save energy for the rest of the tour.

I met many other cyclists on route and it was an amazing experience. Everybody was friendly and supportive and we shared our cycling plans and stories. Two of those amazing cyclists were Tim from UK and Justin from Switzerland. We met on Day 3 (the rainy day) like two times on the road and later in the evening (by coincidence) in a shelter. We talked about our routes and  we jokingly agreed “Our next shelter will be at X, so if you join us, it would be great to have you with us!”. The shelters were 80-100 km apart so it was quite a challenge to get there. So I cycled the next couple of days for 8 hours daily and I was able to meet them at the shelters we agreed upon. As I showed up, they couldn’t believe that I made it! Tim was very excited and sponsored me a beer on each evening. Unforgettable! We parted our ways after Day 6. Tim went on his tour to Norway and Justin continued his journey in Sweden.

Cycling from Hirtshals to Skagen was really amazing. I had about 3 hours of back wind, very good weather and great views. I took some pictures of the area although I didn’t take a walk to the Northern Beach. There were too many tourists present and I was afraid leaving my bike unattended. I noticed a high number of Tesla Electric Cars there but one car really blew my mind: I spotted a DMC DeLorean there (the car from the movie Back To The Future) which really blew my mind.

Week 2 – East Coast Route R1/R5 from Skagen to Kruså/Flensburg

After reaching Skagen and the northernmost point of Denmark, I had to cycle back to Germany – a distance of approx. 620 km. Day 8 (Hulsig – Dokkedal) was a very good cycling day (111 km) with lots of interesting encounters. The following days (Day 9 and 10) were really difficult weather-wise. A bad weather zone called Hans was raging over Scandinavian countries and brought a lot of rain. The situation in Sweden and Norway was very dangerous because some local rainfalls were extreme and flushed away streets and railways. Day 9 (Dokkedal – Fjellerup) was raining the whole day. I was wet both inside and out. This was no problem because I had exchange clothes which stayed dry during the ride. Staying warm and dry during the night is much more important than during the daytime. On Day 10, the rain went away but there were strong winds at 60 km/h in combination with hills. This combination of winds and hills was very tiring and I wasn’t able to cycle large distances (55 to 65 km per day at best). Hans was almost gone on Day 11 (Balle – Aarhus) but I had to fight the terrain: hills after hills. While the West Coast Route was mostly flat and hills were an exception, the East Coast Route was dominated by hills. The hills weren’t very large (maybe 10 to 30 meters) but very frequent. I had to push my bike frequently because of my overweight and because I was carrying too much baggage with me. Nevertheless, I was able to achieve daily distances of somewhat 70 to 90 km per day which were inside of my comfort zone.

The landscape along the east coast route was dominated by cities with harbors, bays, smaller villages and agriculture. On sunny days, the landscapes were beautiful and very varied. The hills were quite a challenge which were a very nice addition to the overall cycling experience. During the last day of cycling from Fredericia to Kruså (Day 14), I was able to cycle another 109 km although the weather got really bad in the afternoon. I visited a camping site in Kruså which was about 10 km away from my destination: Flensburg.

The next day, I cycled across the Danish/German border to Flensburg, bought myself a Flensburger Pilsner beer and celebrated a successful bike tour. The travel back from Flensburg to Braunschweig by train took me another 7.5 hours.

Summary

The green marking highlights the (approximate) cycling route. I’ve cycled around 1250 km in 14 days.

I really enjoyed this adventure. My arrival day from Braunschweig to Sylt wasn’t going as planned. I had to sleep on a bench because I was thrown out from a camping site. My charger/power bank was stolen. My back/ass hurt all the time. I got lost many times and had to ride extra kilometers. I had to push my cycle and walk uphill many times… Nevertheless, a 40 year old guy weighing 120 kg (240 lbs) doing a 14 day cycling tour in a foreign country worked out pretty well! I’ve visited beautiful and interesting places and cities (Esbjerg, Hvide Sande, Hanstholm, Blokhus, Hirtshals, Skagen, Fredrikshavn, Fjellerup, Grenå, Aarhus, Juelsminde, Fredericia, Kolding, Hadersleben, Aabenraa), yet I haven’t seen them all. The holidays in Denmark were quite affordable (~500 EUR for 14 days including food and camping and 2 extra days of arrival and departure). I plan to return to Denmark maybe next year and cycle the remaining part from Fredericia via Odense to Kopenhagen.

Total kilometers cycled
(km)
Total time cycled
(hh:mm:ss)
Average speed
(km/h)
Average cycling duration per day (hh:mm:ss)
1244.96 98:15:26 12.646 6:33:02
Some statistics taken from the distance logger.

 

Cycling around Denmark’s Jutland Peninsula Read More »

Reviving an Old Temperature/Humidity Data Logger: Lufft Opus 10

Introduction

Changes of temperature may affect measurement instruments in a negative way: thermal noise, drift of operating points, thermoelectric effect etc.. Every device has a so-called temperature coefficient (short: tempco or TC) which states how the system behaves when subjected to temperature change. Tempcos have to be taken into account when designing an electrical circuit (e. g. a voltage reference or an oscillator) or running an instrument outside of defined environmental conditions. Humidity usually affects the buildup of electrostatic charge, growth of biological organisms (e. g. mold), it may accelerate corrosion of metals and may lead to changes of electrical properties of capacitors and mechanical properties of some materials such as wood or epoxy due to surface absorption of water molecules. Therefore the environmental conditions have a significant influence on any kind of measurements and therefore need to be monitored and controlled. Since the “controlling” part (a.k.a. air conditioning) can be very difficult and expensive for a hobbyist nowadays, I was interested into the “monitoring” part.

Monitoring temperature and humidity during measurements can be of great help as soon as one has to analyze and interpret long-term measurement data. Usually the crucial question is: “Can this unwanted drift of my Device Under Test be attributed to the change of environmental conditions?”. If the answer to this question is “yes”, one can decide to take appropriate measures to deal with changing environmental conditions.

Monitoring temperature and humidity can be done very easily. Everything one needs is a sheet of paper, a pen, a clock, a thermometer and a hygrometer. Writing down time, temperature and relative humidity is the simplest method of monitoring the environmental conditions. But what happens if you have to run a measurement over a span of few days or weeks? You certainly would have to deal with missing data or data gaps. This is where a temperature and relative humidity (TH) data logger comes in place as a very useful piece of test equipment. A TH data logger is basically a small computer with storage memory (e. g. SD card), a clock and temperature/humidity sensors. Modern devices have more capabilities such as WiFi connection, graphical displays, multi-sensor logging, database connection and much more. A data logger is used to monitor environmental conditions 24/7 in a laboratory or any room of a building (bathroom, basement, radio shack, storage room, …).

Computers, memory and temperature/humidity sensors have been become very affordable in recent years and can be easily turned into loggers. This can be done with inexpensive Arduino based microcontrollers or Raspberry Pi single-board computers.

Buying stuff – the devil is in the details

Me being lazy, I didn’t want to spend much time on the development of temperature loggers. I am certain that there are few interesting projects on GitHub out there which I’ll check out soon(tm). After a few weeks of searching, I found two commercial dataloggers on Kleinanzeigen (German analogy of Craigslist) in the 60-90 EUR range which is not bad at all. One of those data loggers I acquired was the Lufft Opus 10. I’ve heard of the German company Lufft before – they are a reputable company in the fields of climate and environmental measurement equipment. Opus 10 is a TH logger with a LCD display and an USB interface for readout/control of the device. It was manufactured by Lufft in the mid 2000’s and I bought a second hand unit still in a working condition – albeit the battery was already drained up and needed to be replaced soon and it will probably need a calibration.

Lufft Opus 10 Temperature/Humidity Data Logger

As soon as I got the TH logger, I started looking online for drivers, software and documentation. I realized that this particular product was discontinued by Lufft probably 10 years ago and there was no real support for this product. Thanks to Google search and Archive.org I was able to find the manuals, datasheets and the Lufft SmartGraph logger software.

Wayback Machine from web.archive.org. This website saved my day many times. Please consider donating 😉

Lufft Opus 10 teardown and battery replacement

I’ve made some photographs of the inside. Opus 10 is measuring the temperature probably with a NTC resistor (blue blob) and the relative humidity with a capacitance sensor. Besides that, I couldn’t find anything unusual. FT232BL can be seen clearly, along with two EEPROM ICs. Off-the-shelf-components from the mid 2000 era were used, I haven’t seen any special circuits or ASICs.

Description of the problem

After plugging in the USB device in my PC, the device couldn’t be found and drivers had to be installed manually. Unfortunately the SmartGraph software did not contain any Opus 10 drivers so no communication could be established between the data logger and PC. I thought maybe the previous versions of SmartGraph may have the drivers included so I started downloading versions dating back to the Windows 95 era. No luck at all. No drivers could be found. Since I didn’t have the original installation CD-ROM (or diskette), I could not establish a connection to my PC. It was a bit disappointing but not bad – the device would act as a TH display for the next couple of months which was good enough for my “pen-and-paper-logging” approach.

An unknown device “DATALOGGER” shows up soon after connecting the device to the PC.

Fast forward 4 months and the battery finally died. Luckily, the seller sent me replacement batteries which were rather special type 14500 batteries (Li-SOCl2, 3.6 V) – not the standard AA  1.5 V. Battery replacement was a piece of cake, no problem at all. But as soon as the unit woke up, it was asking for a “SET CLOCK” procedure. After checking the manual, I soon realized that I had a problem: after battery replacement, the internal data logger clock needs to be synchronized with the SmartGraph software. The following three days were an unique PTSD experience in combination with nightmares. Being a bit pissed off that I probably just bricked the unit by simply replacing the battery, I just thought “Fine, I’m going down this rabbit hole – should have done it four months ago” and try to fix this damn thing.

After changing the battery, the Opus 10 unit asks for clock sync. This can only be accomplished via SmartGraph software, otherwise the data logger is rendered unusable.

I don’t want to write down every step and every Trial & Error in detail. I’ll try to give the reader of this blog entry an installation procedure in a short manner so everyone using this kind of Lufft Opus Series can install the drivers and establish a connection with the PC.

Fixing the brick

During the teardown I noticed that the communication between the data logger and PC is performed via a FTDI FT232BL integrated circuit. It’s basically a USB to serial UART interface with many features, e. g. the capability to store “USB Vendor ID (VID) and Product ID (PID), Serial Number and Product Description strings in external EEPROM”. During the late 1990’s and early 2000’s, the communication of similar Opus models was usually performed via a 9-pin serial interface (also called COM-port or RS232). They must have upgraded their legacy peripherals from RS232 to USB in the early/mid 2000’s. There are probably two EEPROMs on the lower PCB: Atmel812 93C56A for sensor data and DS 2430 for USB VID/PID. I couldn’t find any microcontroller on board, since the data from the sensors need to be converted in physical units and communicated to the display. Perhaps it’s hidden under the LCD display.

Now knowing that a FT232BL integrated circuit is used inside of Opus 10 is an important bit of information because one can pin down the correct drivers provided by the manufacturer Future Technology Devices International Ltd (FTDI). Just a quick sidenote: FTDI has been confronted by plagiarism ICs in the past where their chips were copied by different Eastern Asian companies. Using a plagiarized IC with their driver can be seen as breaking the user’s license. There may be a scenario where FTDI drivers can brick a plagiarized device due to “reasons”. I haven’t observed it yet, just heard of the possibility where the drivers renders the fake IC unusable or at least it blocks its operation – so be careful and make sure you’re using the original (expensive) FTDI IC!

Installing Windows XP on IBM ThinkCentre PC in 2023. Yeah, I haven’t thought I would do it ever again but somehow it worked perfectly fine. I was lucky and kept my old software all the years!

As a side project, I digged up my old IBM ThinkCentre PC from the 2004 era and installed Windows XP on it. Sometimes it’s nice to have one old PC for testing 20 year old hardware and software. After plugging in the Opus 10 into the PC, I get an unknown device called “DATALOGGER”. I wondered why the device was called that way and where did it get its name from instead of generic name such as “USB Serial Port (COM3)”. After two days of research and trying different things out, I’ve stumbled upon the FTDI Technical Note TN_100: USB Vendor ID / Product ID Guidelines. Basically FTDI ships their ICs with default VID and PID which can be customized by anyone who’s using them in their electronic designs. So basically there is a small EEPROM chip where the “DATALOGGER” name string and the custom PID are stored. Every time the USB device is plugged in, it sends those identification strings to the PC. The PC needs to find proper  USB drivers which match the VID/PID. I’ve looked into the hardware description of Opus 10 and got the VID Number 0403 and PID string “D6B8\12345678”. So they customized the PID and identification strings which was a problem for the operating system. The table below helped me to identify the VID/PID associated with the FT232BL so I started looking inside of the driver INI-files for this kind of information. I’ve quickly found the 0x0403 and 0x6001 IDs and I was hoping that renaming the default PIDs into the Lufft customized ones would help the operating system with driver identification. So that’s basically what fixed the problem. I edited bunch of INI-files and after plugging in the data logger, it was recognized immediately and I was able to install the proper FTDI drivers. The FTDI Application Note AN_107: Advanced Driver Options has a bunch of additional information how to customize their driver settings.

Excerpt from Table 3.1 from FTDI’s TN 100.

This workaround should also work on modern PCs running Windows 7 or Windows 10.

Step-by-step procedure

(Unfortunately) I am using a German version of Windows XP. However, it should be possible to get the idea of what needs to be done. After plugging in Opus 10, check the Device Manager for the newly discovered DATALOGGER. Check its properties and look for the “Hardware Detections”. There should be somewhere the VID and PID of the device. Write down the VID/PID and download the FTDI drivers for your operating system.

The Opus 10 VID/PID can be seen in the DATALOGGER properties.

I’ve been testing many versions of the FTDI drivers but it seems there is no significant difference between them. Just get one which works on your system (WinXP x32 in my case). I’ve downloaded CDM 2.08.24 drivers from the FTDI website. Unzip the drivers and you should get a similar file and folder structure as shown here.

The last FTDI driver version which supports WinXP 32bit: CDM 2.08.24.

Next step demands the editing of ftdibus.ini and ftdiport.ini files. Just use a simple text editor. Search inside of the INI files for the PID number 6001. There should be in total 3 lines where PID_6001 appears. Replace the PID number 6001 with the newly found Opus 10 PID (e. g. D6B8).

Notice: Maybe it would be better to make a copy of the line to be edited and edit leave the PID_6001 line untouched just in case you plan to connect a FT232 based IC without custom Product ID! I haven’t tested it yet but it seems like a better approach.

ftdibus.ini and ftdiport.ini need to be edited as shown in this picture.

After modifying and saving the INI files, one can proceed with the DATALOGGER driver installation. Use the Device Manager and start the driver update. The driver installation wizard should be pointed to the directory with the modified INI files.

Both INI-files need to be modified in order to be able to install FTDI drivers for the Opus 10 device called “DATALOGGER”.

Since we’ve modified the drivers, the WHQL certification fails. This can be safely ignored. After two subsequent driver installations, the devices should appear as “USB Serial Port (COM3)” and “USB Serial Converter”.

Screenshots after successful FTDI driver installation.

No further changes are needed, the COM3 settings seem to be typical at 9600 baud, 8 data bits, no parity bit, 1 stop bit (a.k.a. 9600 8N1).

Default settings after FTDI driver installation: 9600, 8N1.

The last step demands the installation of the Lufft SmartGraph software. I’ve used version 3.0 from the year 2005. A newer, modern version v3.4.5 should work, too. The data logger should be visible as a new COMx device. With SmartGraph you can change settings of the data logger such as logging intervals, min/max alerts, physical units etc. Getting familiar with SmartGraph takes a bit of time so I leave this as an exercise to the reader 😉

Conclusion

I consider myself “lucky” because in hindsight, this fix was easy – but it was nowhere documented on the internet. The trial & error approach cost me about 2-3 days of fiddling but it was successful in the end. The other option would have been grim: the data logger would be rendered unusable unless doing further reverse engineering. This is so unacceptable! Reverse engineering wasn’t clearly my goal on a 20 year old device – otherwise I would have invested my time in DHT11/22 and Raspberry Pi programming. There was a discussion on a German Windows 10 forum dated back in the years 2018/2021 concerning Lufft Opus 10 driver installation problems but their posts didn’t provide any useful information except “tried this driver and it worked!”. One of the users apparently fixed the problem by using a Prolific driver which I have also tried out – without any success. I’ve even contacted Lufft’s Support on this matter and they kindly provided me some information and further hints what could be done.

For my part, I’ve learned again: The Internet DOES forget. Thanks to Archive.org it was possible to browse old websites and get documents and files which I needed. It’s very important to download drivers and documentation and host them on independent sites. Otherwise it will become even more difficult in the years to come to have access to information of already discontinued products.

I’m hoping that this information will be useful to other amateur radio operators because there are some similar problem descriptions concerning the usage of programmable transceivers. Those transceivers also use a USB/RS232 IC which demand certain FTDI drivers and perhaps it’s possible to revive them with a simple modification of the INI files.

73, Denis

Reviving an Old Temperature/Humidity Data Logger: Lufft Opus 10 Read More »

Trying out Mastodon at social.darc.de

The German Amateur Radio Club (DARC) has just recently set up their own Mastodon-based social network server. It’s basically a social network similar to Twitter with a decentralized server structure. I think I’ll try it out for the next couple of weeks and share bits and pieces of daily adventures which may not fit in a classic blog format. Currently there are 114 registered entities at DARC and perhaps more people and amateur radio districts will join.

I must admit that I strongly dislike the anti-social part of social networking which extends in the fields of politics, religion, manipulation, opinions, viral social debates and trolling. One word: internet toxicity. I like fun and memes. Let’s hope the toots stay technical and hobby-related 🙂

You can read my toots (this is how they call tweets in Mastodon) here: https://social.darc.de/@DH7DN

If you’re member of the DARC, you can set up a Mastodon account with your existing login information at https://social.darc.de

Currently I’m preparing my equipment for the next SAQ broadcast on Sunday, July 2nd 2023. There will be two transmissions: first transmission at 11:00 and second at 14:00 o’clock (CEST).

Preparing for the SAQ transmission. Some items from the junk bin.

Have a wonderful day!

73, DH7DN

Trying out Mastodon at social.darc.de Read More »

Observing the Night Sky During an Airplane Flight

During a flight back home from a recent business trip, I was lucky to get a window seat. I was thinking of the possibility to see some stars of the night sky above the clouds and I wasn’t disappointed. The flight was held entirely during night time with cabin lights turned off. This was crucial because cabin lights are an additional light source which make unwanted reflections visible. The reflections usually overcast faint light sources such as stars. I took some photographs with my smartphone Samsung Galaxy S22 at exposure duration of 20-30 seconds and ISO 3200. The exact location of the photograph is unknown, it must have been somewhere in a part of south-eastern Algeria over the Sahara desert while looking to the east. I would estimate the position as follows: 23° North, 8° East, flight attitude 11 km (36 000 ft).

Result of a shaky picture during long exposure duration (20 – 30 seconds). The stars appear “smeared”

I made about a dozen pictures of the night sky but due to minor turbulence and slight flight course corrections, most of the images were shaky and had to be discarded. However, I was able to get 1-2 pretty decent pictures of the night sky which turned out to be OK. I was pressing my smartphone against the window to avoid shaking motion and put a pillow over it to block most of the residual (emergency) cabin lights.

Beautiful night sky picture taken with a smartphone from an airplane window. 20 second exposure at ISO 3200

The taken pictures show some prominent stars from the constellations Cygnus and Lyra: Vega, Deneb, Albireo and others. I was able to identify some stars by using an web-based star map application such as Stellarium Web. During the flight I could observe meteor flashes occasionally (no picture taken though) and lightning of distant thunderstorms, which were perhaps >200 km away. There were virtually no city lights visible during the flight over Sahara desert. Just imagine being there and watching the night sky without any light pollution

Identified stars from the constellations Cygnus and Lyra
Stellarium Web

The 8-hour-flight was very tiring because of lack of space to move and stretch. Sitting for hours in an uncomfortable position wasn’t very pleasant but it worked out somehiw. However, I was able to catch some nice pictures of the world 11 km below my feet. #worthit

Observing the Night Sky During an Airplane Flight Read More »

Voltnuts will hate this: Improve your DMM Resolution With One Simple Trick…

Measuring voltages accurately is a basic task for technicians, engineers and scientists. The voltages to be measured range from perhaps few picovolts to several megavolts – a dynamic range of 18 orders of magnitude! But every modern digital multimeter is kinda limited in resolution. The multimeter’s resolution can be stated in the number of digits it can resolve. A 6 digit multimeter can resolve six decimal places going from 0 to 9. In a decimal number system, this corresponds to \(10^6\) numbers or 1 million digitizing steps. Without going much into detail and exposing my limited knowledge on this matter, I’ll just link to Keysight’s Website where everything is well explained.

Older multimeter models such as the shown MeraTronik V543 can resolve only \(2 \cdot 10^4\) numbers in the selected measurement range (e. g. ±1 V = 2 V full scale:  \(2~V/2 \cdot 10^4 \rightarrow 100~µV\) resolution).

MeraTronik Type V543 (PRL T-189), 4.5 digit multimeter with Nixie tube display

One of the best and most accurate digital multimeters in present time – the HP 3458A – has “only” a resolution of 8.5 digits, which hasn’t improved for about 35 years.

HP/Agilent/Keysight 3458A 8.5 digit multimeter

The so-called “Voltnuts” (crazy electro-fanatics) buy those HP multimeters on a second hand market for $3k to $7k. This surely is crazy and overpriced and in my opinion just not worth it. How about buying a couple of cheaper 6.5 digit multimeters (e. g. HP 34401A for about $200 to $400) and combining them in a serial configuration? I’ve achieved a total of 19.5 digit resolution this way*. I was able to display 10 volts up to 18 decimal places, e. g. attovolts resolution and saved a lot of money.

Two HP/Agilent/Keysight 34401A 6.5 digit multimeters in an unusual configuration showing exactly 10 Volts on April 1st…

*If you don’t believe this nonsense, it’s fine. I can live with that. It’s April Fools’ day anyway 😉

Voltnuts will hate this: Improve your DMM Resolution With One Simple Trick… Read More »

Tauntek LogICTester – A TTL IC Tester

Introduction

About a year ago I saw one of CuriousMarc’s YouTube videos on repairing a Xerox Alto computer. CuriousMarc published shortly afterwards an episode, which compared the Tauntek LogICTester with the TL866II+ EEPROM programmer which has some transistor-transistor logic (TTL) testing capabilities. 1970’s and 1980’s era test equipment used alot of those intergrated circuits (IC) in order to operate. Servicing or repair of older test equipment like oscilloscopes, multifunction calibrators, power supplies etc. will be much easier with tools such as a logic tester. After reading a very positive review from a friend at the Wellenkino, I thought it would be very nice to own such a tester for servicing or repairing my (broken) equipment.

Tauntek LogIC Tester

I contacted Bob Grieb of Tauntek and ordered one of his kits back in March 2022. The $35 kit contained the printed circuit board and two pre-programmed PIC microcontrollers. The shipment to Germany cost me about $19 with additional 10 EUR for customs and fees. The total cost for the kit ans shipment was in the order of $64 or approx. 60 EUR. The shipment from USA to Germany took about week and a half.

20220403_114751.jpg
Shipment received from Bob Grieb of Tauntek.

After receiving Bob’s package, the project got delayed because I’m always kinda busy. I ordered most of the remaining parts via Mouser in December 2022. The ordered parts would cost additional 69 EUR. Many of the components on the bill of materials (BOM) list could have been easily skipped (e. g. resistors and 2x PIC microcontrollers, RS232 level shifter) resulting in 45…48 EUR price range. Nevertheless, I ordered few extra parts just to be sure if anything fails. Extra parts can be always used for different projects or experimenting with other circuits.

Two of needed parts on the BOM weren’t available at the time: the 74HC138 3-to-8 line decoder and LM358AN dual opamp. According to Mouser, the lead times for the decoder were four weeks and for the opamp approx. 1 year (which has been reduced to May 2023 in the meanwhile). So yeah, I had to order both parts on eBay instead. Waiting a year for an opamp wasn’t acceptable. I also ordered an USB to TTL FTDI Serial Adapter on Amazon (2 pieces for 8 EUR) so I could use the Tauntek LogICTester via USB instead of RS232. Everything arrived last week so I had to find few “quiet hours” for the soldering job.

Building the IC Tester

One starts with the printed circuit board and two PIC microcontrollers (U1 as Master and U2 as Slave) as shown in the picture below.

The unboxed Tauntek LogICTester.

I started populating the resistors and diodes in the first place. After soldering and cutting excess wires, I moved on to capacitors.

20230305_125434.jpg
Starting the population with passive components is always a good idea….
20230305_140448.jpg
Population continues, only few more parts…
20230305_173457.jpg
Chaos unfolds when doing a soldering project…

After hours and hours, I finally got it finished. The pins in the top right corner needed to be removed. Also JP1 and JP2 (top right above the IC socket) were shorted by a solder blob in order to use the FTDI to USB adapter instead of the RS232 level shifter. The level shifter 16 pin socket on the top right remains unpopulated. The final assembly can be seen in the picture below.

20230305_202548.jpg

After assembly I checked for cold joints or shorts. Everything looked fine and I turned it on.

20230305_184215.jpg
Tauntek LogIC Tester: finally assembled and ready for IC testing.

After plugging in the USB cable of the FTDI adapter into the Windows 10 machine, the driver installation started automatically. No additional drivers were needed to be installed. The settings for communication via Serial connection were by default “8-N-1”, which corresponds to 9600 baud, 8 data bits, no parity bit, 1 stop bit and no flow control. The connection needs to be established via a terminal emulator such as PuTTY. After establishing a connecting to the tester, one has to press ENTER to get the welcome screen and voilà, We’re In Like Flynn.

The usage of the IC tester is pretty much straight-forward. Power up the tester, establish a PC connection and put the IC into the socket as shown in the picture above. Enter the IC model inside of the console.  If the IC is found inside of the database, type t and press enter to start the IC test. The results are presented in a very comprehensive way. Typing v and pressing enter displays the pin voltages.

Tauntek LogICTester menu via terminal emulator PuTTY.

That’s it – there isn’t much more to it. Very simple and effective when it comes to debugging the 1970s to 1980s era logic ICs. Few additional hints and comments:

  • Unfortunately the IC tester can not be used in order to recognize part numbers of ICs under test. The part numbers have to be looked up manually inside of the terminal emulator (or Bob’s list)
  • Bob maintains the firmware and the list of supported ICs. Perhaps by writing him an email and by sending him the missing or unsupported IC, Bob may update his firmware in the future and add support for the missing IC
  • The logic tester certainly isn’t free of bugs – some tests may result in a “FAIL” although the IC is still fine according to the datasheet specifications. Please, don’t blindly trust the machine. Take your time and try to sanity-check or interpret the results
  • The logic tester can’t check memory chips for faulty memory cells (such as Retro Chip Tester Professional from the 8Bit-Museum.de)
  • I’ve added a picture gallery to my Piwigo website if you want to check out some additional pictures

Have a nice Sunday and happy IC testing!

Tauntek LogICTester – A TTL IC Tester Read More »

Having Fun with 75 Ohm Technology

If one wants to capture analog images or analog videos (e. g. images coming from a CCTV camera), those signals need to be digitized, decoded and displayed with a device called framegrabber. A framegrabber is basically a video capture card with fast video processing capabilities and onboard memory which is useful for image processing.

I wrote in my previous post how to make good quality screenshots of the Anritsu MS2661N front display. However, there is another ancient method how to acquire images of frequency spectra. In modern test equipment, the video signals are transmitted digitally via DisplayPort or HDMI. Some 20 to 40 years ago, the manufacturers offered instruments with an optional analog video output which could be connected to a television screen or to a video recorder for viewing or documentation purposes.

75 Ohm composite output can be seen on the back side of the Anritsu MS2661N spectrum analyzer

I’ve got myself a framegrabber card NI PCI-1405 for different projects. I wanted to test the card for its functionality. The quickest access to an analog video was via the composite output of my spectrum analyzer as shown in the previous picture.

NI PCI-1405 Video Framegrabber Card

The NI PCI-1405 framegrabber card has two inputs: a 75 Ohm video input and a 75 Ohm trigger. The video input is connected via a 75 Ohm cable (type RG-59) to the composite output of the spectrum analyzer.

The 75 Ohm coaxial cable (RG-59) needs to be connected to the video input of the framegrabber card

After installing the drivers from National Instruments, the framegrabber card was successfully detected and I was able to grab some frames inside of NI MAX (Measurement & Automation Explorer).

Framegrabber user interface inside of NI MAX

I didn’t bother to improve the image quality – this task will be relevant for future projects as soon as I get my Tektronix C1001 camera running 🙂  So far, it’s been a successful test!

Grabbed frame in a 640×480 resolution. The analog source signal was received in greyscale NTSC format at approx. 30 frames per second
Tektronix 2456B with attached Tektronix C1001 video camera

Having Fun with 75 Ohm Technology Read More »

Anritsu MS2661N Spectrum Analyzer Readout

Introduction

A spectrum analyzer (SA) is a very useful tool when it comes to measure spectra of radio frequency signals. I recently acquired a 2004 era spectrum analyzer. It’s from a Japanese test equipment manufacturer Anritsu and the model number is MS2661N. Luckily there are operating manuals available online but I wasn’t able to find service manuals for this type of spectrum analyzer on the internet. There are some service manuals available for similar models of spectrum analyzers (e. g. MS2650/MS2660) which would allow troubleshooting but I would be lost if the instrument breaks.

Anritsu MS2661N Spectrum Analyzer (100 Hz – 3 GHz). Those blue handles totally aren’t butchered from Rohde & Schwarz test equipment… Sacrilege! Don’t ask!

However, I’ve been looking for a decent SA for a longer time and stumbled upon the Anritsu MS2661N. It had a bunch of very nice and useful features: frequency range 100 Hz to 3 GHz, 30 Hz resolution and video bandwidth, oven controlled crystal oscillator (OCXO), GPIB interface, 10 MHz reference IN/OUT and a tracking generator ranging from 9 kHz to 3 GHz. I was looking for a similar SA from HP/Agilent 8590 Series or Tektronix but there were no attractive offers at the time. Either the SA frequency range was too low for modern ages (1 GHz) or outside of my measurement capabilities (26 GHz), the price was either too high or it was partially broken. There were also 75 Ohm spectrum analyzers which aren’t very useful for what I’m doing. On the other side, the documentation for HP/Tek hardware is the real deal so leaving this kind of test equipment ecosystems was a tough decision.

Long story short: I wasn’t disappointed and the SA works perfectly fine. I don’t want to write a lengthily blog about it. One of the first experiments was connecting my GPS disciplined oscillator to the signal generator and spectrum analyzer simultaneously in order to provide the same external reference for both instruments and checking if the frequency (1.5 GHz) and the amplitude  (-35 dBm) are accurate. Acquiring measurements was super easy and the operation of the SA is very straight-forward.

Agilent E4432B Signal Generator. Note that the EXT REF is on and the output signal is referenced to a 10 MHz GPS disciplined oscillator.
10 MHz reference signal distribution from a GPS Disciplined Oscillator (GPSDO).
Back side of the Anritsu MS2661N. The 10 MHz signal is fed into the REF IN.

Documentation of Measurements

I would consider the somewhat cumbersome recording of readings as a minor disadvantage of this SA. Taking a photograph of the display may be “quick and dirty” but you have to deal with bad image quality due to reflections, visible RGB pixels and picture alignment. It is possible to take screenshots in bitmap format (BMP) but one needs a special type of a Memory Card (basically a PCMCIA or PC Card) in order to save the screenshots on an external storage. That’s really unfortunate but measuring instruments of that era were either equipped by a floppy disk or Memory Carc. I was always afraid of damaging the fragile pins while pushing the PCMCIA card in its slot although it is rated for 10k mating cycles. The MS2661N type SA even has a 75 Ohm composite out – it’s possible to record video stills in the NTSC format. However, there are two elegant methods which I would like to show how to transfer the readout from the instrument to the personal computer (PC) by modern means.

A photograph taken of the frequency spectrum. The image shows LCD pixels, scratches on the surface of the front panel and reflections due to bad light conditions.

Method 1: Sending a Hard Copy from SA to a PC

Back in the days, the measurement results such as frequency spectra would be printed on a piece of paper as a part of the documentation. A device called printer or plotter was needed and the process was called “hard copy”. The difference between a printer and plotter is how the drawing is generated: while the printer generates text and images line by line, a plotter can draw vectors in a X-Y-coordinate system. HP developed its own printer control language back in 1977 for this purpose – the HP-GL or Hewlett-Packard Graphics Language. HP-GL consists of a set of commands like PU (pen up), PD (pen down), PAxx,yy (plot absoute) and PRxx,yy (plot relative) in order to control a plotter, which is basically an electro-mechanically actuated pen. The commands are transmitted in plain ASCII via GPIB or RS-232C interfaces. If we were somehow able to capture the HP-GL ASCII code, it should be possible to generate a lossless vector graphics instead of a lossy bitmap.

An example of the acquired HP-GL code in a text editor.

Hardware Requirements

Besides the already mentioned spectrum analyzer one needs either a GPIB/USB or GPIB/Ethernet adapter. I have tested it successfully with a National Instruments GPIB-ENET/100 on a Windows 10 machine with NI 488.2 v17.6 drivers. It should also work with a NI GPIB-USB-HS+ (Chinese clone) adapter.

Software Requirements

I was looking for a quick solution how to acquire hard copies. Thanks to einball on a certain Discord channel 😉 for showing me the KE5FX 7470.EXE HP-GL/2 Plotter Emulator. John Miles, KE5FX, already wrote a software back in 2001 which does emulate a HP 7470A pen plotter. The 7470.EXE is still maintained by John and supports popular spectrum analyzers from HP and Tektronix. His software is able to fetch the HP-GL ASCII via GPIB and render the hard copy image on the screen. The image may be saved in a bitmap format (BMP, TIFF, GIF) or in a vector format (PLT, HGL). I have tested John’s software with Anritsu MS2661N and it worked perfectly fine. I suppose this could work on similar Anritsu spectrum analyzer models, such as MS2661C.

Setting up the Spectrum Analyzer

Here is a brief summary how to obtain a hard copy from an Anritsu MS2661N spectrum analyzer:

  • Connect the spectrum analyzer to the GPIB adapter and boot up the device
  • Go to the Interface menu and use settings as followed → GPIB My Address: 1, Connect to Controller: NONE, Connect to Prt/Plt: GPIB, Connect to Peripheral: NONE
    The SA wants to send its data via GPIB to a plotter. It’s important to disable the “Connect to Controller” option, otherwise it won’t be possible to select GPIB as “Connect to Prt/Plt”. The GPIB address is set arbitrarily to 1
  • Go to Copy Cont menu (Page 1) → Select Plotter
  • Copy Cont menu (Page 2) → Plotter Setup → Select following options: HP-GL, Paper Size: A4 Full Size, Location: Auto, Item: AllPlotter Address: 2
    It’s important to set the “Plotter Address” value to a different number than the “GPIB My Address“. If both addresses share the same number, the hard copy will result in a timeout error

Install John’s 7470.EXE software and start the HP 7470A Emulator. There is no need to change the settings of the GPIB controller, it works out of the box. Click on GPIBPlotter addressable at 2. The selected address in 7470.EXE should be identical as the previously set Plotter Address. In order to obtain a hard copy, press the button w and the 7470.EXE should display a message like shown in the screenshot below. Once you press the Copy button on the spectrum analyzer, a data transfer progress should be visible. It takes about 10-15 seconds to transfer the data (approx 7-10 kb) from the SA to the PC. Once it’s complete, an image of the current frequency spectrum is shown on the display. That’s it.

Creating Publication-Quality Vector Images

At this point, it’s possible to save the acquired hard copy in a bitmap image format. If one needs a publication quality images – which should be free of compression artifacts – one should save the images in a vector format such as PLT/HPGL. This workflow proved to be a little bit inconvenient but it’s perfectly doable. Save the hard copy as .PLT and open the image in a HP-GL supported viewer. John suggests few of them on his website – I’ve tried CERN’s HP-GL viewer. It’s distributed free of charge and still maintained by the developers. Download their viewer and load the PLT-image. If the colors seem wrong, there is a setting where you can change the pen colors. Once done, it’s possible to export the PLT image as PostScript (PS) or Encapsulated PostScript (EPS) or print as PDF. EPS files can be embedded in LaTeX documents or can be imported in a vector graphics editor such as Inkscape.

The results turned out to be really good. Especially the vector images are crisp and sharp. One can zoom in without any image quality losses. The printouts on my laser printer are perfect. A little downside would be few breaks in the workflow: one has to use three different applications in order to obtain, convert and process the images. But it’s worth it 😉

Method 2: Readout Data via pyvisa and Plot it via Matplotlib

A different method to plot the frequency spectra would be by downloading the acquired raw data via GPIB and plot it directly. This is exactly what I’ve done. I’ll share the Python code down below. It’s possible to refine the plot by automating more stuff: one can generate annotations directly from queried instrument settings. Just put enough time in it and you’ll get superb results. The plotted image can be saved directly in a Scalable Vector Graphics (SVG) or any supported bitmap/compressed format.

Spectrum analyzer data plotted via Python’s library Matplotlib
# -*- coding: utf-8 -*-
"""
Created on Tue Jan  3 16:45:39 2023

@author: DH7DN
"""
import numpy as np
import pyvisa
import pandas as pd
import matplotlib.pyplot as plt

#%% Open the pyvisa Resource Manager
rm = pyvisa.ResourceManager()
print(rm.list_resources())

#%% Create the Spectrum Analyzer object for Anritsu MS2661N at GPIB address 13
sa = rm.open_resource('GPIB0::13::INSTR')

# Print the *IDN? query
print(sa.query('*IDN?'))

#%% Take a measurement
# Set frequency mode to CENTER-SPAN
sa.write('FRQ 0')

# Set the center frequency in Hz
cf = 1.5E9
sa.write('CF ' + str(cf) + ' HZ')

# Set span in Hz
span = 10000
sa.write('SP ' + str(span) + ' HZ')

# Take a frequency sweep (TS)
sa.write('TS')

# Select ASCII DATA with 'BIN 0' according to Programming Manual
print(sa.write('BIN 0'))

# Create a Python pandas Series
data = pd.Series([], dtype=object)

# Fetch data, convert string to float, print the power level values
for i in np.arange(501):
    data[i] = float(sa.query('XMA? ' + str(i) + ',1')) * 0.01
    print(data[i])

#%% Plot the results
# Generate the frequency values for the x-axis
f = np.linspace(cf-span/2, cf+span/2, 501)

# Plot the results, set a title and label the axes
plt.plot(f, data)
plt.xlabel('f in Hz')
plt.ylabel('Power Level in dBm')
plt.title('CF: 1.5 GHz, Span: 10.0 kHz, RBW: 100 Hz, VBW: 100 Hz, \n Peak at 1.5 GHz and -35.85 dBm')
plt.grid(axis='both')
plt.minorticks_on()
plt.show()

Few things to consider when using Python to obtain data from the spectrum analyzer:

  • Anritsu MS2661N acquires only 501 data points per sweep
  • The frequency axis values need to be generated manually. I used numpy‘s linspace method. It was a bit tricky because you one has to change the generation of frequency step values depending on whether parameters “Center Frequency & Span” or “Start/Stop Frequency” are used
  • Fetching the data takes quite some time (approx. 30 seconds). This is due to the fact that every single data point needs to be queried with the XMA? command in a for-loop. This is at least how it’s done in an example from Anritsu’s Programming Manual. I haven’t figured out yet how to fetch a block of data

Summary and Conclusion

I was clearly impressed how easy it was to obtain good quality frequency spectra images from a 20 year old instrument. I’ll refine the workflows and do further testing in Python. It should be possible to do all of this “automagically” via one little Python script. So far I’m really happy with the results where I don’t have to rely on smartphone pictures anymore. Thanks to einball for his help (basically googling for me) and to John (KE5FX) for writing his plotter emulator which helped me a lot to obtain hard copies from my SA. That’s it for today! Happy measurements! 😉

73 de Denis, DH7DN

Anritsu MS2661N Spectrum Analyzer Readout Read More »

Happy New Year 2023

Hi everyone,

let’s just forget 2022 and move on. Covid, inflation, wars and conflicts – it doesn’t get better. Nevertheless, I had many positive moments in 2022, too! I had some lucky test equipment acquisitions, I managed to sell unused test equipment and free up some space, did some Python and GPIB programming, did a bike tour, met lots of nice and interesting people throughout the year, finally published some decent blog posts and successfully reduced my weight from 132.9 kg (290 lbs) to 115.5 kg (254 lbs) in 365 days.

There is a lot more to do in 2023 and I’ll try to keep up with publishing interesting blog posts. My new year resolution in 2023? No new resolutions! They are useless – at least for me.  I have a bunch of interesting projects on my list and I hope they will happen some day… perhaps this year. If you take on too much, you will end up doing nothing at all.

Happy New Year 2023, stay positive, safe and sound 🙂

73 de DH7DN

Doesn’t always go as intended…

Happy New Year 2023 Read More »

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 »