Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Master-Slave Current Regulator

  1. Dec 18, 2009 #1
    Yeah I know the title sounds strange. But here is my situation:

    I have a circuit that is powered by the USB port (Max 500mA Draw @ 5V). On my circuit board is divided into two sections, one that contains the digital logic and other stuff which i estimate can draw up to 200mA worse case scenario. The second section consists of a battery charging circuit which is meant to charge up the boards two NiMH AA battery cells.

    The trick here is that I want to see if it is possible to balance the current between the two circuits so that whatever current is not being used by the main circuit can be used by the battery charger circuit to speed up the charging time. So for example, if the main circuit is only drawing 50mA then the battery charger should be current-limited to 450mA. But if the circuit load rises to 100mA, then the battery charger current limit drops to 400mA. So the sum-total is always 500mA (assuming that the battery is in need of charging of course).

    To make things even more tricky, I wanted to see if I could pull this off with some kind of switched-mode current regulator scheme. So far though, I have been looking around for example circuits to show a simple switched-mode current limit circuit (I don't want to use linear regulators to keep the heat to a minimum).

    Assuming that I can find the current limit circuit, my rationale is to use op-amps or something to measure the current draw from each section and somehow throttle the current limit value on the battery charger up or down depending on what that main circuit current is doing. However, finding the least ridiculous way to implement this is what has me hung up at the moment. What do you all think?

    Worse case scenario, I can just lock the battery charge current in at 300mA and be done with it but I'm expecting that the rest of the circuit would draw much less than 200mA in normal operation....

    Jason O
  2. jcsd
  3. Dec 18, 2009 #2


    User Avatar

    Staff: Mentor

    Sounds pretty challenging. How much do you expect the current for the digital section to vary? How often? At what rate? Can you predict the current draw of the digital section based on what it is doing, or do you need to actually measure its current draw? What voltages are you using in the digital section, and what voltage range will be used in the battery charging?
  4. Dec 18, 2009 #3
    Also depends whether you emulate a voltage source for one part of the circuit and a current source for another - like the charger.

    Then each power source would need a control line. In case of a voltage source, some sort of flyback current limiter, and in case of a current source - a programmable current mirror of some type.

    Once you have this in place, an analog way of balancing the current (master-slave) would require a making detailed feedback control diagram, and model its behavior to optimize the performance.
  5. Dec 18, 2009 #4
    Hi berkeman,

    In normal operation I don't expect the digital section to draw more then 200mA from the battery. The circuit is a kind of pulse generator and the 200mA can be pulled if the outputs are directly shorted. However, varying loads can be placed on it so it could vary anywhere within that range depending on what the user has connected to it. The input batteries are two 1.2V NiMH AAs in series so the input to the circuit is 2.4V. The voltage is then stepped up to about 30V to power the output circuit but the current draw measurements I'm mentioning are seen as being drawn from the battery.

    As far as measuring goes, I have been giving this some thought and if I were to do that, I would likely use a shunt resistor and measure it with an op-amp or something. I wouldn't expect there to be any HF variations in the input current other than the user varying the load or shorting the output, so generally speaking, I could look at the current variation as being DC for the most part. To charge the battery, I'll be using the 5V from the USB line when it is plugged into the circuit.

    So in summary, when the circuit is disconnected from the USB line, it draws power from the two AA batteries (2.4V) and that goes into the DC-DC converter circuit to be stepped up. When the USB is plugged in, the battery is disconnected from the DC-DC converter and the battery charger is activated being powered from the 5V USB power. The 5V also goes to the DC-DC converter to drive the circuit but (ideally), I would like to somehow throttle the battery charge current depending on the draw from the DC-DC converter.

    Hope this helps :smile:

    Jason O
  6. Dec 18, 2009 #5
    Hi waht,

    Yeah I'm getting the feeling that is what It will take to make this work. After looking at this in greater detail, I'm beginning to think that I may be way over-complicating things for what I want to accomplish, :tongue:. Though it would be great for the learning experience. I'll actually be taking Feedback control systems this spring so it should be interesting to see how these systems interact and how to properly design them.

    I guess for now I'll just set the battery charge current to a fixed value (300mA) but now that raises a new problem for me (actually, I think I would have had the same problem before). WHat is the best way to limit the current without using a linear regulator? The DC-DC converter IC I'm using (LT1949) doesn't seem to have a way to directly set the current limit on the output so I'm trying to think of a way to accomplish this efficiently... Are there any switched mode current regulator ICs out there? I've been looking but most of what I have found so far are just DC-DC converter type stuff, which were for stepping up or down voltage but not just regulating.

    Jason O
  7. Dec 18, 2009 #6


    User Avatar

    Staff: Mentor

    Use a current-mode buck DC-DC converter. You sense the current in a low-side resistor below what you are driving (in your case the batteries). It is used commonly for LED drive, since that is current-based:

    http://www.national.com/pf/LM/LM3424.html#Overview [Broken]

    Although, I guess you'd prefer a high-side sense, so that the batteries can be solidly ground-referenced... You can use cycle-by-cycle high-side current limiting instead -- that's pretty commonly used in DC-DC converters anyway. The cheap way is to use a sense resistor before the buck switch transistor (in its collector path), and have the voltage across the resistor peak at a diode drop, which turns on a cycle-ending transistor arrangement. A better way (less temperature dependent) would use a comparator to monitor the voltage across the collector sense resistor, and have the output of the comparator turn off each cycle of the DC-DC.
    Last edited by a moderator: May 4, 2017
  8. Dec 20, 2009 #7
    Hi Berkeman,

    Thanks for the info. :-)

    - Jason O
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook