Wednesday, March 30, 2011

Ground Loops and Other Spurious Coupling Mechanisms and How to Prevent Them Part 1

This is a two part blog post is based off a great tutorial I read titled “Tutorial on Ground Loops” by P. M. Bellan. A link to the tutorial can be found at the end of the post. The subject of the two part post is something you won’t find in textbooks from your EE courses, spurious coupling mechanisms in circuits and test systems and how to prevent them. A spurious coupling mechanism is any outside unwanted voltage or current source entering a signal path. There are five main spurious coupling mechanisms: direct conduction, capacitive coupling, inductive coupling, radiated electromagnetic field pickup, and ground loops. This first post will focus on the first four types of spurious coupling and the second will focus strictly on ground loops.

Direct Conduction:
Direct conduction is caused when an unwanted conductive path is created between a circuit or signal path of interest and a neighboring signal path. This type of spurious coupling is shown in the figure below. The arrows in red represent the current from a neighboring signal entering the circuit of interest through an unwanted conductive path. The cause of this could be an un-insulated crossed wire, a shorted PCB run, sloppy solder job, or a malfunctioning switch in a test system. The only way to prevent it is to identify the low resistance path and correct it.
Used by permission from P. M. Bellan

Capacitive Coupling:
Capacitive coupling, also known as stray capacitance, occurs due to the capacitance that exists between two otherwise isolated adjacent signal paths (see figure below). The current coupled from one signal path onto the other signal path can be represented by I = C * dv / dt. Where “I” is the unwanted current coupled into the signal path, “C” is the stray capacitance that exists between the adjacent signal paths, and “dv/dt” is the rate of change in voltage on the adjacent signal path. The closer the signal paths are together the higher the value of “C” is and therefore the higher the “I” value in the adjacent signal path. Also the larger the rate of change of the voltage (dv/dt) the higher the coupled “I” value in the adjacent signal path. Higher signal frequencies mean higher dv/dt. High impedance signal paths are especially vulnerable to this type of spurious coupling because they are low current already so any added current can have a big effect. In test systems capacitive coupling affects can be seen when using low frequency switch cards close or over their upper frequency limits. The same is true when using dense interface and bus connection types in test systems at their upper frequency limits. In these types of cases the capacitive coupling is often referred to as crosstalk. This capacitive coupling can be reduced by using shielded cable and connectors, larger spacing on PCB runs, and higher frequency rated switching products in your signal paths.
Used by permission from P. M. Bellan

Inductive Coupling:
Whenever current flows through a conductor it creates circular lines of magnetic flux (remember the Right Hand Rule). Any signal path adjacent to a current carrying signal path will have magnetic lines of flux coupled onto it creating a current flow in the signal path equivalent to the amount of linked flux lines that are in contact with it. This same principal is how transformers work. One way to reduce inductive coupling affects is to space out adjacent signal paths because the more space between the signal paths the weaker any linked magnetic flux lines will be. More practical ways include using twisted pair wiring or shielded cable. Twisted pair wiring essentially cancels out magnetic lines of flux by creating an alternating pattern where the magnetic flux lines oppose each other. Twisted pair wiring can be purchased or you can make it yourself. To make twisted pair take two wires of the same length. Secure one end of each wire in a vise and place the other ends inside a drill where the drill bit goes. Stretch the wires out, fire off the drill, and you have twisted pair. Shielded cable has a conductor as its outer shell which catches any flux lines created by the internal conductor essentially blocking them from coupling on adjacent signal paths.

Radiated Electromagnetic Field Pickup:
In today’s wireless world we are surrounded by transmitters. On top of that devices, such as electric motors, can act like transmitter even though that was not their design intention. These intentional and non-intentional transmitters fill every part of our environment with electromagnetic waves. Radiated electromagnetic field pickup is when your circuit or signal path acts like an antenna and picks up radiated electromagnetic waves. To get a first hand example of this kind of spurious coupling, place your mobile phone close to a stereo speaker (make sure the speaker is on). From there send a text message or some other data transmission and you will hear interference on the speaker created by the transmitted packets coming from the phone. The amount and frequency range of electromagnetic waves a circuit or signal path picks up depends on its length compared to the electromagnetic wave lengths in the area. For instance if your circuit or signal path is close to a transmitter that is operating at frequencies whose wavelengths are the same length, twice the length, or four times the length of your circuit or signal path the pickup will be much stronger. To reduce radiated electromagnetic field pickup use shielded cabling and conductive casing around any exposed signal paths. The idea is you want to create a Faraday Cage around your signal paths.

