element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Programmable Electronic Load - LabVIEW Test Automation: Characterise the Instrument
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 16 Aug 2018 11:15 AM Date Created
  • Views 3915 views
  • Likes 9 likes
  • Comments 10 comments
  • labview
  • scpi
  • electronic load
  • test_automation
Related
Recommended

Programmable Electronic Load - LabVIEW Test Automation: Characterise the Instrument

Jan Cumps
Jan Cumps
16 Aug 2018

Peter, Jon and I are building a Programmable Electronic Load. In this post I use LabVIEW to automate the measurements on the load itself. I'm buitlding an automated test setup to characterise its behaviour

image

The process tests the load for a range of voltages and currents, and measures some points of interest. The results are logged to a spreadsheet.

 

Characterising an instrument requires lots of measurements. You put it in many conditions and then measure the behaviour.

This exercise lends itself to automation. And that's what I'm doing here.

I tell the instrument to draw a wide set of currents from a PSU. At the same time, I set the PSU to different voltages.

I then use the on-board ADCs of the load to measure voltages at key locations.

 

Test Setup

 

The core of the test setup is the electronic load. That's the device under test.

A programmable power supply is used as the source for the load.

A programmable oscilloscope is (not yet) used to measure some additional circuit points.

image

All devices are linked to my laptop via USB. The laptop runs LabVIEW to controll all devices in the setup.

 

Test Conditions: Voltage Loop and Current Loop

 

Our goal is to measure the load when it's pulling current from the PSU, under a wide range of conditions.

The conditions that are variable here are:

  • the voltage of the PSU - we want to test the load for a wide range of input voltages.
  • the current the load draws from that same PSU. Again we aim for an as wide as possible range.

 

The test flow is made of two embedded loops:

  • an outer loop that sweeps the power supply through a range of voltages. It tells the PSU what output voltage it has to supply.
  • an inner loop that runs once for each outer loop step. It tells the load to sweep through a range of currents it has to pull from the supply.

image

In that inner loop, after giving the circuit time to stabilise  - and after giving the load the time to sample all ADCs, we retrieve measurements.

 

From the load, we retrieve (all in pure ADC units, the numerical representation of the sampled value, between 0 and 65535):

  • the sampled load current. This is ADC A. That ADC samples the voltage over the load's current sense register.
  • the voltage from the PSU. This is ADC B. It samples, in my setup, directly at the connectors of the PSU.
  • the temperature of the power MOSFET. This is ADC C. It measures the voltage over the NTC that's placed next to that transistor.

From the PSU, we get (four decimals);

  • the actual voltage in V
  • the actual current in A.
  • the actual power in W.

 

All measurements, together with the set values for eload and PSU, are logged into a spreadsheet.

 

image

 

Setting the Measurement Conditions

 

The LabVIEW GUI for this process lets you set the test conditions.

image

On the left side, you see the outer loop that controls the PSU voltage.

The inner loop is on the right. It controls the load.

 

For the outer loop, you can set the following process parameters:

  • the start voltage. This is the level that is set when the process starts.
  • the number of times you want to step the voltage for a complete test cycle.
  • the voltage increase per step. For each iteration of the outer loop, the voltage will be added to the previous value.
  • single run: if set, the process exits after it has run all the iterations of the voltage loop.
    If not set, the loop will start all over from the Start Voltage until you press the Stop button (not shown). This is a continuous test that can run forever.

 

For the inner loop, you have similar settings:

  • the start value of the DAC that controlls the current.
  • how many times you want to increase that DAC setting. Once all steps are done, we give control back to the voltage loop.
  • The amount of units you want to add to the DAC setting for each iteration.

 

All these settings are done before you start the process. Any change is ignored once the flow is execuing.

 

Monitor and Control

 

The parameters in the bottom half change - and can be changed - at runtime.

 

image

 

The left side show progress. You can see the counter for the inner loop (v loop) and outer loop (DAC loop).

