Thursday, October 31, 2013

Power Supply Programming Part 2: What Type of Programming Language to Use

Happy Halloween Watt’s up fans!  Today I want to look at what programming language you are going to use to write your program.  Instead of recommending a particular language, I am going to break it down by graphical versus text based programming.

Let me start by saying that there really is no correct answer to this question.   This is a matter of personal taste.   

I am going to start with a bit about my background.  Unlike most of my colleagues, I did not specialize in analog electronics in college.  I focused more on computer engineering.  Due to this specialization, I have taken quite a few programming based courses.  I prefer sitting down and programming using a text based programming language because of my background. 

 Graphical programming languages are a very popular option (Agilent VEE is the one that I am most familiar with).     I find these programs are great for doing short programs.  If something can take up less than one page on your computer screen, then it works pretty well here.  These languages also make building user interfaces really easy since there are a lot of easy to access functions for controlling and displaying instrument data.  I personally find that they get very unwieldy if you want to send and read a lot of data with an instrument.  I also find the looping constructs to be strange.   People have told me that these graphical languages look very similar to circuit diagrams and I can see how people would prefer that kind of view to just plain text programming.

I am going to make a confession.  If I have to write a program quickly and I do not have to show it to anybody, I still will write it in HPBASIC.  I find it to be very easy to do simple instrument programming.  There is no need for drivers, once it is set up properly; sending and receiving information with an instrument is a breeze.    Large programs do not fare very well in HPBASIC though.

My preferred way to program these days is Visual Basic (using VISA-COM IO).  If you look at the power supply example programs that we provide, there is a lot of VB in there.  I feel that a text based program allows you to write much more compact code. It takes up a lot less screen space than an equivalent graphically based language.  Something like Visual Basic is also more versatile since it is not only for test and measurement but for more general applications.  The looping constructs work very nicely here and to me the flow makes more sense.  I also find typing quicker than connecting boxes.  Text based programming does have some cons though.  For one, the graphical languages are written from the bottom up to do instrument control.  They have built in functions and data manipulation that make thing easier.  The graphical languages also have some really good libraries for building User Interfaces. 

 The real correct answer to the questions is the best language to use is the one that you are most comfortable programming in.  If you think that I missed any pros or cons please feel free to share in the comments.

Wednesday, October 30, 2013

Protect your DUT from over-current in more ways than one

Last month, I posted about one of our new families of products: the N6900/N7900 Series 1- and 2-kW Advanced Power System (APS) DC Power Supplies (click here). I typically like to post about more general power topics rather than focus on specific Agilent products, but this product has some really interesting features from which you can benefit. After 33 years of working on power here, there aren’t too many new products that get me excited, but this is one of them! So here is a story about an application for it.

Earlier this month, I visited one of our customers that had a device under test (DUT) whose input was sensitive to too much current. That is typically not a difficult issue to protect against using Agilent power supplies with over-current protection (OCP). Set the current limit to a value that you don’t want to exceed, turn on OCP, and the power supply output will go into protect (turn off) when the current limit value is reached. Simple enough! But this customer had an additional requirement. In addition to an OCP value as just described, he also wanted to shut down the output if the current exceeded a lower current for more than a specified amount of time. So he wanted the power supply output to go into protect (turn off) if either of the following conditions occurred on his DUT (I changed this example to protect his information):

       1.  DUT input current exceeds 6 A for any amount of time, or
       2.  DUT input current exceeds 4.5 A for 80 ms

To be honest, at the time of the visit, I wasn’t sure if our new product could do this. The product is so new and so feature-rich that I am not yet familiar with all of its capabilities. But when I returned to my office, I set it up and found it was very easy to do! Here is the solution:

I used the advanced signal routing and logical trigger expressions built into our N7952A APS to setup both requirements. I could have sent SCPI commands to setup the same trigger configuration, but our free Power Assistant Software (N7906A) made this even easier. Figure 1 shows the software with the configuration.

If, after creating the configuration, I want all of the SCPI commands that correspond to it for a program, I could use the software feature “SCPI to clipboard” that creates them from the configuration. See Figure 2.

Take a look at this feature in action. Figure 3 shows a scope trace of the current waveform. As you can see, currents that are less than 4.5 A do not trip the protection. And currents above 4.5 A for less than 80 ms (and below 6 A) also do not trip the protection. But as soon as the current exceeds 4.5 A for 80 ms (and remains below 6 A), the protection tripped – the output shut off causing the current to go to zero amps.

This is just one example of how versatile the N6900/N7900 APS power supplies are. For more information about how these advanced power systems can help you in your power application, please use this link: To explore this advanced signal routing and logical trigger expressions feature even more, take a look at a post from one of my collegues:

Thursday, October 17, 2013

Quickly Measure a High Brightness LED’s (HBLED) Forward Electrical Characteristics

