Fun with Ebay purchases

Introduction

A lot of the stuff in my lab comes from Ebay. Simply because this kind of equipment is hard or impossible to find in Europe. And if you find it, the seller is asking big money for it. Buying overseas is not cheap either, due to import taxes, and shipping costs.

And buying from Ebay has some risk to it. Of course, if you pay with Paypall, there is the “money back guarantee”. Most of the times this means shipping back the item

, and depending on the seller the shipments must be payed. If you buy stuff from Ebay you know all of this.

Most of the times however, it’s okay and there are no problems. And sometimes you find yourself in a situation which is just baffling.

What about a 54845A Infiniium Oscilloscope?

For some time I was looking for one of these. And I found a Ebay listing, made a best offer, which was accepted. For $1350,00 dollars the scope was mine. The scope was advertised as a working scope. So all in all it’s still on the high side. These scopes aren’t the best. But for what I have in mind it’s more then good enough.

And then the scope arrives

After a week and a couple of day waiting the scope was delivered. And well the package wasn’t that great. The scope could move around inside the box, which is bad. I wish that people sending equipment would learn to pack equipment so it can’t move around, with enough protection around all sides. In this case I feared the most. Luckily the scope itself was wrapped in a good amount of bubble wrap, and it didn’t destroyed the box it was in.

After unpacking and turning it on, the scope refused to boot. Due to a bad CMOS battery it want’s me to press F1 on the keyboard. And luckily a keyboard was included, so after hooking on the keyboard, and pressing F1, the scope booted into Windows, and started the scope application. The first impression was not that good. But if this was all.. I’m not complaining..

Self test time!

While the scope was booted I noticed some strange flickering and weird behavior while channel 1 was enabled. I disabled channel 1, and it looked good… for a while then some other glitches I could not explain. Hmm let’s do a self test.  And the self test failed on Video SRAM. And the second time  did a self test it failed on: “Tri State trig”. This points into the direction of a board called “A6”,which is a scope interface board.

It’s dirty… real dirty

So maybe the card has bad contacts, so I decided to remove the case, and take a look inside. And that is when I noticed a lot of dirt. I have seen dirt in machines, but this is really bad. I cleaned most of it. Cleaned the A6 board, and sprayed some Deoxit on the contacts. and reinstalled  the board. Unfortunately, the problem stayed.

Time to contact the seller

Now knowing that there is a problem with the scope I contacted the seller, which replied with: “I”ll see what I can do, and else send it back and you get a refund”.

After a good night of sleep I decided that sending the scope back in the original package, would be the end of the machine. The package would hold a second time. And I don’t have other packing materials. And it also means shipping costs, and the value of the dollar and euro.. so in the end it will cost me money, even if I get a refund. So I started to look online for a A6 board and could find one for 50 dollars. Which I bought. I let the seller know what I did to get the scope going. I also told about the state the scope is in, and that it’s not good. But that I went ahead and invested 50 dollar for a A6 card. The response I got was.. well i didn’t know if a should cry or laugh. the exact response was:

“All I can say is wow! That is amazing. Can’t thank you enough for doing that. I’m hoping it works out!”

Errr.. I don’t know how to respond to that.

Self calibration

I went ahead and tried to calibrate the scope by using the self calibration process. This is a straight forward process. It only takes some time to complete.

When I started the self calibration tool, it looks like the previous calibration seems to have failed on channel 2. Not a good sign. This is just the kind of problems I’m afraid of. These scopes have hybrid ADC’s. And it they fail, or there is some problem in the front-end.. it can be very hard to fix, and very costly.

And of course when I tried to calibrate the scope ,it failed. A lot of effort later by cleaning the hybrids the calibration process finally end successful. So now I only have to wait for the “A6” board, which is hopefully a working board, and I only have to swap the board, which is not very complicated.

In conclusion

When buying stuff on Ebay, there is always a risk that the item bought isn’t exactly what is advertised.And yes I could have shipped it back, and got a refund. However due to the state of the packaging I know for sure the scope wouldn’t make it in one piece. And spending 50 dollar seems the cheapest option. And the last thing I wanted was ending up in a discussion about a scope which was damaged during shipping.

To summarize: This scope was advertised as working, however:

      • Didn’t boot due to a dead CMOS battery (easy fix)
      • A6 board is defective (bad SRAM)
      • The machine wasn’t cleaned, and if I didn’t had to open it.. I would not know about the dirt inside.. which could easily destroyed the machine due to lack of cooling.
      • Calibration failed on channel 2. Luckily I could fix this. But this could have been a major problem.

This machine should have been listed as “untested for repair or parts”. If such a machine as this was advertised as such I wouldn’t even considering buying. It took a lot of time and to get it to a point of a good working scope. But I rather would have spend this time on the project I’m working on where I need the scope for in the first place.

Installing PyVisa on MacOS 10.14.6 (Mojave)

Installing PyVisa on MacOS 10.14.6 (Mojave)

In this article I had some trouble installing the NI-VISA library for py-visa. So this article is a quick update on that. This article describes what I did to test the NI-VISA library. And honestly I don’t know why it was not working.