Stay tuned for part 2 next week

Wednesday, March 23, 2011

Creating Arbitrary Waveform Sequences on the 33521A and 33522A

This blog post explains and demonstrates how to create an arbitrary waveform sequence with Agilent's 33522A or 33521A function arbitrary waveform generators. Waveform sequencing is the ability to seamlessly transition (no discontinuities in the output) from one waveform in memory to another waveform somewhere else in memory. Waveform sequencing allows you to create complex easily reconfigurable waveforms by pasting together other simpler waveforms in memory. It is analogous to creating a custom playlist on your MP3 player. Some example sequencing applications include generating serial protocols, simulating the output of environmental sensors over a wide range of conditions, or simulating a biomedical signal such as an ECG signal over a wide range of conditions.
Currently there are two ways to create a arb waveform sequence: using SCPI commands or editing an existing sequence file (.seq file). I will cover both methods in this post. The example sequence we will create consists of three built-in arb waveforms so if you own a 33521A or a 33522A you have these waveforms on your instrument. The three waveforms used are: Negative Ramp, Lorentz, and Sinc. Lets start with the SCPI example. In the following SCPI example, all text preceded by "//" are comments explaining the command and are not part of the command (commands in blue). You can send these commands to the 3352xA either by putting them in your software code, using Agilent Connection Expert interactive IO feature, or using the interactive IO feature on the 3352xA's web interface.
The first four commands reset the 3352xA to a known condition and load an instance each waveform used in the sequence from  non-volatile memory to volatile waveform memory:

*RST //reset the 33522A or 33521A to known state
MMEM:LOAD:DATA "INT:\BUILTIN\NEG_RAMP.arb" //load negative ramp
The following command creates our three waveform sequence. The "DATA:SEQ" part tells the 3352xA that this is a sequence command. The numbers "#3152" tell the 3352xA how long, in ASCII characters, the body of the sequence command is. In our example the "3" tells how long the character count number is ("1", "5", and "2" are three digits). The 152 tells the 3352xA that there are 152 characters in the body of the sequence command. "TESTseq" is the name of the sequence.

DATA:SEQ #3152TESTseq,"INT:\BUILTIN\NEG_RAMP.arb",0,once,lowAtStart,10,"INT:\BUILTIN\LORENTZ.arb",3,repeat,highAtStart,10,"INT:\BUILTIN\SINC.arb",0,once,lowAtStart,10

Lets look at the Lorentz waveform definition in the sequence: "INT:\BUILTIN\LORENTZ.arb",3,repeat,highAtStart,10,
The part in quotes gives the location and name of the waveform being used in the sequence. The "3" tells the 3352xA to play this waveform for 3 cycles. The "repeat" option tells the 33522A that we want to play this waveform more than one time. Notice the other two waveform definitions use the option "once" to play just a single cycle of the waveform. The "highAtStart" option tells the sync output to go high at the start of this waveform. The "10" tells the 3352xA at what point in the waveform to change the sync output (must be at least 4). Refer to the 3352xA Programming Reference guide for a complete list of the settings for defining a sequence. Okay now lets continue on with the rest of the commands we need to output our new sequence:

FUNC ARB  //put the 3352xA into arb waveform mode
FUNC:ARB TEXTseq  //load our sequence into channel 1
SOUR1:FUNC:ARB:SRAT 130e6  //sample rate to 130 MS/s
VOLT 1 VPP  //set the amplitude
OUTP1 ON  //turn on the channel 1 output

Now your 3352xA should be outputting the TESTseq we just created. We still have one more step to go. The sequence is only in volatile memory so if you shut off or reset the 3352xA the sequence will be erased. The following command stores the sequence in internal non-volatile memory. 


