In the spirit of continual learning and, as a follow on to my previous blog, Line Regulation Measurement Coding in Python, I thought I would continue discussing coding for measurements by providing an overview of my Python script for load regulation. The coding is quite similar to what I used for the line regulation measurement I discussed in that last blog. In the case of the line regulation, the measurements are performed with the maximum load and the input voltage varied while observing the change in the output voltage. In the case of the load regulation measurement, the output load current is varied while observing the change in output voltage. This is done by first connecting the LDO output to a very high impedance such as a 1 MΩ or higher resistance and measuring the output voltage. Next the LDO output is connected to a load resistance value resulting in the maximum load current. For more details on the basics of the measurement you can go to my blog entitled, Measuring LDO Load Regulation for a Novice.
I’ll once again add the disclaimer here that by no means am I an expert coder but, I believe I know enough to be dangerous. Before we dive into some of the coding that I did when measuring LDO load regulation, let’s take a closer look at a few things including the required equipment and test setup. We must first know what equipment we are using so we can execute the right commands. For the purposes of creating this particular Python script I used a Keithley 2230 DC source meter and a Keysight 34461A digital multimeter which are both shown below.
Keithley 2230 DC Source Meter
Keysight (Agilent) 34461A Digital Multimeter
Something I neglected to mention in my previous blog is that I am using the CH3 output for this test. The Keithley 2230 DC source meter has three outputs. CH1 and CH2 outputs are 0 – 30 V outputs while CH3 is a 0 – 6 V output. Since I only require 5.6V for this particular test I selected the CH3 output. Another interesting item I should point out is that the Keysight 34461A software commands align with the previous generation Keysight model 34410A. This is particularly handy if you’ve been familiar with writing code to control the older unit and have upgraded to the newer unit. This is just happens to be the case for me with the script that I have written here. I had previously written code for the older unit but found that the commands work just the same on the newer unit.
The Keithley is used to provide the DC input voltage for the regulator as well as provide monitoring of the input current to the LDO. The Keysight digital multimeter is used to provide the measured output voltage from the LDO. The supply current reading is not necessarily required to perform this measurement, but it can be added to monitor the input current as an indicator of proper device operation. The current limit on the power supply should be set to provide a safeguard against drawing too much current. Of course, if all goes as planned the current limit should never get tripped, but Mr. Murphy is known to pay us a visit more often than we like as we discussed in detail in my blogs, How About Murphy’s Law? and Mr. Murphy, You’re Not Welcome in Space.
As was done for the line regulation measurement, the current limit on the output of the Keithley DC source meter was set to about 5-10% above the maximum rated current of the LDO. This allows a little margin for any extra current in the setup and ensures that the output doesn’t current limit unnecessarily. Recall that load regulation is the measurement of the output voltage variation when the output load current is varied. When measuring the load regulation of the LDO output, voltage is measured with a very high resistance (RL) that is 1 MΩ or higher if possible and then load resistance (RL) installed such that there is maximum current draw from the LDO. In this case the two different output resistances were measured and the current is measured indirectly by measuring the output voltage and dividing by the load resistance.
Load Regulation Measurement Setup
The basic objective for the script is to record the output voltage under different load conditions. Since the measurement is automated we can do things like vary the input voltage as well during the test. This can be useful to see the behavior of the LDO under the different conditions although it is not necessary to do so. Since the measurement is automated it is relatively easy to add this to the code. As I did for the line regulation script, I have broken the code down into three main sections and a few subsections. The three main sections are: 1 – Library setup, 2 – Filename and variable setup, and 3 – Main function. The Main function section is further subdivided into three sections: A – Script checking, B – Loop to record values to a file, and C – Creates file header and writes file.