First of all, when testing the installation of pyvisa with:

>>> import pyvisa
>>> rm = pyvisa.ResourceManager()
>>> rm.list_resources()

Make sure the equipment connected to the USB GPIB adapter is on. If the connected equipment is not on, you get a empty list of resources back.

Testing the NI-VISA library

The first thing I wanted to know was: When the NI-VISA library is not working, is that due to some configuration?

Testing can be a little annoying since when you reinstall the library, or de-install and (re)install you have to reboot your machine.  And I didn’t want to mess around to much, with the risk I wrecked some black magick library configuration. Which might be almost impossible to fix.

So I figured: Why not unpacking the installation package, and try the driver within the package directly ?

Unpacking a .pkg file under MacOS is really simply. First mount the Downloaded .dmg package. In my case: NI-VISA_20.0.0.dmg

Once it’s mounted, I changed to my home-dir, and created a test directory.

cd ~
mkdir test-nivisa
cd test-nivisa

Next I copied the installation package (NI-VISA_Full_20.0.0.pkg) to this test dir:

cp /Volumes/NI-VISA\ 20.0.0/NI-VISA_Full_20.0.0.pkg ./test-nivisa

Unpacking (or expanding) the install package is really easy:

pkgutil --expand nivisai.mpkg/.packages/NI-VISA_Full_20.0.0.pkg ./unpack

Note that the unpack dir is created during expanding the package. So don’t create the dir upfront! If you do the command fails with:

pkgutil --expand NI-VISA_Full_20.0.0.pkg ./unpack
Error encountered while creating ./unpack. Error 17: File exists

In the test dir where the package is unpacked, a lot of other packages can be found.  One of these packages contains the library which I’m after. However all the packages contains a file called “Payload” which is a gzipped tar file.

To unpack this file for each package, the find command is our friend:

cd unpack
find ./ -name 'Payload' -exec tar xzvf {} \;

This will unpack every Payload file in your current directory. Since the “v” flag is enabled (verbose) this outputs a lot of text (files which are untarred) There is a chance this will overwrite files, but this is not something I’m worried about, as long as I can use the NI-VISA library.

This library is called “VISA”, so a second find command is needed:

find ./ -name 'VISA'

Which gives the result:

.//VISA.framework/Versions/A/VISA
.//VISA.framework/VISA

Once I had the library I tested this with Pyvisa. This can easily be done in a virtual environment (not since I already tested this, the package pyvisa is already installed):

python3 -m venv env
pip install pyvisa
Requirement already satisfied: pyvisa in /Users/edwin/.pyenv/versions/3.7.3/lib/python3.7/

python3
Python 3.7.3 (default, Dec 4 2019, 15:11:28)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvisa
>>> rm = pyvisa.ResourceManager('./VISA.framework/VISA')
>>> rm.list_resources()
('GPIB0::9::INSTR',)
>>>

As can be seen on the last line:

('GPIB0::9::INSTR',)

The NI-VISA library works just fine. The actual library lives in:

/Library/Frameworks/VISA.framework/VISA