Under each of them, you can see the value that's sent to the respective devices: PSU for voltage, load for DAC setting.

 

On the right you see two timing settings that you can fine-tune during the run.

The delay after set is the time that the process waits after the DAC is set.

This time needs to be long enough to have the load's ADCs take the 3 samples for A, B and C.

If you make this too short, you will get old sample values taken before the DAC has changed.

 

The delay before read is a communication delay. It's the time that the process waits between asking the load for an ADC value and reading the answer.

The time needed is partly driven by the firmware speed and partly by the USB communication speed.

If you make this one too short, you get communication errors and the flow will abort.

 

The whole display is shown here:

image

 

The LabVIEW Block Diagram

 

This is a big diagram. If you want to see it in full detail, download the attachment.

 

image

 

The first block initialises all devices. The PSU, load and scope are in a known initial setting when this part is complete.

 

image

 

Some parts of the flow are put in their own module. I've done this to keep the flow focused on the core process. This is similar to using hierarchical sheets in a KiCAD schematic.

The flow waits 2 seconds to let each instrument settle.

 

The next part is the big outer and inner loop.

image

The outer loop is, as expected, the 2 rectangles counting from the outside in.

It sets the voltage, then hand over to the inner loop that's embedded. The voltage is incremented each successive iteration.

It then waits for the PSU to stabilise on its new setting,

There are exit routes for when you:

  • set the Single run box and the total number of outer iterations has completed
  • the user pressed the Stop button in the inner loop.
  • an error is flagged by the error signal.

 

The inner loop is everything from third rectangle counting from the outside in.

This one  then sets the requested DAC value, waits for the load to sample the values, then retrieves all measurements from both load and PSU.

The measurements are done in parallel for both devices.

At the end of that inner loop, a row is written to the spreadsheet that logs the results.

 

There are exit routes (they also exit the outer loop!) for when you:

  • pressed the Stop button.
  • an error is flagged by the error signal.

If the loop completes the iteration in a normal way, without the above exit routes, then it just gives control back to the outer loop, so that it can move on to its next iteration.

 

The last part releases all devices used in the process. Any uncaught errors are flagged to the user here.

image

 

In Practice

 

There are several ways to use this test process.

You can run it very detailed, stepping over the DAC range from 0 to 65535 in single steps, or you can use bigger steps for a subset (e.g. start at 1000, take 9 iterations with 100 units increment).

The same for the voltage. You can make that step in a few big increments, or in many fine ones (up to the resolution  supported by your PSU).

You can as well let it run a range of currents for a single voltage, or a range of voltages for a single current.

It can run continuous or a single full run.

The end result is always the same. You get that spreadsheet that collects all data logged during the execution.

 

You can use your favourite spreadsheet program to analyse that data or graph the behaviour.

Below you see an example graph of the value of ADC A (sample of the voltage over the current sense resistor) for a range of DAC values (each measurement was a single DAC increment).

image

The measured voltage over the sense resistor (a function of the current the load is extracting from the PSU) is rising linear, as expected.

The one below shows a similar graph. This time it's the current reported by the PSU. There should be a direct relation between the two graphs above, if the current sensing circuit of the load is working correctly.

image

 

 

And this one is what the temperature monitor (ADC C) reports over a wider range of DAC setiings, with bigger increments:

image

This measurement is a function of the voltage over the NTC close to the power MOSFET. The lower the voltage, the higher the measured temperature.

 

The time taken for a measurement increases with the number of iterations. As shown earlier, you can fine-tune some settings. Here's the back-of-the-envelope indication:

Startup takes 2 seconds. The wait time to let all instruments settle after initialisation.

Each outer loop iteration takes 2 seconds to let the PSU stabilise on its new voltage level + the time of a full set of inner loops.

Each inner loop iteration takes (if you keep the default settings) just a little more than 1100 miliseconds (a good second). The time we wait after the DAC is set (1000 ms) and 3 times a read wait of 33 ms (for ADC A to C).

 

