Silicon ChipWiFi Programmable DC Load, Part 1 - September 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Our binders are made in Australia / New Zealand delivery problems
  4. Feature: Display Technologies, Part 1 by Dr David Maddison
  5. Product Showcase
  6. Project: WiFi Programmable DC Load, Part 1 by Richard Palmer
  7. Review: Creality CR-X Pro 3D Printer by Tim Blythman
  8. Project: New GPS-Synchronised Analog Clock by Geoff Graham
  9. Feature: History of Silicon Chip, Part 2 by Leo Simpson
  10. Project: Mini LED Driver by Tim Blythman
  11. Project: Wide-Range Ohmmeter, Part 2 by Phil Prosser
  12. Serviceman's Log: Begin a gopher for a day by Dave Thompson
  13. Vintage Radio: AVO valve testers, part 2 by Ian Batty
  14. PartShop
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata: AM-FM DDS Signal Generator, May 2022; Capacitor Discharge Welder, March & April 2022
  18. Outer Back Cover

This is only a preview of the September 2022 issue of Silicon Chip.

You can view 38 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:
  • Display Technologies, Part 1 (September 2022)
  • Display Technologies, Part 1 (September 2022)
  • Display Technologies, Part 2 (October 2022)
  • Display Technologies, Part 2 (October 2022)
Items relevant to "WiFi Programmable DC Load, Part 1":
  • WiFi-Controlled DC Electronic Load main PCB [04108221] (AUD $7.50)
  • WiFi-Controlled DC Electronic Load daughter PCB [04108222] (AUD $5.00)
  • WiFi-Controlled DC Electronic Load control PCB [18104212] (AUD $10.00)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • Laser-cut acrylic fan mounting-side panel for the WiFi DC Electronic Load (PCB, AUD $7.50)
  • WiFi-Controlled DC Electronic Load laser-cut front panel (2mm matte black acrylic) (PCB, AUD $10.00)
  • Software and laser-cutting files for the WiFi DC Electronic Load (Free)
  • WiFi-Controlled DC Electronic Load PCB patterns (PDF download) [04108221/2, 18104212] (Free)
  • Front panel decal and cutting diagrams for the WiFi DC Electronic Load (Panel Artwork, Free)
Articles in this series:
  • WiFi Programmable DC Load, Part 1 (September 2022)
  • WiFi Programmable DC Load, Part 1 (September 2022)
  • WiFi Programmable DC Load, Part 2 (October 2022)
  • WiFi Programmable DC Load, Part 2 (October 2022)
Items relevant to "New GPS-Synchronised Analog Clock":
  • Kit for the new GPS Analog Clock Driver (Component, AUD $55.00)
  • New GPS-Synchronised Analog Clock Driver PCB [19109221] (AUD $5.00)
  • PIC16LF1455-I/P programmed for the New GPS-Synchronised Analog Clock (1910922A.HEX) (Programmed Microcontroller, AUD $10.00)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • Kit for the new GPS Analog Clock Driver without GPS module (Component, AUD $35.00)
  • Firmware and source code for the New GPS-Synchronised Analog Clock Driver [1910922A.HEX] (Software, Free)
  • New GPS-Synchronised Analog Clock Driver PCB pattern (PDF download) [19109221] (Free)
Articles in this series:
  • New GPS-Synchronised Analog Clock (September 2022)
  • New GPS-Synchronised Analog Clock (September 2022)
  • WiFi-Synchronised Analog Clock (November 2022)
  • WiFi-Synchronised Analog Clock (November 2022)
Articles in this series:
  • History of Silicon Chip, Part 1 (August 2022)
  • History of Silicon Chip, Part 1 (August 2022)
  • History of Silicon Chip, Part 2 (September 2022)
  • History of Silicon Chip, Part 2 (September 2022)
  • Electronics Magazines in Aus. (July 2023)
  • Electronics Magazines in Aus. (July 2023)
Items relevant to "Mini LED Driver":
  • Mini LED Driver PCB [16106221] (AUD $2.50)
  • Small 4A boost step-up regulator module (XL6009) - red PCB version (Component, AUD $6.00)
  • Complete kit for the Mini LED Driver (Component, AUD $25.00)
  • Mini LED Driver PCB pattern (PDF download) [16106221] (Free)
Items relevant to "Wide-Range Ohmmeter, Part 2":
  • Wide-Range Ohmmeter PCB [04109221] (AUD $7.50)
  • PIC24FJ256GA702-I/SS‎ programmed for the Wide Range Ohmmeter (0110922A.HEX) (Programmed Microcontroller, AUD $15.00)
  • 16x2 Alphanumeric module with blue backlight (Component, AUD $10.00)
  • Partial kit for the Wide-Range Ohmmeter (Component, AUD $75.00)
  • Firmware and source code for the Wide-Range Ohmmeter [0110922A.HEX] (Software, Free)
  • Wide-Range Ohmmeter PCB pattern (PDF download) [04109221] (Free)
  • Front panel label for the Wide-Range Ohmmeter (Panel Artwork, Free)
Articles in this series:
  • Wide-Range Ohmmeter, Part 1 (August 2022)
  • Wide-Range Ohmmeter, Part 1 (August 2022)
  • Wide-Range Ohmmeter, Part 2 (September 2022)
  • Wide-Range Ohmmeter, Part 2 (September 2022)
Articles in this series:
  • AVO valve testers, part 1 (August 2022)
  • AVO valve testers, part 1 (August 2022)
  • AVO valve testers, part 2 (September 2022)
  • AVO valve testers, part 2 (September 2022)

Purchase a printed copy of this issue for $11.50.

WiFi-Controlled Programmable DC Load Part 1: by Richard Palmer ѓ Handles up to 150V DC, 30A & 300W ѓ Uses computer CPU coolers to handle high power dissipation with modest noise ѓ Constant voltage (CV), constant current (CC), constant power (CP) and constant resistance (CR) modes ѓ Step test modes (square, ramp and triangle) with variable rise/fall times ѓ Data logging ѓ Touchscreen, USB or WiFi (web browser) control, including via smartphone/tablet ѓ SCPI programmable over WiFi and isolated USB ѓ Retains settings with power off ѓ Over-voltage, over-current and reverse voltage protection ѓ Useful for power supply, battery and solar cell testing This Electronic Load can handle enough power to test almost any project, plus many kinds of batteries and solar cells. It can operate up to 150V and sink 30A within a 300W power envelope. It has overvoltage, over-current, over-temperature and reverse polarity protection. Notably, it’s programmable, from the front panel or over WiFi, and offers automated testing and data-logging capabilities. 30 Silicon Chip Australia's electronics magazine siliconchip.com.au DC electronic loads are useful for testing power supplies, batteries, solar cells and other power-sourcing devices. The design and construction of an electronic load also demonstrates many useful power electronics principles. So even if you don’t need or plan to build a DC load, you might find this article interesting. The most basic load component, the resistor, can be used to test power sources and batteries, but it lacks flexibility. Even with a high-power rheostat, plotting performance against changes in load parameters is tedious. It is difficult to change a resistor’s value quickly and cleanly to test transient response. Electronic loads overcome these and other limitations of the basic load resistor. As well as being able to mimic a resistance, electronic loads typically have several other operating modes: Constant Voltage (CV), Constant Current (CC) and Constant Power (CP). Modern electronic loads usually can generate ramps or alternate between settings in a timed sequence to test different load points and transient behaviour. Features to assist battery and solar cell testing are also common. Advanced loads are programmable, provide automation for common functions and have data logging. This Electronic Load offers all those features (see Scopes 1-3). Importantly, you can program and monitor the Load from its front panel controls, a web browser, terminal software or via SCPI. SCPI is a standard protocol used by many applications specifically designed to control test instruments, such as National Instruments’ LabView Community Edition or the open source software Test­Controller (siliconchip.com.au/ link/abev). Scope 1: the current sunk by the Load in constant-current mode with a fixed voltage applied and a Step function for the desired current. It’s alternating between 0.5A and 3A roughly once per second. This can be easily configured through the front panel or web interface. Scope 2: this is similar to Scope 1, except the Load is programmed to rapidly increase from 0.5A to 3A, then back down to 0.5A in four steps, again using the Step function. Scope 3: another example of the Step function. This time, it’s set for a period of 10 seconds with 1.5-second rise/fall times, resulting in a trapezoidal current waveform. Design goals The project’s design parameters were driven by several factors, including its intended applications and some practical limitations. One important application is the need to test various types of rechargeable batteries, from the tiny lithium polymer cells found in toys such as micro helicopters through to moderate-­duty sealed lead-acid (SLA) batteries. Another useful job for an electronic load is to automate testing of power siliconchip.com.au supplies, for example, our most recent bench supplies which include: • 45V, 8A Linear Bench Power Supply (October-December 2019; siliconchip.com.au/Series/339) • Programmable Hybrid Lab Supply with WiFi (May & June 2021; Australia's electronics magazine siliconchip.com.au/Series/364) • Dual Hybrid Tracking Bench Supply (February & March 2022; siliconchip.com.au/Series/377) 300W solar cells are now common, and solar cell testing is another situation where an electronic load is September 2022  31 Fig.1: the maximum power dissipation of the Load determines the safe operating area (SOA). At very low voltages, the maximum current that can be sunk is determined by the Rds(on) of the Mosfet and shunt resistors of the four power modules in parallel, giving a minimum resistance of 25mW. helpful, so it is designed to handle the voltages and currents such panels produce. In terms of component limitations, the maximum ratings of readily available relays and binding posts suggested 30A as a workable current limit, and 150V is a reasonable maximum voltage to handle – see Fig.1. Isolation from Earth is beneficial when ‘high-side’ testing is required or for negative voltage sources. As the Load is to be used on the test bench, comprehensive protection against overloading and reversed connection are also needed. For extended tests when you might need remote monitoring and control, it must provide comprehensive remote control facilities. To this end, the browser interface mirrors all touch screen functions other than the calibration and communications menus. It also provides logging functions and a plot of current, voltage and one other parameter over time. When testing power supplies, the ability to step quickly between settings or create ramps is helpful to plot their characteristics. Finally, the ability to collect test data from multiple runs for further analysis saves time and possible transcription errors. It is even better if the readings from several instruments can be brought together into a single log file. While we could have designed these features into this project, TestController allows instruments to be remotely controlled, test sequences to be automated and multiple devices synchronised. The measurements obtained can be analysed using the comprehensive math and graphing functions included in the program. 32 Silicon Chip As TestController supports SCPI (as do several other useful test instrument packages), that is the logical interface method. Therefore, the Load responds to SCPI protocol commands either over a WiFi connection or via an isolated USB serial connection. We have included a TestController instrument definition file for this Load to download at siliconchip.au/link/abf6 You can find detailed descriptions of the remote control options and the general operation of the Load in the PDF manual (see siliconchip.com.au/ Shop/6/4529). Also, for more information on the SCPI protocol, see page 78 of the June 2021 issue (siliconchip. com.au/Article/14891). Design overview The primary function of an electronic load is to turn electrical power into heat and then dissipate it into the surrounding air. After exploring various traditional heatsink and fan combinations, we determined that the best value was using a fan-forced computer CPU ‘tower’ cooler. Most CPU coolers have a 35 x 40mm contact pad to fit the standard Intel and AMD CPU heat spreader footprints. Two TO-247 packages mount nicely side-by-side on this sized block. While any cooler rated at 150W or more could do, the CoolerMaster Hyper 103 has mounting flanges adjacent to a generous heat transfer pad, providing a ready means of attaching it to the PCB. It also has pretty blue LEDs, which will light up the inside of the case! As in other high-power designs, good thermal transfer from the Mosfet package to the heatsink is critical. We have chosen not to use any insulating material between the Mosfets and the cooler to keep thermal resistance to a minimum. Two of these CPU coolers are used in the Load, each removing the heat from a pair of TO-247 package Mosfets. As the Mosfet drains connect to the tabs, both heatsinks are at the full input voltage of up to 150V. We have used the CPU cooler’s plastic fan shroud as a chassis mounting point to provide the required isolation. The CoolerMaster Hyper 103 CPU cooler, shown in Fig.2, is preferred for this project. They cost around $35 each and come with a 92mm 4-pin PWM fan. They use three heat pipes to transfer the heat from the Mosfets to the fins – we covered heat pipe technology in our article in the May 2022 issue (siliconchip.au/Article/15304). Mosfet control Fig.3 is the block diagram. There are four power blocks at the core of the design, each with a Mosfet, a shunt resistor and some control circuitry, shown in more detail in Fig.4. Fig.2: two Coolermaster Hyper 103 tower coolers are used to remove heat from the four Mosfets and dissipate it into the surrounding air. Other CPU coolers could be used, but they might not fit in the specified enclosure, and these are pretty good value at around $35 each (retail pricing). Australia's electronics magazine siliconchip.com.au Fig.3: a simplified block diagram showing the major features of the Load. Four identical op amp/Mosfet power blocks are controlled by a DAC, while an ADC measures the input voltage and current. A relay connects or disconnects the DUT with the ESP32 handling communications and control. A control voltage, SET_POINT, is provided to the power blocks by a digital-­ to-analog converter (DAC) common to all power blocks. An analog-to-digital converter (ADC) measures the voltages at the Load’s input and across the shunt resistors. The microcontroller controls the DAC output voltage and iterates it until the desired operating conditions are reached (see the panel on “Controlling an Electronic Load”). The case temperature of one Mosfet is read by a thermistor and fed to an ADC channel. This temperature reading is used to control the fan speed via a PWM signal from the microcontroller module, and also to implement the over-temperature shutdown safety feature. The Load’s power comes from a 12V DC plugpack which directly powers the fans and op amps. It is regulated to 5V to power the ESP32 microcontroller and several other components. A further 3.3V rail is used to power the DAC and ADC chips. The general arrangement of the controller is the same as for the Hybrid Lab Supply project (May-June 2021; siliconchip.com.au/ Series/364). To simplify the mounting of the Mosfets on the CPU coolers, one pair of Mosfets and their cooler mount on a separate daughterboard. A short ribbon cable connects the power supply Fig.4: the basic constant-current load circuit. The Mosfet drain current is reasonably proportional to its gate voltage once the gate threshold voltage has been reached, so the op amp mainly has to make minor adjustments to account for changes in temperature, non-linearities etc. We use a vented metal enclosure 270 x 210mm large to house the DC Load, as shown in the photo. A 3mm-thick piece of clear acrylic is used to mount the fans to the interior of the case. The bends at the top and bottom of the plastic coolermounting panel are to increase its rigidity. Also shown are the extra ventilation holes in the base. siliconchip.com.au Australia's electronics magazine September 2022  33 and control signals to the main load PCB. Circuit details The main Load circuit is shown in Figs.5 & 6. One power block is highlighted by the blue box; the other is virtually identical. Each Mosfet has its drain current 34 Silicon Chip controlled by an op amp, balancing the setting against the voltage generated across the corresponding 0.02W shunt resistor. Using the Q1 block as an example, the SET_POINT signal from the controller is divided by the 18kW/1kW resistor pair to match the desired voltage across the shunt resistor, which Australia's electronics magazine will reach 0.15V at 7.5A. As the op amp has a high open-loop gain, it controls the gate voltage so that the voltages at the non-inverting input pin and the Mosfet source are equal. The divider resistors are specified as having ±1% tolerances to ensure closely-­matched setpoint voltages for each power block. siliconchip.com.au Fig.5: the Electronic Load circuit, not including the control circuitry which is in Fig.8 (based on a previously published controller design). It has two power blocks similar to Fig.4 (one highlighted in blue), a current sensing circuit, a DAC for current control, an ADC for measurement, thermistor-based temperature sensing, PWM fan speed control using Q5, an on/off latch for the disconnect relay and a simple 5V power supply. In contrast, the shunt resistors are ±5% devices, balancing load sharing accuracy against cost (you could use ±1% if you wanted). Mosfets conduct very little current until the gate-source threshold voltage is reached. For the FQA32N20, this is around 2.5V, but it can vary over the range of 2-4V from batch to batch. siliconchip.com.au Above this voltage, the Mosfet’s ID vs Vgs characteristic is quite sharp (ie, their transconductance is high), rising from a typical 5A at 5V to 18A at 5.5V (see the panel on “Operating Mosfets in linear mode”). The op amp’s gain is a compromise between stability and reaching the Mosfet conduction voltage at the Australia's electronics magazine lowest possible DAC step. A gain of 1000 balances these factors, while the 1nF capacitor across the feedback resistor reduces the gain at high frequencies to enhance stability. The ESP32 controller fine-tunes the current by reading the voltage across the current sense resistor and adjusting the DAC’s setpoint. The minimum September 2022  35 controllable current, and current step, is around 7mA, equal to the maximum current (30A) divided by the number of DAC steps (4095). Each pair of Mosfets shares an INA180 current sense amplifier, which amplifies the average of the voltages across the two shunt resistors and feeds it to the ADC. The Load is unconditionally stable when connected to capacitive sources. A snubber network (capacitor and resistor in series) is connected across the load terminals to maintain stability with inductive sources. Controlling the Load The MCP4725 DAC (IC5) provides a 0-3.3V signal to control the Mosfet’s drain current. The DAC takes its reference voltage from the 3.3V supply rail, which is quite noisy, so L1 and the 100nF capacitor form an LC filter to reduce noise from the DAC output. On/off control of the power block is provided by diodes D1-D4. When their anodes are driven high, the inverting inputs of the op amps are pulled up, forcing the outputs low and so switching off the Mosfets. This is independent of the SET_POINT voltage from the DAC. The microcontroller measures the input terminal voltage and load current to calculate the appropriate setpoint for the constant current, voltage, resistance or power mode selected (see the panel on Controlling an Electronic Load). When the desired setpoint or the source impedance of the device under test (DUT) changes, the controller estimates the required current and sets the DAC accordingly. This estimate assumes that the DUT has a linear voltage-to-current characteristic, which is not always true. So to minimise overshoot while quickly reaching the target value, every 1ms, the setpoint is adjusted by 80% of the remaining gap. There’s a Catch-22 for CR, CV and CP modes: until the Mosfets are on, there is no current reading available to calculate the setpoint. To overcome this, when the On switch is pressed, the DAC is set to deliver a small output current (around 10mA), and successive approximations are made until the desired setpoint is reached, usually within a few iterations. Response time The ADS1115 (IC6) takes around 2.5ms to take voltage and current readings. While in steady-state operation, this loop time is more than adequate for fine control. However, for handling transient conditions, this is not optimal. The ESP32 has several fast 12-bit ADC channels that can make fresh current and voltage readings available each time the control loop iterates (1ms). They are not particularly linear in the top 20% of their ranges, though, and have a minimum input voltage of 150mV. While they are unsuitable for fine control, they are more than adequate for coarse control. To overcome the ESP32 ADC linearity problems, the input voltage presented to the ESP32 is boosted by Fig.6: the ‘daughterboard’ circuit basically duplicates the two load power blocks from Fig.5 and they are connected in parallel to increase its power-handling capabilities. The current sense circuitry is also duplicated and the two boards connect via a ribbon cable between CON2 & CON3 plus a few thick wire links for the high-current paths. 36 Silicon Chip Australia's electronics magazine siliconchip.com.au Controlling an Electronic Load This Electronic Load has four main control modes: constant current (CC), constant voltage (CV), constant resistance (CR) and constant power (CP). As shown in Fig.a, a Mosfet in its linear (or saturated) region translates its gate-source voltage (Vgs) into a relatively constant current. This region is between the gate-source voltage threshold, Vgs(th), and the point where the minimum drain-source resistance, Rds(on), dominates. Therefore, CC mode requires the simplest control arrangement, as in Fig.4. A reference voltage is provided to one input of an op amp, and this is compared with the voltage generated across a current shunt resistor. If the drain current is too low, the gate voltage increases, and vice versa. Because of the nature of the Mosfet described above, the changes in gate voltage in this mode are small. CV mode (Fig.b) has a similar control arrangement with a voltage divider replacing the current shunt, but note that the connections to the op amp are reversed. This is because we want the Mosfet current to increase as the DUT voltage rises. For CR (Fig.c) and CP (Fig.d) modes, both voltage and current feedback are employed in two different combinations. We need the current to change proportionally to the voltage in constant resistance mode, so positive voltage feedback and negative current feedback are applied. For constant power mode, voltage changes should be inversely proportional to current changes, so negative feedback is used for both voltage and current. Analog switches could be used to control the various input combinations, while an analog multiplier circuit could process the current and voltage inputs. But this approach would add significant cost and complexity to the circuit. It is more convenient, though slightly slower, to calculate the required control voltage in software, using ADCs and a DAC to close the control loop. For testing batteries, the CC or CR modes are most often used. The fully charged battery is discharged to a pre-set minimum voltage and the battery’s capacity; with a fixed discharge current, the battery’s capacity in amp-hours or milliamp-hours can be determined solely from the discharge time. The battery’s equivalent series resistance (ESR) can also be calculated, as the test proceeds, by momentarily suspending the discharge process, measuring the difference between the open-­ circuit voltage and the voltage under load and applying Ohm’s Law. Solar cells have a clear knee point in their V-I curve. If the load current increases beyond this point, the cell voltage drops rapidly, as does the delivered power (see Fig.e). The maximum power point for a given illumination level can be easily determined with an electronic load, by monitoring the power delivered as the current is increased. Fig.b: a constant-voltage control loop. The op amp varies the Mosfet’s gate voltage to maintain a fixed drain voltage (if it can). siliconchip.com.au Fig.a: the FQA32N20 Mosfet on-region characteristics, taken from its data sheet. The maximum drain current is substantially proportional to gate voltage after an initial slope determined by Rds(on) and the gate-source threshold voltage, Vgs(th). Fig.e: a typical solar cell V-I curve, which you could plot using this Electronic Load connected to a solar panel in strong sunlight. References 1. Martin, How Electronic Loads Work (http://blog.powerandtest. com/blog/how-electronic-loads-work) 2. Keysight, Electronic Load Fundamentals (www.keysight.com/ au/en/assets/7018-06481/white-papers/5992-3625.pdf) 3. www.pveducation.org/pvcdrom/solar-cell-operation/iv-curve Figs.c & d: CR and CP modes employ both current and voltage feedback in different combinations. Note the need for analog multiplication, rather than summing, at the negative op amp input in both cases. That requires a specialised IC or a reasonably complex discrete circuit. Australia's electronics magazine September 2022  37 current-carrying wires does not affect the reading, as depicted in Fig.7. Without this arrangement, the error could be significant when the Load is sinking several amps. A simple 100kW/1.2kW voltage divider reduces the sense voltage to a level that the ADS1115 ADC can handle, and emitter-follower Q5 buffers this voltage before feeding it to the ESP32 ADC for the reason described above. Any error in the reading due to the divider resistor tolerance and emitter-follower characteristics is cancelled out during the calibration process. Rather than making a ground-­ referenced reading, because both supply wires will have a voltage across them when handling high currents, another ADC channel is used to measure the Vsense− voltage. This is subtracted from the Vsense+ voltage to get the true reading. The main PCBs for the WiFiAdditional isolated banana plug Controlled DC Load are mounted at sockets for voltage sensing test leads the very top of the enclosure. are mounted on the front panel and the base-emitter voltage of voltage-­ connected to the main + and – terfollower PNP transistor Q5. A transis- minals via 100W resistors. While this tor is used, rather than a simple diode, introduces a small error (about 0.2%), to reduce the impact of an additional it ensures that the voltage will be corcurrent load through its emitter resis- rectly sensed when the extra sensing tor on the 100kW/1.2kW input voltage terminals aren’t used. Ideally, they divider. are connected separately to the DUT, So we take advantage of the most forming Kelvin connections. linear portion of its conversion range A 1nF capacitor between Vsense− by shifting the voltage up and using and the common rail provides an AC only the lower part of the ESP32’s 3.3V path for voltage spikes and noise. maximum input voltage. Using this arrangement, tracking Current sensing between the ADS1115 and ESP32 is The design uses two INA180 curwithin 5% for both current and volt- rent sense amplifiers (IC3 & IC4), one age measurements. on each board, to amplify the small voltage across the shunt resistors into Voltage sensing a range more suitable for the ADC. The voltage at the output termi- Each INA180 is shared between two nals is sensed using a separate set Mosfets, with two 1kW resistors proof wires back to CON14 on the PCB, ducing an average of the two shunt so that the voltage drop across the resistor voltages. The resulting average voltage is measured using the ADS1115 standalone ADC’s other input channels. A 10nF capacitor from the junction of the 1kW mixer resistors to ground reduces the noise presented to the ADC without introducing any significant measurement lag. To increase the reading accuracy, we are using the ADS1115 in differential mode with the negative current sensing pin connected to ground near the INA180 current amplifier on each board. Any significant voltage difference between the ground planes of the main and daughter boards will introduce a noticeable error at low currents. For this reason, the two PCB ground planes are wired separately to the negative front panel input terminal and a stout jumper bridges the two ground planes. The ESP32 current-sensing arrangements are the same as those for voltage sensing, using PNP transistors to shift the voltage levels. Calibration To ensure accurate measurements across the entire range of voltage and current, both full-scale and zero calibration points are provided in the software for voltage and current readings. Current readings are automatically re-zeroed every time the Load is disconnected for more than a few seconds. The remaining calibrations are performed via the front panel menu. Calibration settings are saved between sessions. Heat sensing and fan control The thermistor (NTC1) is mounted on one of the Mosfet cases and connected in series with a 10kW resistor across the 3.3V rail. The ESP32 measures the voltage at the junction and calculates the temperature. Fig.7: the voltage sensing scheme uses Kelvin connections. If 10A is flowing through test leads, each with 0.1W resistance, the difference between the voltage at the DUT and the Load’s terminals will be 2V meaning it only sees 10V in this case, rather than the actual value of 12V. With additional sensing leads connected directly to the DUT terminals, if the sensing current is 10μA, even 5W resistance in the leads will only generate 50μV of error, giving a much more accurate reading of 11.9999V. 38 Silicon Chip Australia's electronics magazine siliconchip.com.au Parts List – WiFi-Controlled Programmable DC Load 1 WiFi control board (based on design from May & June 2021; see below for parts list) 1 double-sided PCB coded 04108221, 107 x 81mm 1 double-sided PCB coded 04108222, 67 x 81mm 1 270mm x 210mm x 140mm blue vented metal enclosure [eBay, Banggood, AliExpress] 1 12V DC 1.5A plugpack with centre-positive 2.1mm or 2.5mm ID plug 2 Hyper 103 coolers or similar [eg, www.umart.com.au] 3 120mm fan guards 1 30A relay module, 5V or 12V DC coil (see text) 1 470μH axial inductor (L1) [Altronics L7042A, Jaycar LF1542] 1 10kW lug-mount NTC thermistor (NTC1) [Altronics R4112] 1 2x10-pin IDC box header (CON1) 2 2x5-pin IDC box headers (CON2, CON3) 1 insulated coaxial DC panel socket to suit plugpack (CON4) [Altronics P0629] 1 red 30A binding post (CON5) [Altronics P9210, Jaycar PT0465 or PT0460] 1 black 30A binding post (CON6) [Altronics P9212, Jaycar PT0466 or PT0461] 1 red panel mount safety banana socket (CON7) [Altronics P9266, Jaycar PS0420] 1 black panel mount safety banana socket (CON8) [Altronics P9267, Jaycar PS0421] 2 4-pin PWM fan headers (CON9, CON10) [Molex 47053-1000, Cat SC6071] OR 2 2-pin polarised header (CON11, CON12) for non-PWM fans 1 4-way polarised header and matching plug with pins (CON13) 3 2-way polarised headers and matching plugs with pins (CON14, CON15, CON16) Hardware & wire 1 128 x 200mm sheet of 2mm-thick clear acrylic (front panel) or decal 1 250 x 130mm sheet of 3mm-thick clear acrylic, 5mm ply or aluminium sheet (for CPU cooler mounting) [Silicon Chip SC6514] 8 M4 x 12mm countersunk head screws and nuts (for mounting CPU coolers) 4 M3 x 25mm panhead screws (PCB mounting) 4 M3 x 12mm panhead screws (for mounting Mosfets) 14 M3 x 12mm countersunk screws (switches, TFT etc) 22 M3 hex nuts 4 M3 flat washers (for mounting Mosfets) 8 6mm M3-tapped Nylon spacers 1 1m length of twin 15A hookup cable [Altronics W2188, Jaycar WH3079] 1 1m length of light-duty figure-8 cable (eg, ribbon cable) 1 40cm length of red heavy-duty hookup wire 1 20cm length of blue heavy-duty hookup wire 1 1m length of green heavy-duty hookup wire 2 20-way crimp IDC headers 2 10-way crimp IDC headers 1 15cm length of 20-way ribbon cable 1 10cm length of 10-way ribbon cable 1 10cm length of 7-way ribbon cable (for encoder panel) 1 10cm length of 4-way ribbon cable (for switch panel) 1 small tube of thermal compound 4 35 x 16mm, 9mm-thick spacer blocks (eg, cut from MDF) siliconchip.com.au Semiconductors 2 LM358D dual single-supply op amps, SOIC-8 (IC1, IC2) 2 INA180B4IDBVT current sense amplifiers (B1 variant), SOT-23-5 (IC3, IC4) 1 MCP4725A0T-E/CH 12-bit DAC, SOT-23-6 (IC5) 1 ADS1115IDGS ADC, MSOP-10 (IC6) 1 SN74LVC2G02DCTR dual 2-input NOR gate, SSOP-8 (IC7) 1 CUI VXO7805-1000 5V 1A switching regulator module (REG1) 4 FQA32N20 800V 10A Mosfets, TO-247 (Q1-Q4) 2 BC807C or BC807-40 50V 500mA PNP transistor, SOT-23 (Q5, Q6) 1 SS8050-G 40V 1.5A NPN transistor, SOT-23 (Q7) 5 BAS70, BAS70-04, BAS70-05, BAS70S or BAT70C 70V 200mA schottky diodes, SOT-23 (D1-D5) Capacitors (SMD X7R ceramic, M2012/0805 size unless stated) 2 10μF 16V M3216/1206 size 1 1μF 200V polyester 4 1μF 16V 4 100nF 50V 6 10nF 25V 5 1nF 50V Resistors (SMD M2012/0805 size 1% 1/8W unless stated) 6 1MW 4 100kW 2 47kW 4 18kW 2 10kW 4 2.2kW 1 1.2kW 14 1kW 8 470W 1 820W 1 100kW 1/2W through-hole 2 100W 1/4W through-hole 1 4.7W 1/2W through-hole 4 0.02W 3W 5% wirewound through-hole WiFi control board 1 double-sided PCB coded 18104212, 167.5 x 56mm 1 Espressif ESP32-DEVKITC-compatible WROOM-32 WiFi MCU module [Altronics Z6385A, Jaycar XC3800, NodeMCU-32S] 1 3.5in 480x320 pixel SPI LCD touchscreen with ILI9488 controller [Silicon Chip SC5062] 1 2x10-pin box header (CON2) 2 19-pin header sockets (eg, cut from a 40-pin header) 1 rotary encoder (RE1) [Alps EC12E; Jaycar SR1230] 1 knob for rotary encoder [Altronics H6514 (23mm) or Adafruit 2055 (35mm)] 4 12mm SPST PCB-mount tactile switches with square actuators (S1-S4) [Altronics S1135, Jaycar SP0608] 2 black, white or grey switch caps [Altronics S1138] 1 red switch cap 1 green switch cap 1 10cm length of 6-way ribbon cable 1 10cm length of 4-way ribbon cable Semiconductors 1 7805 5V 1A linear regulator, TO-220 1 5mm green or red LED (LED1) Capacitors 1 47μF 10V X5R/X7R SMD M3226/1210 size 1 10μF 25V X5R/X7R SMD M3226/1210 size 13 100nF 50V X7R SMD M2012/0805 size Resistors (all SMD 1%, 1/10W M2012/0805 size) 3 10kW 2 1.8kW 1 1kW Kit (SC6399) – $85 It includes all the SMDs, the four FQA32N20 Mosfets, four 0.02W 3W resistors and the VXO7805-1000 regulator module. Australia's electronics magazine September 2022  39 If the specified thermistor isn’t available, you can use any 10kW NTC lugmount thermistor, as the temperature reading is also calibrated in software. Once the case temperature reaches 28°C, the fan speed increase beyond idling, reaching full speed at 35°C. If the case temperature exceeds 65°C, the Load disconnects the DUT. Provision has been made for threewire and four-wire CPU cooler fans or 12V DC two-wire fans. Q7 translates the PWM signal into current pulses at around 20kHz for two- and three-wire fans to avoid audible switching noise. If four-wire (PWM) fans are used, NPN transistor Q7 and its base resistor are not required. Q7 dissipates little heat as it operates in switch-mode, so an SS8050 is sufficient to operate two fans up to a total current of 500mA. Protection Protecting an electronic load is somewhat more complicated than a power supply, which mainly needs to be protected against short circuits and any reactive load characteristics that might cause the supply to oscillate. Electronic loads also need to be able to prevent damage when excess or reverse voltages are applied. As well as the microcontroller shutting down the Mosfets when the maximum allowed current or voltage is exceeded, a relay provides a final layer of protection, mainly for the DUT. If a reverse voltage is applied across the Load, the body diodes in the Mosfets will conduct. As the Mosfets are each rated at 32A continuous reverse current and pulses of 128A, huge currents could flow in this case. We take advantage of the fact that the ADS115 can measure voltages to 0.3V below ground. The relay is released when a negative input voltage greater than -0.1V is detected. The relay opens within 10ms, which should prevent damage to the DUT in most cases. A 30A relay module with NO contacts is employed to save on-board real estate. These are available from multiple internet sellers. Parts availability and substitutions We can supply a set of all the SMDs for this project (plus some other useful parts, like the Mosfets and regulator module) as many of them are currently hard to source. We also can supply the ESP-32 module and touchscreen; see the parts list. If you can’t get the ADS1115, if the ADS1015 is available instead, you could use it with a slight loss in reading accuracy. You might find it easier to source an ADS1115 based module and transplant the IC (eg, remove it using hot air). Different versions of the MCP4725, such as the A1, A2 or A3 version, could be used as the software scans all possible I2C address. That address is the only difference between those versions. The DAC7571 is a compatible replacement for the MCP4725, but there’s no guarantee it will be available either. Once again, the easiest way to get one of these chips might be off a prebuilt module. If you can’t get the SN74LVC2G02DCTR, the 74HC2G02DP or 74HCT2G02DP (or any other similar device) can be used instead. 40 Silicon Chip Australia's electronics magazine The contacts on these relays should be more than adequate, as contact ‘make’ will usually occur at zero load as the Mosfets ramp up to the set current, and ‘break’ activity will usually be in concert with the Mosfets switching off. Provision has been made for either 5V or 12V relay modules. A few different types of this module are available; the best kind has fairly large ‘terminal barrier’ style connections for the relay contacts. If a small terminal block is supplied instead, the power wires should be soldered directly to the PCB. As the remote voltage sensing pins are connected on the ‘wrong’ side of the protection relay, schottky diode D5 is connected across the ADC pins such that it is ordinarily reverse-­ biased. This keeps any negative voltage within the acceptable -0.3V limit. As there is a 100kW resistor in series with the diode, a small signal diode suffices to handle the few milliamps of potential current. siliconchip.com.au Fig.8: this control circuit was previously published in the May 2021 issue; the few changes are shown in red. While the original control board can be modified, we have an updated PCB that can be configured with a couple of solder bridges. It includes a simple power supply, ESP32 microcontroller module with WiFi, a colour touchscreen, SD card socket, rotary encoder and pushbuttons, plus a 20-pin DIL header (CON2) that connects to the Load circuit via a ribbon cable. siliconchip.com.au Australia's electronics magazine September 2022  41 Operating Mosfets in linear mode There are some challenges operating power Mosfets in linear mode. Most modern high-power Mosfets are optimised for switch-mode operation, where most of the time, they are fully on or off. This type of operation generates only moderate heat, as the internal resistance of the device in this mode is usually measured in milliohms. 10A through 5mW only generates half a watt of heat. When conducting 10A in linear mode, the dissipation is 10W for every volt across the device. While a Mosfet in a TO-220 package may well be able to handle 30A at a maximum VDS of 200V, it certainly will not be able to dissipate 6000W in lin- Fig.f: typical HEXFET Mosfet device geometry [Ref 2]. This is not the ear mode! As a rule of thumb, TO-220 devices can only type of Mosfet cell structure, handle 50W when closely thermally cou- but it is a fairly common scheme. pled to a large heatsink. TO-247 devices, with double the package footprint, can dissipate at least 75W. So, any design using Mosfets in linear mode will typically be limited by the ability of the package and heatsink to transfer heat away from the chip. The second challenge is that the architecture of most modern Mosfets, which works well for switch-mode operation, has disadvantages for linear operation. Modern Mosfets have multiple FET structures connected in parallel to han- Fig.g: hotspot damage in a Mosfet dle high currents. Close-packed hexagons [Ref 4]. This could cause the entire (Fig.f) or trench matrices are common. device to fail due to an internal Regardless of the structure, the goal is short circuit, but even if it doesn’t, to connect all the small Mosfets in paral- the device performance will certainly degrade. lel, so they operate like one large Mosfet. This is because Mosfet properties don’t scale well, so many small ones perform better than one big one. However, as all cells are not identical, one cell tends to carry the highest current. In the worst case, this can cause such a severe hot spot that the material melts, as shown in Fig.g. Even if the damage to the overall device isn’t catastrophic, after the first cell failure, the next weakest cell will follow and so on, degrading performance. However, if the hot-spot cells can cool between bursts of current, as in switch-mode operation, the possibility of failure is significantly reduced. For linear operation, it is therefore best to significantly de-rate the Mosfet. Early planar devices were better suited to linear operation. While some newer devices are designed for linear operation, they are expensive, and their total dissipation is still limited by their ability to transfer heat from the junction to the case and heatsink. Therefore, we are using four TO-247 general-purpose power Mosfets for this project, operated well below their maximum current and power ratings. References 1. Hüning, F. Using Trench Power Mosfets in Linear Mode. Power Semiconductors magazine 2012, Renesas 2. www.slideserve.com/harlow/mosfet 3. Williams, et al., The trench power Mosfet: Part I - History, technology, and prospects, IEEE Transactions on Electron Devices, March 2017 4. Nexperia Application Note AN11243: “Failure signature of electrical overstress on power Mosfets” 5. OnSemi (Fairchild) Cabiluna, et al., (2013), AN-4161 Practical Considerations of Trench Mosfet Stability when Operating in Linear Mode 42 Silicon Chip Australia's electronics magazine The reverse leakage current of the BAS70 is less than 20nA, small enough not to materially affect voltage measurements. Over-voltage protection for the ADC is provided by setting the ADC’s full-scale sensitivity to 2.048V, leaving a substantial safety margin before the VDD+0.3V absolute maximum is exceeded. This allows us to safely sense voltages up to 260V. Control circuitry The control panel reuses the microcontroller module/touchscreen design from the Hybrid Bench Supply project (May & June 2021, siliconchip.com.au/ Series/364). While the 3.5in touch screen version is preferred, software is also provided for the 2.8in version. Both of these screens are available from the Silicon Chip Online Shop. The circuit of this control board is shown in Fig.8. As this is very slightly different from the one previously published, a revised PCB is available that can suit either project. For this design, we need ADC-­ capable pin IO32 of the ESP32 to go to the CON2 Control header, rather than IO25 as initially designed, because IO25 cannot be used as an analog input. 100nF capacitors have been added from IO25 & IO32 to ground, to stabilise analog voltage readings made using those pins. Enclosure Finding a suitable enclosure was challenging, as the smallest dimension needed to be more than 92mm to fit the CPU coolers. The 270mm x 210mm x 140mm blue metal enclosure we ended up using is available from multiple suppliers on eBay and Ali­ Express, and is a cost-effective solution. It has ventilation slots in the sides and all panels are removable for easy access. While Mini-ITX computer cases could also be employed, few of those we came across had solid front panels on which to mount the control components. Next month In the second and last article in this series, we’ll have the assembly details for all the PCBs as well as the enclosure preparation, mechanical construction and final assembly. We’ll then go over testing, calibrating and using the Electronic Load. SC siliconchip.com.au