Sunday, December 29, 2013

Shower by cell phone and the attitude of gratitude

As I type this, I’m sitting on an airplane, clean, comfortable (as much as that’s possible sitting in economy), clean shaven, well fed, flying home to New Jersey from Frankfurt. Things could have been different…
I started my travels today from a hotel in Sindelfingen, Germany, drove to the Stuttgart airport, and took a short flight to Frankfurt where I connected with this much longer flight home (8.5 hours). I was visiting some of Agilent’s distribution partners in Germany and France over the last ten days to present training on our newest power supply products.

Last night, before I went to sleep, I called the front desk of the hotel to ask for a 6 am wake-up call. I wanted to have time to shower, shave, dress, eat breakfast, check out, gas-up the car, drive to the airport, return the car, exchange my leftover Euros for US dollars, and finally make my morning flight. I also set my new cell phone alarm for the same time (6 am). I recently purchased my first smart phone, so I’m happy to be using its features!

6 am rolls around, my cell phone alarm goes off (yes, I managed to set it correctly), and I wake up momentarily not knowing exactly where I am or what is happening (typical for trips where you change hotels a lot). 5 seconds after the alarm starts its intermittent beeping, I come to my senses in my nearly pitch-black, normally very quiet room. The only light is a dim glow from a tiny LED on the room thermostat and the only sound is a low hum from the heating system fan in between the alarm beeps. 10 seconds after the alarm started beeping, the room suddenly become absolutely pitch-black. No light at all! I wonder if I’m dreaming and I feel like I have completely lost my eyesight! But then I noticed that the heating system fan went from humming to silent, and the thermostat LED is no longer glowing. Totally dark and totally quiet (between phone beeps) with no thermostat LED and no fan? OK, perhaps I’m not dreaming and most likely, this is a power failure! In the absolute darkness, I fumble for my beeping cell phone and manage to push a button on it partially illuminating the screen. I turn off the alarm, and now can see just enough to try the lamp switch next to the bed. Click, click on the lamp….no light. Yeah, definitely a power failure. I know that the cell phone, an Apple 5S, has a flashlight feature that is a nice, bright white LED. Turning that on, I’m now able to easily maneuver around the room. I pick up the room phone, but it is dead. I look outside, and it is dark everywhere. Yep, it’s not just my room, nor is it just the hotel. The power is out everywhere. Guess I won’t be getting my 6 am wake-up call!

Next, it is time to shower. I strategically place the cell phone on the bathroom counter angled just right so the light bounces off the ceiling and I can see reasonably well in the shower. Shaving is a bit more difficult with the limited and oddly angled light, but I manage. Then the lights come back on. Whoo-hoo!  About 10 minutes later, the hotel phone rings and the manager is very apologetic about the wake-up call being 40 minutes late. I tell him “no problem” and explain my phone alarm still woke me on time.
So had my cell phone alarm not awakened me, I may have slept too long resulting in a missed flight. And if I did not have the flashlight feature on the phone, I would not have been able to shower and shave making me more comfortable during a full day of travel. Earlier in my trip, the cell phone GPS also saved my colleague and me by guiding us to our hotel, to the office, and enabling us to find our way back to the hotel after walking around town for lunch.

Cell phones play a very large role in our lives today. While we humans survived the vast majority of our existence without them, smart phones and all electronic technology have vastly changed our lives. While I regularly wonder how my life would have been different had I lived in a time without electricity, today, my smart phone changed my experiences. I could have missed my flight had my cell phone alarm not gone off. I could have been less comfortable during my long travel day had I not been able to shower by cell phone light. Despite a power failure preventing a wake-up call and no light in my hotel room for the early morning, my day was not really disrupted thanks to my cell phone. While these things are minor in the grand scheme of things, I am still grateful for the technology we have that allows us to do the things we do. And I’m glad to be a part of that technology by working with power products. Many cell phone manufacturers use Agilent power products during their design, verification, and manufacturing processes and I am happy to be a part of that chain.