To get an idea of the runtime, first calculate the time of one inner iteration (1100 ms).

Multiply that with "the number of inner iterations + 1".

Add 2 seconds.

Multiply that with "the number of outer iterations + 1".

Add 2 seconds.

 

Probing

 

LabVIEW also lets you probe values at runtime. If you are interested in a particular value that isn't logged into the spreadsheet, you can put a probe at the right place in the block diagram and you se values changing at runtime.

You can add and remove probes while the test is executing. You don't need to pause the flow.

image

 

Related Blog
Programmable Electronic Load - LabVIEW Test Automation: Characterise the Instrument

Programmable Electronic Load - LabVIEW Test Automation: Characterise the Instrument Pt 2: Oscilloscope Measurements

Attachments:
image
8585.measureefficiency.zip
measureefficiency_5V_10V_600mA_RAW.zip
measureefficiency_10_10000.zip
  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 7 years ago +4
    Hi Jan, Congrats on all the hard work to get this far.. it's great that you're fully testing the system with detailed data-points! Nice sketches too, it makes it very clear : )
  • fmilburn
    fmilburn over 7 years ago +4
    Hi Jan, You have done a great job of documenting the project and it has imprssive capability. I have picked up a lot of ideas and techniques following but would not begin to be able to put something of…
  • Jan Cumps
    Jan Cumps over 7 years ago in reply to fmilburn +4
    fmilburn , I would not have been able to build it myself either. It's a group exercise. Robert Peter Oakes had the analog design ready and fully working , and he had an approach to get it programmable…
  • Jan Cumps
    Jan Cumps over 5 years ago

    Fast play of an automated test (speed X 16)

     

    Enable PSU; channel 1, set to 10 V

    Enable load, loop through 4 current settings (video says 3, I can't count): 0.086, 0.138, 0.189 and 0.241 A.

    Switch DMM between current and volt to take 2 measurements.

     

    Increase PSU with 1 V and repeat, for 11, 12 and 13V

    Disable PSU channel 1.

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    ... and log to a spreadsheet:

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 7 years ago in reply to Jan Cumps

    Ok. Thanks. I'll try that.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 7 years ago in reply to jc2048

    jc2048  wrote:

     

    What is a temperature of 14000? Is it freezing or is it about to melt the heatsink? Couldn't you get Labview to convert it to centigrade?

     

    ..

    I have on purpose not done any calculations on the value sent to the DAC or any measurement I retrieve, because I wanted to collect raw data.

     

    The temperature is a representation of what that ADC C reads. it’s the result of the voltage divider where the NTC is part of, and the gain of the opamp between that voltage divider and the ADC C.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 7 years ago in reply to jc2048

    create a new ti-rtos based project first, for example by loading one of the rtos examles for that red msp432 from Resource Explorer. that will generate the dependency in your workspace.

     

     

    If that doesn’t work out, I can zip my rtos project and you can then import that.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 7 years ago

    What is a temperature of 14000? Is it freezing or is it about to melt the heatsink? Couldn't you get Labview to convert it to centigrade?

     

    If I sound grumpy it's because I'm trying to compile your software for the red ethernet MSP432 board.

     

    I've downloaded the zip file and put it in a directory under the workspace directory. I also used the resource thing in CSS to install SimpleLink MSP432E4SDK - v:2.20.00.20. (This is with CSS 8.1.0)

     

    I've opened your project but, when I try to (debug) compile it, it gives me

     

    **** Build Finished ****
    Buildfile generation error occurred..
    Referenced project 'tirtos_builds_MSP_EXP432E401Y_release_ccs' does not exist in the workspace. Project 'MSP432_SCPI_ElectronicLoad' may not build as expected.
    Build stopped..

     

    So there's something missing or in the wrong place? Any ideas what I'm doing wrong?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube