Silicon ChipUsing TestController - April 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Renewable energy costs are seriously understated by the media
  4. Feature: Underground Communications by Dr David Maddison
  5. Project: 500W Class-D Mono Amplifier by Phil Prosser
  6. Project: Wideband Fuel Mixture Display Part 1 by John Clarke
  7. Subscriptions
  8. Review: T48 Universal Programmer by Tim Blythman
  9. Project: Automated Test Bench by Richard Palmer
  10. Project: Silicon Chirp – the pet cricket by John Clarke
  11. Feature: Using TestController by Richard Palmer
  12. Serviceman's Log: Tips on kit and bits by Dave Thompson
  13. Product Showcase
  14. Vintage Radio: Browning-Drake 6A by Dennis Jackson
  15. PartShop
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Secure Remote Mains Switch, July & August 2022; Capacitor Discharge Welder, March & April 2022; Programmable Hybrid Lab Supply with WiFi, May & June 2021
  19. Outer Back Cover

This is only a preview of the April 2023 issue of Silicon Chip.

You can view 39 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Underwater Communication (March 2023)
  • Underwater Communication (March 2023)
  • Underground Communications (April 2023)
  • Underground Communications (April 2023)
Items relevant to "500W Class-D Mono Amplifier":
  • 500W Class-D Amplifier cutting diagrams (PDF download) (Panel Artwork, Free)