May all of your travels during this holiday season be uneventful…and Happy New Year!

Friday, November 29, 2013

Using Labview without Using an Instrument Specific Driver

Hi everyone!

Labview is presently one of the most popular programming languages for programming test and measurement equipment.   Here at Power and Energy Central, we often get requests for more Labview programming examples for our products (which is definitely something on my agenda).   We also get requests for Labview drivers (which do exist for many of our products).  I thought that I would use this month’s blog posting to demonstrate how to program without using a driver.  There are a few advantages to this approach.  The first and main one is that it gives you access to the full SCPI command set of the instrument.  Anything you can do with the instrument is available to you.  The second advantage is that you do not need to worry about downloading and setting up drivers. 

I am going to work through an example using my Agilent N6700B on LAN.  We are going to use VISA calls in Labview to communicate with the instrument.  The first thing that we are going to need to do is get the VISA init string from the Agilent IO Libraries (or whatever IO Library you are using).  You can see the init string from my N6700B below (from the Agilent IO Libraries):



With the VISA address in hand, start up Labview and choose a blank VI.  Go to the Functions Pallette -> Instrument IO -> VISA ->Advanced and choose Open.  This function will open up a VISA session with your instrument.  There are quite a few inputs to this function but I usually just set up the instrument address and the VISA Open timeout:

After opening a session, we are ready to send our first commands.  I usually like to send a *RST and a *IDN?  so I know that I am in a known state and fully communicating with my instrument.   To send a command, you are going to go to the VISA menu and choose Write.  There are a few lines that you will need to connect here.  In Labview, you will always connect the “VISA Resource Name Out” and “error out” lines through your entire program (you will see that throughout this example).   The command is the other input.  This will need to be a string.  

Since we sent a query, we need to read out the output buffer.  This is done by choosing read in the VISA menu.   You need to do with the read are set the byte count to be read (I set it to 100 bytes so it is totally out of the way).   You also need a string indicator so that you can read and display the results of the *IDN query.



I am going to finish out my program by setting my supply to 4 V, turning the output on, and measuring the voltage.  All of these steps will use the same reads and writes that we used before.  The last thing I will do is use a VISA Close.  Using a Close will de-allocate all the resources and release the instrument.  This is generally good programming practice and is often overlooked.  Here is what the final program looks like:


After I run the completed program, I get the following results:


We can see that the results are as we expected and our program is working.

From this example, you can see that doing simple things is pretty easy in Labview.   If you are interested in downloading the example, please leave a comment here and I will post it so that you can get it.  As always, if you have any questions please feel free to post in our comments.  Take care!



Wednesday, November 27, 2013

Why can’t you put electronic loads in series?

The quick answer to the above question is: because you will likely damage at least one of the loads with excessive voltage! For the longer answer, read on….

