Variable Load: Intro

I thought a fun project I could work on while trying to develop my embedded programming skills was a variable load, often used to test power circuits. A variable load is exactly what it sounds like; a load, which the user attaches to the output of a power supply, that can be programmed to act in a couple of different ways. The load I’m designing will primarily function as a constant current load, but I would like to add a couple of other modes as well:

  1. Constant Voltage: this mode probably won’t be used very often, since I’ll mostly be testing constant voltage supplies rather than constant current ones. However, it shouldn’t be too hard to program the load to act this way.
  2. Constant Power: a constant power load will be very helpful when testing switching power supplies whose input voltage can vary. For constant power loads, when the voltage across the load doubles, the current should half.
  3. Constant Resistance: a constant resistance load will be helpful if I just need a big fat resistor, but don’t have that value power resistor on hand. For constant resistance loads, when the voltage across the load doubles, the current should also double, resulting in a four-fold increase in power.

Along with several operating modes, I would like the variable load to display useful information onto an LCD screen, have an interface on it so that a user can change modes and parameters as necessary, and have serial output of some sort for debugging / logging purposes.

My load will be composed of the following components:

  1. Microcontroller: I’ll use the same microcontroller as my stampduino, the ATMEGA32U4. I chose this microcontroller because it has all the peripherals I need (USB, SPI, I2C, UART), as well as general familiarity.
  2. LCD: just a typical I2C controlled LCD display; 16 x 2 characters is probably sufficient.
  3. Interface: I’ll use an encoder, which is a dial with a button built in to it. I recently got a 3D printer which has this interface, and I was impressed with how much you can do with such a simple interface.
  4. Power circuit: I’ll use a power MOSFET driven by an opamp to control the amount of current the load consumes. The opamp will have one of its inputs driven by a DAC, and the current through the load, as well as the voltage across it, will be monitored by an ADC.

A high level diagram of the system is shown below:

Variable load, hardware architecture

A first draft of the power circuit is shown below. Note that it is extremely preliminary.

VADC1 and VADC2 will go into the ADC, while VDAC is the output of the DAC. VADC1 will let the system know the voltage of the input, while VADC2 will let the system know how much current is being consumed by the power transistor, M1. There are a couple of things I’d like to note about this design:

  1. I chose to use a hall effect sensor instead of a current sense resistor, despite the increase in cost and complexity. There are two reasons for this:
    1. The resistor will produce heat. I want to minimize the amount of components that dissipate large amounts of heat since that’ll allow me to minimize the number of heatsinks and simplify the thermal management inside the enclosure for this project. If I use a 1Ω resistor, and the load is consuming 10 A, then the resistor will dissipate 100 W of power! I could use a smaller value resistor, but then it becomes harder to measure the amount of current through the load since the voltage across the resistor will be smaller.
    2. The resistor will have voltage across it. This makes it difficult to test low voltage, high current power supplies. For example, if the current sense resistor is 1 Ω, it would be impossible to draw more than 1 A out of a 1 V supply. If the supply could output up to 10 A, I would not be able to test that.
  2. The opamp is configured for current control rather than voltage control. That is to say, the output of the DAC controls the current through the transistor, not the voltage across it. I chose is configuration because (a) I primarily want this to be a current load, (b) I’ll test more constant voltage supplies than constant current supplies, and (c) I think having better control of the current, rather than the voltage, will make the load less likely to damage the power supply it is connected to. I considered the option of having multiple opamps and multiple transistors, but increasing the number of power transistors (which are fairly expensive) as well as increasing the complexity of the system didn’t seem worth it. The multiple transistors problem compounds with the next point.
  3. The transistor will be dissipating almost all of the heat. Since the heat can get very large (50 W is my goal for now), I can / may have to parallel multiple transistors so that the load is spread out over multiple components. Of course, the transistor(s) will also need a heatsink(s) and a fan.
  4. I’ll probably add a temperature sensor circuit to the system. This will allow me to only turn the fan for the heatsinks on only when the system gets too hot, which makes the load silent at light loads, but it’ll also allow me to create a fail-safe when the transistors overheat. When the microcontroller detects that the transistors are getting too hot, it’ll turn the transistors off, rendering the the load inoperable until the system has cooled down sufficiently. The temperature sensor circuit will produce a voltage proportional to the temperature of the heatsink and will feed this voltage into the ADC.
  5. The ADC and DAC aren’t strictly necessary; the microcontroller has a built-in ADC, and a PWM output that can be made into an analog signal. However, dedicated chips will improve the system’s ability to monitor voltages as well as control the load. Additionally, it gives me more stuff to program for, since a large motivation for me is improving my embedded systems programming skills by getting more experience.

As stated, my goal for this load is 30 V, 5 A and 50 W. I’ll have to see how feasible these numbers are as I flesh out more of the hardware design.

Leave a comment

Design a site like this with WordPress.com
Get started