So I created a file .pyvisarc in my home dir (notice the dot (.) in front of the file!

This files contains:

cat ~/.pyvisarc
[Paths]
VISA library: /Library/Frameworks/VISA.framework/VISA

So know when I use pyvisa-info (pyvisa-shell) it works as well. pyvisa-info gives:

pyvisa-info
Machine Details:
Platform ID: Darwin-18.7.0-x86_64-i386-64bit
Processor: i386

Python:
Implementation: CPython
Executable: /Users/edwin/.pyenv/versions/3.7.3/bin/python3.7
Version: 3.7.3
Compiler: Clang 10.0.1 (clang-1001.0.46.4)
Bits: 64bit
Build: Dec 4 2019 15:11:28 (#default)
Unicode: UCS4

PyVISA Version: 1.11.3

Backends:
ivi:
Version: 1.11.3 (bundled with PyVISA)
#1: /Library/Frameworks/VISA.framework/VISA:
found by: auto
bitness: 64
Vendor: National Instruments
Impl. Version: National Instruments
Spec. Version: National Instruments
py:
Version: 0.5.1
ASRL INSTR: Available via PySerial (3.4)
USB INSTR: Available via PyUSB (1.1.1). Backend: libusb1
USB RAW: Available via PyUSB (1.1.1). Backend: libusb1
TCPIP INSTR: Available
TCPIP SOCKET: Available
GPIB INSTR:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of funcionality.
No module named 'gpib'

So I really don’t know why it was not working the first time, and why it almost a day of pulling my hear out. There are two things I can think of:

I switch with my usb adater between a windows 10 VM maybe I didn’t release the adapter properly from Windows 10?

Or the adapter was not plugged in correctly ?

I tried switching from MacOS to my  Windows 10 VM multiple times, noticing it worked in Windows 10 perfectly, but not under MacOS.

Anyways, it works now. And hopefully the steps above might be useful to someone.

Comparison between Prologix and National Instruments USB GPIB controller

Introduction

Almost every electronics lab equipment has the possibility to be controlled remotely. This is almost always done by using IEEE-488. Also known as ” HP-IB” As HP called it when HP developed this 8 bit parallel bus.   It’s also know as “GPIB”. (General Purpose Interface Bus).

In the old days a dedicated computer card was used as a controller, to perform remote operations on the lab equipment.

Nowadays we have LXI for example, making it possible to remotely control devices over Ethernet network by using the TCP/IP protocol. This doesn’t mean GPIB isn’t used anymore. Even modern equipment can have a IEEE-488 interfaces. For example my Rigol DM3608 has a IEEE-488 interfaces and can be configured to understand a specific command set.

Use an IEEE488(GPIB) communication -adapter

Nowadays it’s more common to use USB GPIB controllers to remotely control the (old) lab equipment.  There are a couple of choices:

  • Use Prologix GPIB-USB
  • Use an IEEE488(GPIB) communication -adapter (Keithley or National Instruments for example)
  • These adapters may also be available as Ethernet controllers which plug into a LAN network.

However there are mainly two difference between the “brand names” and the Prologix:

For example the National Instruments (NI) USB controller present itself as a GPIB device. Whereas the Prologix presents itself as a serial device.

Which one to choose ?

If you look at the known brand names one, presenting them self as a gpib device, you notices these devices are not cheap. A new adapters can cost you as much as $1300,00 and no.. this is not a typo. While the Prologix adapter cost around $150,00 dollars.. So what’s the catch ? (there is always a catch).

And as always: It’s depends. Say for instance that you want to use an application from a vendor which only works with a GPIB device. The Prologix in this case won’t work. At least not out of the box.

On the other hand: If you’re about to write your own data log / measure applications, the Prologix might be a perfect solution, since  it’s a serial device, and you don’t have the overkill of using the NI-VISA drivers (for example)

Then there is of course the price. Luckily the GPIB USB adapters can be found relatively cheap second hand. I did found a genuine NI  GPIB USB-HS new in box for a around $150,00 dollar. Which brings these adapter in the price range of the Prologix one.

Comparing a Prologix and a NI GPIB USB-HS adapter

Since I have both types, let’s compare them in practice. To compare the adapters i’m going to use them in the following scenarios:

  • Using the adapters with a existing application from a vendor (Rohde Schwarz WINIQSIM) which is a Windows application
  • Use both adapters to write a own application, testing Windows 10 operating system and MacOS (10.14.6)

 

Prologix adapter

The Prologix USB adapter can be programmed by sending commands through a serial terminal. The GPIB address of the device can be set by sending:

++addr #

So for example to set the GPIB address to ‘8’:

++addr 8

There several commands, which allows to configure the adapter to one needs. Also it’s possible to update the firmware.  To talk to the adapter FTDI device drivers are needed, which are available for Windows, Linux and MacOS.

 

The national Instruments (NI) GPIB-USB HS adapter

The NI adapter needs NI-VISA drivers to be installed. These drivers are available for Windows, Linux and MacOS.As far that I know there is no firmware available for these adapters. There is a lot of information about how to install NI-VISA drivers etc. The only thing I needed to was to install the NI-VISA software, and plug in the adapter.

Using existing application WinIQSIM

The application WinIQSIM works perfectly with the NI USB-GPIB-HS. The application has the benefit of using a GPIB device, or serial. However I could not get a serial device to work with my Rohde Schwarz AMIQ. I either received a timeout, or a communication error. At the end I tried to use a null modem cable, but this gives me problems also.

The main problem when using the Prologx in the case is the speed setting. The applications “sweeps” the baud-rate setting. The Prologix however, doesn’t care about serial baud setting. So the WinIQSIM application gets confused, when trying to determine the baud settings. I tried several options, even disabling the “sweep”, however the application kept trying to find the highest speed it could communicate on.

It might be possible to implement a driver in NI-VISA, I didn’t test this however.

In this case: The NI USB adapter wins.

Writing my own application

In this test I’m going to test the python script which I wrote to remotely control my HP 8175A. In this case I’m going to use Python since this makes testing under MacOS and Windows 10 very easy.

I’m going to use two modules:

    • PyVisa
    • PySerial

On both systems I’m using virtual environments.

Test under MacOS

And this test ended very quickly.. I tried to use PyVisa under MacOS, and couldn’t get PyVisa to work. The library isn’t listing my GPIB device. I tried installing several versions of NI-VISA library. I even tried different version of NI-488.2 drivers.

>>> import pyvisa >>> rm = pyvisa.ResourceManager() >>> rm.list_resources() ('ASRL/dev/cu.Bluetooth-Incoming-Port::INSTR', 'ASRL/dev/cu.EEsiPhone-WirelessiAPv2::INSTR') >>>

Update: I finally got the NI-VISA driver working under MacOS. I just reinstalled the drivers, and when I give the path to the library (I tried that before, which didn’t work) it works:

>>> import pyvisa
>>> rm = pyvisa.ResourceManager('/Library/Frameworks/VISA.framework/VISA')
>>> rm.list_resources()
('GPIB0::8::INSTR', 'GPIB0::9::INSTR')
>>>

When I use the NI-VISA tools, the adapter is recognized without problems.

Test under Windows 10

So I moved to windows, installed NI-VISA library, and PyVisa and it worked instantly. No problems what so ever.

Next I tried pySerial on both platforms, and both worked just fine. Of course I needed to adapt the device name (under MacOS this is:

ser = serial.Serial('/dev/cu.usbserial-PX4UALP2')

Under Windows this is:

ser = serial.Serial('COM4')

The whole python script:

import serial

cmd = ['RST','DM0;DUR0,1s;IFM(CLOCK),,,1111','DM1;CFM(CLOCK);TSA0;CHD0,(CLOCK),0000,0001,0010,0011,0100,0101,0110,0111,1000,1001;TSA9;CHD0,(END)','PM0;CD;(PROG1);CR7;CE;(END)','OM;POD 1','CM 0;CYM 1','UP;SA','LO']

ser = serial.Serial('/dev/cu.usbserial-PX4UALP2')

for c in cmd:
   send_cmd = c+'\n'
   ser.write(send_cmd.encode())

ser.close()

Conclusion

When using software which requires a GPIB device, then the easiest option is to chose for a USB controller which present itself as such a device. With some patience these devices can be bought relativity cheap. It might be possible to develop a own NI-VISA (or alike) driver for a Prologix USB adapter. Since I’m no expert in this, I didn’t do any research.

When using a NI USB GPIB controller (or alike) this will work under Windows. Under other Operating systems this might be problematic. With a lot of searching, and trying it might result in a working solution.  I couldn’t get the pyvisa to work under macOS the first time, after lot of trying and finally a reinstall, I could get it to work.

In my case the Prologix as the NI GPIB HS works on both platforms.

So the big question is: which wins ? Well if I only had Windows running as my Operating System, I definitely would go for the NI USB GPIB HS adapter, despite of the overkill of the whole NI-VISA environment.

And now that the NI adapter also works under macOS, I prefer the NI adapter over the Prologix adapter. Once the NI-VISA library works, it’s very easy to interact with the device. If however the NI-VISA lib doesn’t work.. or you simply don’t want the overhead the Prologix adapter might be the way to go, while keeping in mind when using vendor supplied software which relies on GPIB controller, the Prologix might not work..

Another thing to consider when using an adapter which relies on drivers like NI-VISA is when transferring software to other systems. For example when you write this awesome script in python for a specific device. When uploading this script to GitHub for others to use it, they need to install the (external) library. Which may be undesirable. In my case this is not really a concern.

However since I got both adapters.. I have the best of both worlds 🙂

Using a VFD IV-3A tube to build a simple counter – Part four

Introduction

In part three the rest of the counter is build, and the circuit is almost complete. The part which is missing, is the thing that makes it count. We  could simply add a 4 bits binary counter, but why not simulate a counter ?

The HP8175A

To simulate a simple 4 bits counter, I’m going to use my HP8175A. It’s big, it’s heavy, makes a lot of noise and eats a gazillion electrons per microseconds, and spits them out as heat. So what is not to love about this machine?

The interface of the HP8175A may take some time to get used at, but I loved it from the start. However to make it more interesting the HP8175A is programmed completely by IEEE-488. or GP-IB or a HP-IB  If you own a HP8175A and don’t have the possibility to remote control the machine, then study the user manual. It’s really not that difficult to program the HP8175A through the keyboard and knobs.

I used a National Instrument USB GPIB HS adapter to remote control the HP.

Remote control the HP8175A

To program the HP8175A a couple of steps must be taken. The HP8175A has so called “Module pages”. We need to:

    1. Setup on the Data Module the format: by setting up the POD and the duration.
    2. Setup on the Data Page the labels and bits which makes up the program
    3. Setup on the Program Page the program, the start end end labels, as well the times to run the program
    4. Setup the Clock page,
    5. And finally update all the settings and start the program

The IEEE-488 commands for the HP8175A is a bit cryptic, but this is the whole program:

RST
DM0;DUR0,1s;IFM(CLOCK),,,1111
DM1;CFM(CLOCK);TSA0;CHD0,(CLOCK),0000,0001,0010,0011,0100,0101,0110,0111,1000,1001;TSA9;CHD0,(END)
PM0;CD;(PROG1);CR7;CE;(END)
OM;POD 1
CM 0;CYM 1
UP;SA
LO

Explanation of the program

The commands and parameters are separated by a ‘;’. So for example the second line contains 3 commands: DM0 and DUR0 and IFM (Data Module, Duration Fixed, and Insert ForMat label)

    1. Reset HP8175A to defaults
    2. Go to page: Data Module FORMAT and set DUration to fixed 1 second and Insert ForMat label CLOCK and enable the first 4 POD lines (bits) of POD0
    3. Go to DATA page module and ChangeForMat label to CLOCK and Set
    4. ToStartAdress; CHangeData 0, CLOCK end set bits up to address 9 and change label to END ()
    5. Go to Program Module page and set the label PROG1, Move Cursor Right 7  positions, clear the field and change field so it contains the END label
    6.  Go to Output Module page and set all PODS enable
    7.  Goto Clock Module page and Set Clock to Auto Cycle
    8.  Update and start
    9.  Return to local (stop remote control, and enable front panel)

Line 3 might require some explanation:

DM1;CFM(CLOCK);TSA0;CHD0,(CLOCK),0000,0001,0010,0011,0100,0101,0110,0111,1000,1001;TSA9;CHD0,(END)

The part:

 TSA0;CHD0,(CLOCK),0000,0001,0010,0011,0100,0101,0110,0111,1000,1001

is quite clever. The engineers at the time by HP really know how to implement this kind of stuff. The command TSA needs a start address, which is the 0. Next command changes the format label to “CLOCK”. And then comes the clever part.

Since we enabled only for outputs on POD 0, we can have 4 bits on each address line. So by placing the 4 bits separated by comma’s, each bit pattern is placed on a address line. And therefore, this command places each 4 bits starting from address 0000 to 1001 (0 – 9).

So it works like:

                 4bits  4bits                                4bits
Set start addr   addr 0 addr 1                               addr 9
/|\               /|\   /|\                                   /|\
 |                 |     |                                     | 
TSA0;CHD0,(CLOCK),0000,0001,0010,0011,0100,0101,0110,0111,1000,1001

DECIMAL              0,   1,   2,   3,   4,   5,   6,   7,   8,   9

Let’s see the HP8175A in action

After sending the commands, the HP8175A is acting like a 4 bit binary counter:

Once I know the program is working I wrote a little pyton script using pyvisa:

import pyvisa
import time

# Small programm to remote control a HP8175A
# Using PyVisa with a NI USB GPIB-HS+

# Setup the resource manager
rm = pyvisa.ResourceManager()

#print(rm.list_resources())
# Open HP8175A
hp8175a = rm.open_resource('GPIB0::8::INSTR')

# Identify yourself!
print(hp8175a.query('IDN?'))
print(hp8175a.write('RST'))
time.sleep(5)

print(hp8175a.write('RST'))
print(hp8175a.write('DM0;DUR0,1s;IFM(CLOCK),,,1111'))
print(hp8175a.write('DM1;CFM(CLOCK);TSA0;CHD0,(CLOCK),0000,0001,0010,0011,0100,0101,0110,0111,1000,1001;TSA9;CHD0,(END)'))
print(hp8175a.write('PM0;CD;(PROG1);CR7;CE;(END)'))
print(hp8175a.write('OM;POD 1'))
print(hp8175a.write('CM 0;CYM 1'))
print(hp8175a.write('UP;SA'))
print(hp8175a.write('LO'))

Connecting a Rohde Schwarz AMIQ to a SMIQ04

Connecting a Rohde Schwarz AMIQ to a SMIQ04

The first article explains how to setup an R&S AMIQ and talk to it, and to get signals out of the I and Q outputs. In this article the AMIQ is connected to a SMIQ04. In this setup the AMIQ provides the IQ modulation, and the SMIQ is providing modulated signal on its RF output.

Prerequisites

To be able to use the SMIQ and AMIQ together, a vector modulator (IQMOD variant 4 or higher (var. 8) must be installed in the SMIQ.

Connecting the R&S AMIQ to R&S SMIQ

There are a couple of options on how to connect and control the R&S AMIQ. It’s possible to control the AMIQ from the SMIQ. Or control the AMIQ by a PC.In this setup I’m connecting the R&S SMIQ and R&S AMIQ together by the use of an IEEE-488 cable, so GPIB can be used to control the instruments.

One think to keep in mind is that when using the SMIQ to control the AMIQ, the SMIQ is acting as a controller. And there can only be one controller active on the bus at the same time.

The output “I” and”Q” of the R&S AMIQ must be connected to the “I” and “Q” inputs on tthe R&S SMIQ.

Generating signals

When using the SMIQ as a controller, the signals of the AMIQ can be used as follows:

In the menu Utilities/Install the option AMIQ control must be enabled. After enabling the SMIQ must be rebooted.

After reboot an extra menu option: IMQ CTRL is visible. In this menu the following options must be selected and set:

    • Start by setting carrier frequncy
    • Set the level of the output signal (for example 0 dBm)
    • Select the option: SELECT WAVEFORM
    • Next select: Drive and choose C:
    • Pick a waveform, or change to directory to select a waveform
    • Press return and select menu Mode.
    • In the Mode menu select AUTO
    • Press Return key, and select menu option Level
    • In the Level menu set the I and Q outputs to 0.5V/50 Ohm
    • Press return key, and go to Vector mod, and set state to “On”

The modulated signal should now be present on the RF output.

To demonstrate a modulated signal which is generated by the AMIQ I use a directional coupler.

 

 

I connected the directional couple’s input port the the RF output port of the SMIQ. The output port of the directional coupler is connected to a Tektronix 2225 scope. The CPL port is connected to a HP8591A.

Note that I connected the NOT I port, so I could create a interesting signal, which is a challenge to trigger on the Tek 2225.

 

Getting an Rohde Schwarz AMIQ up and running

Introduction

The Rohden Schwarz AMIQ is an IQ modulation generator. According to the documentation of Rohden Schwarz this device has:

 

 

    • 100 MHz sample rate
    • 16 M Samples memory depth
    • IF generation up to 25 MHz
    • Multiple carrier simulation

And the best part is.. these devices can be picked up for little money.  Even if one is not into IQ modulation and such, the device is able to put out some very nice looking sine waves. There is a catch however. (There is always a catch): The AMIQ can only be controlled remotely.

What to look for when buying an AMIQ

When buying an AMIQ, look at the options the unit has. The user manual which can be found online, list all the available hard-, and software options.

Secondly, the AMIQ has a built in hard disk. If this drive is damaged, you could be out of luck. I searched online, but could not find any firmware images. If you bought an AMIQ, then make a image of the internal hard disk.  The AMIQ boots OpenDos.

There is an easy way to determine if the AMIQ is in a working condition. And that is to listen to the beeps at startup. The device will give one beep when turned on, and a few moments later, a second beep is produced. It’s the AMIQ’s way of letting you know it’s past it’s error checking thing. This second beep,should be followed by a steady green LED on the front panel.

If none of the above is happening, the AMIQ is having a fault, or the AMIQ didn’t start in a sane state. There seems to be a service manual for the AMIQ, where you can troubleshoot. Unfortunately I could not find the service manual online.

So when buying an AMIQ, let the seller boot up the AMIQ, and let the seller describe to you the boot process.

Once you got physical access to the AMIQ, you could run the the command:

*TST?

This should return a 0 when no errors are found, or a 1 if a error is found. The user manual describes in detail how to hardware test the AMIQ. Also note that the above command doesn’t test the RAM memory.

The third thing you may be aware of, are the different models:

    • AMIQ02
    • AMIQ03
    • AMIQ04

I never encounter the AMIQ01, however the AMIQ03 and 04 are the newer models, with more memory, sample rates etc. The main difference between the AMIQ03 and 04 is greater memory: The 04 has up to 16 000 000 IQ values, compared to the 03: 4 000 000 I/Q values)

Only the models 03 and 04 can have the option “AMIQ-B3” fitted. So if you see an AMIQ listed with the option “AMIQ-B3” you know it has to be a 03 or 04 model.

Controlling the AMIQ

To let the AMIQ do something useful, like spitting out signals, the AMIQ needs remote control. And for this remote controlling there are several options:

    • Through serial connection
    • Through IEEE-488 (GP-IB or also called HP-IB)
    • Use an Rohde Schwarz SMIQ
    • Use software like WinIQSim (version 1.x)

Luckily I got all the options…

Talking to the AMIQ

The easiest way of getting the AMIQ up and running is to connect a null modem cable to the RS232 port. If someone has changed the default serial parameters (9600,8n1) an formatted floppy disk (MSDOS) is needed with the file: AUTOEXEC.IEC with the following line:

:SYST:COMM:SER:BAUD 9600

Insert the floppy disk into the AMIQ, turn the AMIQ off, and on again. Once the AMIQ is fully booted, the serial console should be accessible.

When you have the luxury of having IEEE-488 or you could reset the the default address 6 with similar procedure, the line in the AUTOEXEC.IEC must be:

:SYST:COMM:GPIB:ADDR 6

Once a working connection is established to the AMIQ, the following command should give you the directories on the hard drive C:

:MMEM:DIR?

To load an waveform, and put out the signals on the I and Q outputs, give the following commands:

*RST;*CLS;*WAI
:MMEM:CD 'C:\'
:MMEM:LOAD RAM, 'GSM_TSC1.WV,TRAC'
:TRIG:MODE CONT
:OUTPUT:I FIX
:OUTPUT:Q FIX

The commands on the first line resets the device. Next the directory is changed to the C: drive. On the third line a waveform called: “GSM_TSC1.WV” is loaded into RAM memory. By setting the trigger to continuous on the next line, the waveform is send to the outputs, which are enabled on the last two lines.

This produces the following signal:

In the next article I’m going to hook up the AMIQ to the Rohde and Schwarz SMIQ04 and generate some signals.

Having fun with a R&S SMT03 and HP8591A Spectrum Analyzer

Playing around with the R&S SMT03 and an HP8591A Spectrum Analyzer

Now that I fixed the R&S SMT03 I find finally time to play around with the SMT03. The idea is to learn more about modulation, and how to display this on a Spectrum Analyzer. In a previous article I used the Siglent SSA 3021X Spectrum Analyzer in this article I’m going to use a HP 8591A Spectrum Analyzer.

Preparing the R&S SMT03

First off I need to setup the R&S SMT03

I’m going to use a carrier signal of 100Khz, and AM dept of 27%. And since the SMT03 have a second LF Generator I use that one to generate a sinus wave of 1.000 Khz. To protect the input of the HP SA I set the amplitude to 0 dBm.

Setting up the HP8591A Spectrum Analyzer

After setting up the R&S SMT03 it’s time to configure the HP8591A

After setting the center frequency the SPAN is set to 20 Mhz. To see the AM modulation, a smaller SPAN is needed. After the SPAN is set to 1.5Mhz the AM modulation becomes visible:

This shows the AM modulation. I really like the HP 8591A SA, it has a easy to use interface. And having a R&S SMT03 and the HP8591A in my lab is really awesome.

Use a spectrum analyzer to find interfering signals

Understanding the difference between Oscilloscope and Spectrum Analyzer

Before diving into the use of a Spectrum Analyzer (SA), a short explanation between an Oscilloscope and a SA might be handy. If you used a SA before, this article might not be to any interest to you, since this article covers a basic understanding.

For those who a curious to what a SA is, hang around, since this article is about to demonstrate the difference between a  Oscilloscope ans a SA.

When starting with electronics, sooner or later you might find yourself wanting an Oscilloscope to look at (fast) changing electronic signals. In other words: An scope is a multi functional tool in a electronics lab, and every good electronics labs should have one. With a scope it’s possible to look at electronic signal, being it digital signal or analogue signal which changes over time. But a scope can also be used to measure voltages, and all other characteristics of a signal. For example, the fall and rise time of edges, period of a signal, the max and min voltages, and perform math functions on signals.

Using a Oscilloscope to look at a signal

Most often a scope is used to look at a signal, and see how it looks like. For example a sinus signal:

Looking at the signal we can tell that the signal is 50mV (Peek to Peek), and that the frequency of the signal is 100Khz. Looking at the signal closer, it’s not a sharp clean sinus signal. So what’s wrong ?

If we zoom into the signal to have a closer look, the signal looks like:

This is doesn’t look like a clean signal. At this point several things may be the cause:

      1. Is there something which interferes with the signal?
      2. Is the measurement done properly (aka signal integrity)

This is the point, where it’s very difficult, to use a scope to investigate this further. Just let’s assume that this is no measurement fault. Short ground leads are used, and the probes are calibrated.

That leaves us with a interfering signal of some kind.

      • How to determine what kind of signal this is?
      • What is the frequency of this interfering signal ?

At this point some want’s to use a feature which is called “FFT” which some  scope might have.  FFT stands for: Fast Fourier Transform spectrum analyser  When using this feature the scope is behaving like a SA.

Having a FFT feature on a scope might be handy, in my case the FFT feature on my Rigol Ds1054Z is not very helpful:

It shows that there seems to be an extra signal, but it’s not possible to get any detail on this signal. To get more detail, a real Spectrum Analyzer is needed.

What is a Spectrum Analyzer (SA)

A Spectrum Analyzer might at first glance be some kind of a scope. It has a display to show signals, and has a lot of buttons, like a scope.

However the main difference between a scope and SA is that:

      • A scope shows signals in the time domain
      • A SA shows signals in the frequency domain

This means that a SA show on the horizontal the frequency, and on the vertical the power of the signal, which is shown in  a Logarithmic scale. This can be for example in dB or dBm. The reason for displaying the power (on a scope you would say the amplitude) of the signal in a Logarithmic scale  is that low power signal can be displayed next to high power signals.

And since a SA displays signals in the frequency domain, it’s possible to see how “pure” or “clean” a signal is, since we can actually look at the “spectrum” of the signal. Hence why it’s called a “Spectrum Analyzer”.

Using a Spectrum Analyzer to look at a signal

Let us look at the same signal which we looked at on the scope, but now feed into a Spectrum Analyzer:

Here is the same signal, but it looks quite different from the signal which is shown on the scope. However it’s frequency is 100Khz, and the power of the signal is -46.00 dBbm. Which is about 3.169 mVpp (There is some loss in the cables, and adapters used).

Looking at the signal it’s seems “not clean”, But it’s hard to see. So like on a scope, it’s possible to zoom into the signal, and get more detail. To this we need to set a smaller SPAN. The SPAN on a SA is the bandwidth were we are looking at it. It’s like the zoom-lens on a camera, by zooming in, more details are visible. Currently the SPAN width is 20.000Khz.

If we change the SPAN width to let’s say 1.000Khz, we see the following:

And suddenly a second signal appeared. To get more details about this signal, the SA provides a easy way, and that’s by placing a marker. In this case a delta marker is used. A delta marker can show the difference (delta) between signals.

And then we see that the interfering signal is a 100Hz away from our original signal of 1oo.ooo Khz signal.  So the interfering signal is 100.1 Khz.

Conclusion

And this shows the difference between a scope and a SA. An SA is a very handy tool when looking at the spectrum of a signal. It’s how every a more complex, and sometimes more confusing tool to use. On the other hand, a scope is also a complex tool to use. But in general, a scope is much more used for looking at signal then a SA. A SA is mostly used when dealing with RF, radio’s transmitters and alike.

Repairing a Tektronix PB200 Bert tester – part one

Repairing a Tektronix PB200 Bert tester

The Tektronix PB200 BERT

Before diving into repairing the Tektronix PB200 BERT tester, let me explain briefly what a BERT Tester is. BERT stands for ” bit error rate test ” In the most simple form, a BERT tester sends out a random bit patron, and an analyzer receives the bit pattern and compares this bit pattern to see if there is any bit error.

Obviously this is more complicated, how does the analyzer now what the original bit stream was ? The theory behind it this is quite complex, and beyond the scope of this article. For a more in depth explanation see [this] Wikipedia article.

A device like the Tektronix PB200 is used to test different data transmission devices, like optical interfaces, or a like.

The Tektronix PB200 has a data generator and an analyzer built into one device. The specs for this device:

GENERATOR
     Clock Frequency: DC to 200 MHz.
      Amplitude: 0.5 to 5.0 V p-p.
      Termination select: 50 Ohm to -2 V, +3 V, AC or GND.
     Input range: ECL, TTL, PECL compatible.
     Threshold resolution: 10 mV step.
    Internal synthesized clock source: Frequency: 1 Hz to 200 MHz.
    Resolution: 1 Hz.
    Accuracy: 10 ppm.
    BURST clock:
    Programmable gap: 16 Kbits
    maximum, 8-Bit resolution.
Pattern Generator
    PRBS: 2 N- 1, N = 31, 23, 15, 11, 10, 9, 7.
    Programmable word: 256 Kbits maximum, 8-Bit resolution.
    Mark density: PRBS 2 10 1 (1/8, 1/4, 1/2, 3/4, 7/8).
    Mixed mode frame: 256 Kbits maximum, 8-Bit resolution.
    Error injection: Error: Single, Rate, External (TTL).
    Field select: Overhead, payload or both.
    Error rates: Error rate of 10-n, n = 3, 4, 5, 6, 7.
    Outputs: Data and clock outputs:
    Format: NRZ.
    Configurations: Differential (True/Complement).
    Source impedance: 50 Ohm.
    Amplitude: 0.5 V to 2.0 V, 10 mV step.

A Tektronix PB200 which is dead

Before I can play around with this PB200, the device needs a  repair. I bought this device as a “none working, for parts”. And well.. it sure is in a “none working” condition, since the device doesn’t power on, at all.

That is one of the reasons I bought this device. When a device is not able to power on, this normally means the Power Supply (PSU) has a problem. The downside of this is of course that their is no easy way to test the rest of the functionality of the device.

Assessment of the problem

Once the devices arrived at my doorstep, I could inspect it further. And I noticed a sharp bent in the front panel once I removed the covers.  Not a good sign to start with. The second thing I ran into is that this device is a complete nightmare to take apart. The construction is just horrible. Screws on places which are heard to reach. I suspect this is just a branded by Tektronix. I got my hands on some Tektronix equipment, and repaired some, and the construction is always good engineered. In this case, it’s definitely not.

So it took a lot of effort to get the PSU out of the chassis. Once the PSU was out I noticed a burned up diode, and a burned spot on the PCB. A quick check of the fuse confirmed: This PSU had a very bad moment. This means that on the primary side of the PSU a lot of other components could be damaged. So the first thing I did was to hunt for a Service Manual, and well these cannot be found.

So I started to de-solder the diode, so I could get a marking of the component. The diode was next to some transistors, or MOSFETs so I decided to desolder them as well, since they are most likely also damaged , or are the cause of the damage.

While taking the diode out carefully, I could not prevent it from falling apart.

 

The diode literally exploded and split into halve. With a lot of trouble I managed to get some marking, but I wanted to make sure that I got it right. Primary side of a PSU always makes me nervous. So I started a [thread] on the EEVblog forum.

Another member also suggested to get a PSU replacement, which is almost the same. The only difference is the output voltage.

So I decided to buy this PSU, so I have a reference, and if I’m unable to repair the primary side of the PSU I could perhaps convert the secondary side so it gives the right voltages.

In part [two] I’m trying to fix the PSU

Repairing a Tektronix BP200 BERT tester – part two

An attempt to fix the primary side of the PSU

I started  to measure and test several components, and found some diodes which where shorted. Replaced them. However I could not measure any voltages after the full bridge rectifier. Some components are mounted on large heat-sinks. Removing them to get access to the components and be able to read the markings or to test them out of circuit, would be a pain.

Fighting with this power supply for a couple of evenings, I decided to take another route. In the meantime the alternative PSU was delivered. After comparing both the PSU’s together I noticed that only one voltage rails was different.

Modifying an PSU

Since fixing the primary side of the PSU would be very difficult to do, I started to look at the secondary side. Both the PSU’s are from the same series. So I figured the manufacturer probably used a couple of zener diodes, and resistors to control the output voltage. So I started to swap out diodes and resistors which where different and which I could relate to the voltage rail I wanted to adjust.

The moment of truth

I powered to PSU up, and measured all the good voltages (they where a little higher, but that’s okey since no load is attached.). I decided to go for it, and placed the PSU on top of the chassis, so I could test the PSU without going through the rather complex method of installing the PSU.

And after connecting the main power, and flipping the power switch, the PB200 came back to live.

 

 

A few quick tests showed me that the generator and analyzer are working without any problems. And I refitted the PSU back into the PB200.