[By the way…this is a milestone post for Watt’s Up? since it is post # 100, so thank you to our readers…and Happy Thanksgiving to those in the US or celebrating elsewhere!]

I’ll start with a brief explanation of what an electronic load is, and what it is used for. I am specifically talking about DC electronic loads here. A DC electronic load is a two-terminal electrical instrument that draws power from a DC source. Loads are used to test DC sources. Any device that has a source of DC output power, such as a DC power supply, a DC-to-DC converter, a battery, a fuel cell, or a solar panel, can have power drawn from it with an electronic load. Click here to see Agilent’s DC electronic loads.


For example, to test a fixed-output DC power supply that is rated for 20 V, 5 A, 100 W, you would connect the power supply output to an electronic load with ratings that are equal to or greater than the power supply ratings and that can draw a constant current from the power supply. Since the power supply is regulating the voltage (20 V), the load must regulate the current it draws from the power supply (up to 5 A). If your DC power supply is a constant current source, the load must be capable of drawing power while regulating voltage. You can set most electronic loads to draw power by regulating either constant voltage (CV) or constant current (CC). You can also set many electronic loads to regulate constant resistance (CR) across their input terminals, and some can regulate constant power (CP).

If the power supply to be tested has a higher output voltage than a single electronic load can handle, you may be tempted to put multiple load inputs in series to accommodate the higher voltage. After all, you can do this will power supply outputs to get higher voltage (click here)….why not with loads?

Putting electronic loads in series can cause one of the load inputs to be exposed to a voltage beyond its capabilities that could result in damage to the load. You are putting loads in series because a single load does not have a high enough voltage rating to handle the voltage of your DC power source. But since one of the load inputs could become a low impedance (nearly a short circuit) during test, all of the voltage from your DC source could appear across the other load input in series. There are several scenarios that can result in this destructive situation. To understand these scenarios, you first have to understand how an electronic load works.

Loads work by controlling the conduction of FETs across their input terminals. The control is realized by using a feedback loop to adjust a measured level (such as the input current) so that it equals a reference level (such as the set current). My colleague, Ed Brorein, posted about this topic last year (click here).

When you put multiple electronic loads in series to accommodate higher voltage, one problem scenario occurs when you set both loads to operate in CC mode. You set the same current on both loads. The exact same current flows through both loads (see figure below), but due to small errors in the accuracy of the settings, the real set values will never be exactly equal. Therefore, one of the loads will be trying to draw a higher current (Load 2 in the figure) than the other load (Load 1 in the figure). Since Load 1 will limit the current at the lower value (9.99 A in this example), Load 2 can never attain its real set point (10.01 A in this example). So its internal feedback loop continues to tell the FETs to conduct more and more current until the FETs are fully on looking nearly like a short circuit. This results in nearly all of the power supply voltage appearing across the Load 1 input which can damage it.


If you operate one load input in CC and one in CV, at first this looks like it will result in a stable operating point. However you have to think about how you get to that stable operating point. If you set the loads first before you connect the voltage, before the voltage is applied, the CC load is not satisfied (no current is flowing) so it goes to a short and the CV load is also not satisfied (no voltage is present) so it goes to an open. When the test voltage is applied, all of the voltage initially appears across the open CV load and can damage it. There are other procedures to follow that could temporarily result in a stable operating point (such as slowly increasing the test voltage if you have that ability), but if any fault condition occurs in any of the loads, they try to protect themselves by either turning the FETs on hard (a short) or opening the FETs. In either case, the large destructive voltage will appear across one of the loads in the series connection resulting in damage.

One of my colleagues, Bob Zollo, wrote an article entitled “Why Can’t You Put Electronic Loads In Series To Get More Voltage?” that appeared in Electronic Design on November 4, 2013. For some additional information about this topic, click here to read the article.

So you can see that putting loads in series can too easily result in damage to at least one of the load inputs. I strongly recommend that you do not do it!

Wednesday, November 13, 2013

How to Make More Accurate Current Measurements

There are a number of ways to make current measurements, including magnetically coupled probes, Hall-effect devices, and even some more exotic field sensing probes, but a good quality resistive shunt really cannot be beat in terms of accuracy, bandwidth, and overall general performance.

We likewise make considerable use of high performance shunts in our DC power products to provide extremely accurate current read-back of load currents, spanning the full range of output loading. Not only is the quality and design of the shunt itself critical, but how you treat it and make use of it are all equally important to get great current measurement performance. At the surface it may seem simple; it’s just measuring the voltage drop across a resistor. In reality it is no simple task. It requires appropriate metrological resources to validate the performance.  There are a lot of potential sources of error to recognize, quantify, and contend with.

When working with folks I sometimes encounter those who prefer to develop in their own current measurement into their test systems, instead of relying on the current read-back system already build into their system DC source. There are times when this is the right thing to do and is fine when done correctly. However some of the time there is the preconception that the DC source cannot provide an accurate measurement. The reality is there is a wide selection of DC sources available spanning a wide range of performance, Most likely something will be available that adequately addresses one’s needs. A second issue is, when developing current measurement capabilities for a test system, is truly recognizing all the potential sources of error. It goes well beyond having a good DVM and a good shunt resistor in the test system.  

A colleague here in our R&D group, Mark Peffley, wrote a comprehensive article that was just published. It covers a myriad of things in depth to be taken into consideration in order to make accurate current measurements, including:
  • Temperature dependencies
  • Self-heating and thermal equilibrium
  • Temperature gradients
  • Thermo-electric effects
  • Additional sources of offset errors
  • Voltage drop considerations
  • Shunt selection practical considerations
  • And more!
So using a shunt is a great foundation for making highly accurate current measurements. That’s why we use them in our power products. But, as Mark points out, there is a lot more to it than just Ohm’s law. When using one of our power products we factor all these things in so that they become a non-issue for the user. However, if you do plan to add current measurement into your test systems then I highly recommend reading Mark’s article “Obtain Accurate Current Measurement” (click here to access) as it is a great reference on the subject!

Wednesday, November 6, 2013

Paralleling power supplies for more power without compromising performance!

A year ago my colleague here, Gary, provided a posting “How can I get more power from my power supplies?” (Click here to review). He describes connecting power supplies in series for higher voltage or in parallel for higher current. Along with suggested set ups a list of requirements and precautions are also provided.

Connecting multiple power supplies in parallel operating as voltage sources is always problematic as there will be some imbalance of voltage between them. That’s why, in this previous posting, one unit operates as a voltage source and the remaining paralleled units operate in constant current. The compliance voltage limit of all the units operating in constant current need to be set higher than the master in operating in constant voltage in order to maintain this operation. This is illustrated in Figure 1.



Figure 1: Operating power supplies in parallel for higher power


As long as a high level of loading is maintained the paralleled units remain in their respective operating modes (in this case at least 2/3 loading). However, what happens if you cannot maintain that high level of loading? It is possible in practice to operate at lighter loads with this approach. In this case it is important to set the voltage levels of all the units the same. Now what happens is when the units are fully loaded they operate as already described, with the lowest voltage unit remaining in constant voltage. But when they are unloaded the lower voltage units transition to unregulated operation and the highest voltage unit then maintains the overall output in constant voltage. This is shown in Figure 2, for 0 to 1/3 loading.














Figure 2: Conditions of power supplies connected in parallel at light loading

There is a bit of performance compromises as a result. The transition between the lowest and highest voltage limits adds to the voltage regulation. Also, due to different units experiencing mode crossover transitions between constant voltage, constant current and unregulated operating modes transient voltage performance suffers considerably.

An improvement on this direct paralleling approach is having a master-slave arrangement with control signals to maintain current sharing across units. Our N5700A and N8700A series power supplies use such a control arrangement as depicted in Figure 3, taken from the N5700A user’s guide.




















Figure 3: N5700A Connection for parallel operation (local sensing used)

With this arrangement the master unit, operating in constant voltage, provides an analog current programming output signal to the slave unit, operating in constant current. In this way the two units equally share the load current across a wide range of load current.

Still, having multiple units with only one in constant voltage does not provide as good of dynamic performance as a single voltage source of higher power.  A unique and innovative approach was taken with our N6900A / N7900A series Advance Power System (APS) to support seamless parallel operation without compromising performance. The paralleling arrangement for our N6900A / N7900A series APS is depicted in Figure 4.





Figure 4: N6900A / N7900A series APS Connection for parallel operation

The N6900A / N7900A series APS paralleling arrangement also uses an analog control signal for driving current sharing. However with this arrangement there is no master or slaves. All units remain in constant voltage while equally sharing current. This provides the user with an easy way to scale a power system as required without having to worry about compromising performance.

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: www.agilent.com/find/aps. To explore this advanced signal routing and logical trigger expressions feature even more, take a look at a post from one of my collegues: http://gpete-neil.blogspot.com/2013/10/protecting-your-dut-during-test-with.html