Below is a scope screen shot of the sequence we just created. The waveform in green is the sync output of the 3352xA. Notice the Lorentz waveform is played three times and the sync output goes high at the start (point 10) of the Lorentz waveform.

A second way to create a sequence is to modify an existing sequence (.seq file) to create a new one. Whenever you create a new sequence via SCPI commands and store it in non-volatile memory it is stored as a .seq file. To modify it to create a new sequence copy the .seq file from the 3352xA to a USB memory stick.  Transfer it to a computer and open it with a text file editor like Windows Notepad. The .seq file that we just created is below:

File Format:1.10
Sample Rate:130000000.000000
High Level:0.500000
Low Level:-0.500000
Header:Arb Name, Repeat Count, Play Control, Marker Mode, Marker Point

Ignore the first line "File Format: 1.10." The next four lines are the amplitude, sample rate, and filter setting for the sequence. This can all be modified if you wanted to change the settings of the sequence. The next line is the header for the waveforms and settings in the sequence. Notice the waveforms and settings are defined the same way they were in the SCPI example. You can modify the waveform names, settings, or add another waveform to create a whole new sequence. You could also copy and paste the sequence text above into a .txt file, modify it, and save it as a .seq file to create a new sequence without any SCPI commands. Whatever you name the .seq file will be the name of the sequence. From there just copy it from the USB memory stick to the 3352xA internal memory and you have a new sequence.

Tuesday, March 15, 2011

How To Control Your Instrument In Labview Without A Driver

In this post I am featuring a video a colleague of mine made showing how to control an instrument with LabVIEW using standard commands for programmable instrumentation (SCPI) directly. The SCPI is sent to the instrument via the virtual instrument software architecture (VISA), which is a I/O API for instruments. Why would you want to do this? This is what you would have to do if you wanted to control an instrument with LabView but the instrument does not have a LabView driver. Another advantage to programming with direct SCPI is it allows you to access all of the instruments low level more technical features that may be hidden from you in the driver. Enjoy!

Tuesday, March 8, 2011

Calculating Your Test Equipment's "Total Cost of Ownership"

This blog post provides a summary of an awesome paper I just read entitled The Real "Total Cost of Ownership" of Your Equipment by Duane Lowenstein and Bill Lycette (refer to the link at the end to read the paper). We will discuss how to calculate the total cost of your test equipment over time using the Total Cost of Ownership (TCO) model. The TCO is the total cost to own and operate a piece of equipment over its useful life. The TCO model presented in the paper structures operating expenses in the following manner:
  1. Initial Equipment Cost -- Ca 
  2. Preventive Maintenance – Cpm
  3.  Repair – Cr
  4. Downtime Mitigation – Cdm
  5. Technology Refresh – Ctr
  6. Training & Education – Cte
  7. Resale value or disposal cost – Crv
  8. Facilities – Cf
  9. Other – Co
The Total Cost of Ownership equation is given by
TCO = Ca + Cpm + Cr + Cdm + Ctr + Cte + Crv + Cf + C

1.) Ca: Price you payed for the test equipment.
2.) Cpm: The major portion of this cost is calibration. Two pieces of test equipment X and Y have a similar price tag but if X has an 18 month cal cycle and Y has a 3 year cal cycle then chances are Y will have a much lower cost over time. Also cal turn around time must be considered because until it is cal'd you can not use it. In my youth I did calibration and I can tell you from personnel experience that cal technicians remember model numbers that typically pass cal (referred to as cherries) and model numbers that typically fail cal (I am not going to say what they were referred to as). Cherries spend a lot less time on the "awaiting cal" shelf compared to model numbers that are known to fail and often need work.
3.) Cr: I will quote this part from the paper "Repairs, sometimes also called as corrective maintenance actions, generally refer to unplanned downing events such as equipment failure. For the purposes of this TCO model, corrective maintenance costs are represented by the cost to perform the repair, re-calibrate after the repair, remove/ship/re-install (logistics), and verify performance of the equipment. The cost to perform the repair can be represented by either a contracted repair agreement or, if the owner wishes, to “self-insure” on a Per Incident (P.I.) basis. Annual P.I. repair expenses are modeled as the expected annual value calculated by multiplying the P.I. cost times the probability of failure occurring over a one year period. While at first glance it may appear that a P.I. strategy is the lower cost option, one must also consider that a repair contract usually results in a lower repair TAT and therefore lower downtime."
4.) Cdm: I will quote this part from the paper "A downtime cost penalty must be applied to recognize the fact that the equipment was unavailable for use by the owner. This is accomplished by applying a cost driver variable, such as a weekly rental rate proxy, to the cost equation such that: Cost of Unavailability = (purchase price) x (rental rate proxy) x (repair TAT)"
5.) Ctr: This is sometimes referred to as product migration. It cover the need to update a piece of test equipment due to a need for increased measurement capabilities or measurement speed. It can get costly in test system when you consider code compatibility. These are one-time expenses that should be amortized over the test equipment that gets the refresh.
6.) Cte: Cost of any training required to operate, calibrate (if using in house lab), learn software, or write software for the test equipment.
7.) Crv: This is what the equipment is worth after you are done with it, could be positive or negative value. Of course higher quality test equipment with high reliability is going to fetch a higher price on the used market.
8.) Cf: Costs like electricity to power equipment, air conditioning to cool equipment, and space to house equipment.
9.) Co: This may include things like cables, connectors, or tools. It could also be used to catch any costs that may be specific to your exact testing needs.

The following is an example using the TCO model that clearly shows why the initial purchase price should not be the only factor considered when calculating the cost of a piece of test equipment. The example is quoted from the paper:
Product A is a higher cost test solution. At a price tag of $100,000, it offers higher measurement speed, longer cal intervals, superior reliability and better code compatibility. Because of its superior reliability, the user of Product A is comfortable holding less test capacity in reserve to guard against unplanned downing events such as equipment failure (captured as Downtime Mitigation in the table below). Supplier of Product A also provides on-site repair, a service that supplier of Product B cannot offer. The on-site service contract commands a price premium, however repair TAT is substantially reduced as compared with a return-to depot contract. Product B cannot match many of these ownership factors, however the purchase price for the product is 25% less. Industry views Product A as having higher intrinsic value and this is borne out by a higher resale value on the open market. Table I shows the summary of key differences in ownership factors.

The test equipment is operated 96 hours per week in a manufacturing environment. Useful life of the equipment is eight years and the depreciation method is five year straight line. A downtime cost penalty (4% of purchase price per week) is assigned to reflect the cost of the equipment being unavailable during repair, calibration or other preventive maintenance actions. Cost of test software development to ensure code compatibility is amortized across an installed base of 20 test systems. A TCO analysis is performed and the lifetime cost to own and operate Product A is $137,000 compared with a lifetime cost of $160,000 for Product B. 
Another thing to consider is Product A is also faster so you can test the same amount of DUTs in less time compared to product B. This leads to a lower cost of test per DUT which directly impacts (in a good way) profit return per unit sold. For more details on TCO refer to the link below to access the full paper.

Article: The Real "Total Cost of Ownership" of Your Test Equipment

Wednesday, March 2, 2011

Agilent introduces the M8190A Arbitrary Waveform Generator

On 3/2/11 Agilent introduced the creme da la creme of arbitrary waveform generators (AWG) with the M8190A. The M8190A offers ultra wide bandwidth and high resolution -- simultaneously. The M8190A offers sampling rates up to 8 GS/s at 14-bits of resolution and 12 GS/s at 16-bits of resolution.

The M8190A is a modular instrument for the AXIe standard. The AXIe standard was created in November of 2009. The three founding members are Aeroflex Corporation, Agilent Technologies Inc., and Test Evolution Corporation (for more info on AXIe click here). The M190A is targeted at applications such as radar, satellite comms, electronic warfare, ADC testing, and jitter margin testing. The following is a list of the M8190A's specs:

  • Variable sample rate from 125 MSa/s to 8 / 12 GS/s
  • Spurious-free-dynamic range (SFDR) up to 80 dBc typical
  • Harmonic distortion (HD) up to -72 dBc typical
  • Up to 2 GS arbitrary waveform memory per channel with advanced sequencing
  • Analog bandwidth 5 GHz (direct DAC out)