Items relevant to "Wideband Fuel Mixture Display Part 1":
  • Wideband Fuel Mixture Display PCB [05104231] (AUD $10.00)
  • PIC16F18877-E/PT programmed for the Wideband Fuel Mixture Display (WFMD) [0510423A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Wideband Fuel Mixture Display short-form kit (Component, AUD $120.00)
  • Firmware for the Wideband Fuel Mixture Display (WFMD) [0510423A.HEX] (Software, Free)
  • Wideband Fuel Mixture Display PCB pattern (PDF download) [05104231] (Free)
Articles in this series:
  • Wideband Fuel Mixture Display Part 1 (April 2023)
  • Wideband Fuel Mixture Display Part 1 (April 2023)
  • Wideband Fuel Mixture Display, Pt2 (May 2023)
  • Wideband Fuel Mixture Display, Pt2 (May 2023)
  • Wideband Fuel Mixture Display, Pt3 (June 2023)
  • Wideband Fuel Mixture Display, Pt3 (June 2023)
Items relevant to "Automated Test Bench":
  • Automated Test Bench Swiss Army Knife PCB [04110221] (AUD $10.00)
  • 5V to ±15V boost module (Component, AUD $5.00)
  • ESP32 DevKitC microcontroller module with WiFi and Bluetooth (Component, AUD $25.00)
  • Testbench Swiss Army Knife short form kit (Component, AUD $50.00)
  • Laser-cut UB1 Jiffy box lid for the Test Bench Swiss Army Knife (PCB, AUD $10.00)
  • Firmware and laser cutting files for the Automated Test Bench Swiss Army Knife (Software, Free)
  • Automated Test Bench Swiss Army Knife PCB pattern (PDF download) [04110221] (Free)
Items relevant to "Silicon Chirp – the pet cricket":
  • Silicon Chirp cricket PCB [08101231] (AUD $2.50)
  • PIC16F15214-I/SN programmed for Silicon Chirp [01810123A.hex] (Programmed Microcontroller, AUD $10.00)
  • Silicon Chirp kit (Component, AUD $25.00)
  • Firmware for Silicon Chirp [01810123A.HEX] (Software, Free)
  • Silicon Chirp cricket PCB pattern (PDF download) [08101231] (Free)

Purchase a printed copy of this issue for $11.50.

Integrate your Test Bench with TestController When working on the bench, there’s often a need to synchronise readings on several test instruments, log and analyse the results. A handy piece of free software called TestController can automate much of this process for almost any instrument with remote control features. by Richard Palmer W hile developing my many different projects, there were numerous occassions when I wanted to run through a sequence of settings across one or more pieces of test equipment, log and analyse the results. I’ve found that the free software TestController can remote control, read and analyse just about any device that can connect to a computer and communicate via text or SCPI commands. TestController can be downloaded from https://lygte-info.dk/ I have set up TestController to work with my most recent projects: • Programmable Hybrid Lab Supply (May & June 2021; siliconchip. au/Series/364) • WiFi DC Load (September & October 2022; siliconchip.au/Series/388) • Test Bench Swiss Army Knife (see page 60) As well as those three Silicon Chip projects being WiFi enabled and SCPI controlled, my digital oscilloscope, DDS signal generator and one of my Features ∎ Supports serial, USB, Bluetooth, WiFi, LXI and GPIB connections ∎ SCPI and text-based command protocols ∎ Powerful test automation tools ∎ Comprehensive logging, graphing and mathematical functions ∎ Command scripting across multiple instruments ∎ Over 100 common instrument definitions (including our WiFi Hybrid Lab Supply, DC Load and Swiss Army Knife) ∎ Compatible with Windows and Linux 80 Silicon Chip multimeters also have remote control and reading features. Installation Installing TestController is straightforward. Download the zip file from the website – the link is at the bottom of the main page. Unpack the downloaded archive file into a convenient location, install Oracle Java or the Open JDK and run the executable .bat file. Silicon Chip instrument definition files go into the Devices folder; TestController needs to be restarted for the new devices to become available. Using TestController TestController’s main screen is a Screen 1: TestController’s main screen after two devices have connected and several immediate commands to the DC load have been executed. The font size has been increased via the Configuration menu for improved readability. As a result, there are two rows of screen tabs. Screen 2: the Current values tab shows the most recent readings from the enabled instruments. Australia's electronics magazine siliconchip.com.au good place to begin exploring its features (Screen 1). The tabs across the top provide access to the main functions. The top text window in the Commands tab shows the log of responses from commands sent to the instruments. Automation scripts are also written in this window. The command line text box in the middle of the tab can be used to send commands to any connected instrument. In Screen 1, I’ve right-clicked on the command line prompt, which displays the currently selected instrument. A selection box pops up, facilitating quick changes between connected devices. At the bottom is the help window, which displays all the available commands for the current instrument. It dynamically updates as commands are typed. The Current values tab (Screen 2) provides an integrated view of all the settings and measurements registered for each connected instrument. Any calculated values from the Math tab are also shown here. Table view (Screen 3) contains similar information but as a sequence. Data can be saved for later analysis within TestController or exported for external analysis. Table data can also be plotted on the Chart (Screen 4) and Histogram screens. The Math tab (Screen 5) makes values available as readings for logging, charting or histograms. The remaining tabs configure TestController. On the Commands tab, the Popups button provides access to a range of useful widgets, including graphical control interfaces for the enabled instruments (Screen 6). While the device popups can get hidden behind the main window, they are readily brought back to the front by clicking the Setup button. Screen 7 shows the WiFi DC Load’s device control popup, which mirrors most of the functions on the instrument’s screen. As TestController has powerful logging functions inbuilt, those functions are not duplicated by the popup. Instruments are connected using the Load Devices tab (Screen 8). TestController maintains a list of all the instruments you’ve registered and only connects to the ones that are enabled for this test session. I’ve registered my Owon multimeter, via its Bluetooth serial dongle, three WiFi siliconchip.com.au Screen 3: the Table screen shows logged values. Calculated values from the Math tab are also listed. Screen 4: the Chart tab graphs the information from the Table view and any calculated values from the Math tab. Here, the output of the virtual ramp generator is shown along with an almost constant voltage across the DC load. Screen 5: the Math tab creates calculated values. Here we’ve recalculated the power sunk by the DC load. instruments using their IP addresses or their DNS names, and the internal LF sine generator. Automating test procedures TestController has a range of inbuilt Australia's electronics magazine automation functions that require no scripting. The first example below uses the Param Sweeper tool to create a staircase voltage on the Programmable Hybrid Lab Supply. The second example is a script using April 2023  81 ► Screen 6: the Popups button provides access to control and readings widgets. Screen 7: the WiFi DC Load device popup (see the project in the September & October 2022 issues; siliconchip. au/Series/388). ► one of TestController’s virtual instruments to control a power supply. Testing a range of values TestController’s Param Sweeper popup is very useful in automating tests where a control needs to be stepped through a range of values. It can generate linear, logarithmic or stepped sweeps without any scripting. The following example sets a five-step ramp for the Hybrid lab Supply’s output voltage, logs and charts the results. Pop up the Param Sweeper. On the Main tab (Screen 9), ensure the logging and charting options are selected in the bottom row of checkboxes. You may need to widen the popup window a little so that the Start button is visible. On the Primary tab, fill in the desired parameters for the sweep (Screen 10). Set the parameter to be swept from the drop-down list (PlatyPSU Primary Voltage in this case). Press Start and wait for the sweep to be completed. In the main TestController Chart tab, make sure all the variables you want to be charted are selected, and do the same for log data in the Table tab. The resulting chart and log file are shown in Screens 11 & 12. I varied the load resistance during the test, creating variations in the current readings. Otherwise, the current graph would have simply mirrored the voltage steps. Scripting for complex tasks Screen 8: after enabling the virtual sine or ramp generator, click the Reconnect button to ‘connect’ to them. The final component, and perhaps the most powerful, is scripting. Where the test required isn’t already provided by TestController, scripts are straightforward to create. When creating the script, commands are entered directly into the log window on the Commands tab. You can include any connected instrument in Screen 9: a single (Primary) sweep is selected, with logging and charting at onesecond intervals. I set the chart to be saved as xps.png and the log as xps.csv in the “documents\TestController folder”. The test run was underway when this image was captured. Screen 10: the Param Sweeper’s Primary parameters menu. It is set for five steps of one second each with one-second delays before the sweep starts and after it ends. Baseline values are recorded in the log and chart during these pauses. 82 Silicon Chip Australia's electronics magazine Screen 11: all values shown in TestController’s main window Table tab are logged, whether selected or not. Some columns have been hidden for clarity. siliconchip.com.au the script by using its handle at the start of the command. TestController system actions are preceded with a # and include functions like delays, looping and waiting for a condition to become true. Calculations can also be made, data logged, and plotted from scripts. Adding to the power of its scripting capabilities is the ability to send calculated values to connected instruments, simply by enclosing values in parentheses – ( ). Scripts can be saved and reused. We’ve included a simple scripting example (Script 1); there are more on the TestController website (siliconchip.com.au/link/abev). This example script sets up the Virtual Sine Generator to create a very low frequency (0.033Hz) sinewave for one complete cycle, then uses that to control the output of the Hybrid Lab Supply (PlatyPSU). A chart of the resulting output is shown in Screen 13. The #while and #endwhile commands bracket the loop, and logInterval is a system variable that counts down the remaining time for the test. Any mathematical function, or a reading from an instrument, could also be used to control the loop or set the power supply’s output voltage. Screen 12: this is the chart that was saved at the end of the ParamSweeper test cycle. The load resistance was varied during the test to produce the jagged current line. Only the parameters selected in the Chart tab on the main TestController window are shown. I had to do some fiddling in the Scales for Chart tab to expand the current scale so I could get this display. Conclusion This article only touches on a few of TestController’s features – it can automate most of the testing done on the lab bench. The key requirement is that the test gear must have some form of remote control available. TestController has definitions and remote control interfaces for over 100 different instruments, and more are appearing every week. They range from multimeters through power supplies, signal generators and DC loads to oscilloscopes. If your instrument isn’t listed, adding your own is relatively straightforward. It took me a few hours to create my first definition file for the WiFi-Controlled Lab Supply, but only an hour or so to build the one for the WiFi DC Load as I already understood the basics. The TestController website has regular updates (siliconchip.com.au/ link/abev), and there is an active user forum on EEVblog (siliconchip.au/ link/abhh). We look forward to hearing how readers have automated their test benches in the Mailbag column. SC siliconchip.com.au Screen 13: the sinewave produced by the PSU using commands from TestController. The PSU trace is delayed because the power supply’s output voltage is only measured in the following one-second log window. The actual delay is much shorter. #logcmds 0 VSG:PERIOD 30 ; 30 seconds per complete sine cycle VSG:RANGE 10 ; 10 V p-p VSG:OFFSET 5 ; offset so that all values are positive VSG:ON 1 #log 1 ; log readings every second PlatyPSU::SOUR:OUTP ON ; PSU on #while logInterval>0 ; start the loop PlatyPSU::SOUR:VOLT (VSG.Sine) ; set the PSU voltage to the sine value #haslogged ; wait until log entry has been created #endwhile PlatyPSU::SOUR:OUTP OFF ; note the double :: Script 1: the script for the power supply sinewave generator is relatively simple. The semicolon delimited comments are not part of the TestController script; they are just there to explain how it works. Australia's electronics magazine April 2023  83