It’s not hard to notice (or extremely hard not to notice!) how high brightness LEDs, or HBLEDs, are quickly becoming commonplace all around us in our daily lives. LEDs are no longer relegated to being an indicator light on a display panel. HBLEDs have drastically ratcheted up their output to become sources for illumination.  More and more autos use them for their tail and brake lights. It’s easy to see the “instant on” they have when the auto in front of you hits its brakes, not to mention the deep purity of color they have in comparison to the incandescent predecessors.  They are also turning up in the headlights, the traffic lights, even high power street and parking lot illumination lights, and in countless other places. A lot of testing, characterization, and development work has, and continues to take place, to achieve this level of performance from HBLEDs. This includes making careful measurements of electrical power being provided and the corresponding luminous efficacy outputted, in order to assess its performance.

In my title above I am using the term “quickly” for two reasons in my posting today. First, it is important when trying to capture the forward characteristics of an HBLED that it is performed in a minimum amount of time in order to minimize temperature change due to self-heating.  The temperature an HBLED is running at has in impact on its performance. Minimizing the amount of temperature change improves accuracy of test results in determining the performance of the HBLED, for a given operating temperature. My second reason for using quickly is providing a means to make these HBLED measurements with just a little time and effort.

It turned out using the N6784A four-quadrant SMU module in an N6705B DC power analyzer mainframe worked out really well on both counts of quickly. This set up is depicted in Figure 1.

Figure 1: HBLED test characterization set up

While the N6784A is an extremely fast voltage source it is even a faster current source. With current rise and fall times of just a few microseconds was a simple matter to generate sub-millisecond-long high amplitude pulses of current with fast settling edges to provide the necessary stimulus for performing the forward electrical characterization of the HBLED. This allowed testing to take place in minimum time and avoid significant heating of the HBLED die.

One of the outcomes of the testing is shown in Figure 2, displayed graphically by the 14585A software.  Here a ramped current pulse was used instead of a flat top pulse. The HBLED’s voltage and current were simultaneously digitized as the current was ramped up. This gave a way of characterizing the HBLED’s forward voltage drop for all levels of drive current, from zero to maximum.

Figure 2: HBLED forward characterization results
The N6705B DC Power Analyzer mainframe and 14585A companion software made quick work of the setup, testing, and display of results.  A ramp waveform from the library of pre-defined ARBs was selected and used to generate the current ramp. In this instance it was set to ramp up to 1.2 amps in 1 millisecond. The oscilloscope mode was used to set up the simultaneous capture of voltage and current, synchronized to the current ramp stimulus. As voltage and current were captured it is also a simple matter to display the power, being the point-by-point product of the voltage and current. The electrical power in can then be correlated with a light output measurement on the HBLED for evaluating its performance.

Not only is this setup able to measure the HBLED’s forward characteristics, as the N6784A can source negative voltage and measure down to nanoamp levels it can quickly test the HBLED’s reverse leakage characteristics as well.

Wednesday, October 9, 2013

Using the power supply status subsystem to improve your test throughput

Continuing on my throughput theme here, one recommendation is to take advantage of the power supply’s status subsystem. Some power supply operations take notably longer than most to complete than others. Two notable examples:
  • Initializing a triggered measurement
  • Initializing a triggered output transient or output list event

When developing programs you can include long, fixed wait statements to make certain these operations have completed before proceeding. However, this can easily add many tens of milliseconds or more of unnecessary waiting, increasing overall test time.  A better way is to take advantage of the DC power supply’s status subsystem features that eliminate unnecessary waiting for these operations.

Triggered measurement and output sourcing events can substantially speed up testing by providing actions tightly synchronized with other test activities. But they do have some up-front set up overhead time needed for initializing them. Instead of using a fixed programming delay following an initialization operation it is better to take advantage of the Operation Status Group register in the status subsystem, which is illustrated in Figure 1.

Figure 1: Agilent N6700 series DC power system operation status group

The “WTG meas” bit (#3) or “WTG trans bit (#4) in the condition register can be monitored with a loop in the test program to see when they turn true. At the moment the measurement or output sourcing event is initiated and ready for a trigger the test program will then proceed with its execution without incurring any unnecessary additional waiting. This saves a considerable amount of time as illustrated in Figure 2.

Figure 2: Operation-complete wait time distribution

Instead of waiting for the full worst-case each and every time, the wait is now just the actual time. When repeated over and over for all DUTs being tested, the net result is the average of the actual wait time, which in most cases is just a small fraction of the worst case time! The net result can be many tens of milliseconds test time savings, making an improvement in test throughput.

The first five hints of my compendium “10 Hints for Improving Throughput with your Power Supply” can be viewed here: (click here to access).  For those reading our “Watt’s Up?” blog here are getting the opportunity to preview one of the remaining 5 hints yet to be released!