I would like to build DIY linear bench power supply, with adjustable, regulated output voltage and current limiting functions. The voltage and current regulation will be implemented using analog feedback loops. The functionality of the device requires sensing of the output current in order to:

  1. Use it in feedback loop to limit current
  2. Measure output current

Since whole this is to be controlled by microcontroller (voltage and current limit setting, measurement) it means that I need to generate voltage with respect to ground proportional to the current (or not?).

One of the possible solution is to implement high side current sensing using resistor (it is preferable solution due to protection against accidental shorts compering to low side sensing). Examples of the high (and low) sensing circuits can be found in nice app note from microchip.

I am hesitating to use any of the provided solution as that would mean placing two opamps in cascade (opamp for control + current sensing) which may be an issue for circuit stability. Do you have other ideas how high side current sensing could be implemented and be suitable for both analog control and measurement (does not have to be the same circuit)?

  • \$\begingroup\$ Perhaps edit the question to include why it must be high-side sensing as opposed to using a shunt in the common return? \$\endgroup\$
    – akohlsmith
    Oct 5, 2010 at 19:06
  • \$\begingroup\$ @Andrew, the idea is to protect against accidental shorts where the return path is different then return path to the supply (for example to shielding, through me to earth etc.) \$\endgroup\$ Oct 5, 2010 at 19:49
  • \$\begingroup\$ What power supply voltage / current range? \$\endgroup\$
    – Jason S
    Oct 5, 2010 at 22:37
  • 1
    \$\begingroup\$ @Jason, 0-30V and 0-1A \$\endgroup\$ Oct 6, 2010 at 5:11

2 Answers 2


For a linear supply i would recommend using a foldback current limiting scheme, especially on something that has a tendency to be shorted/over driven as often as a bench supply. Theres lots of ways to do this and how you do it will be based on the linear regulator design. That being said googling for 'foldback current limiting' especially on google books should give you all the information you need.

For current measurement, you can go high side or low side, whatever you want. The reason to avoid low side is generally to avoid increasing resistance to ground. The small sense resistor you use probably wouldn't matter much in a bench supply. The easiest way to implement this is to use a custom made IC. Such as the MAX4173 there are lots of manufacturers for these though, look around for the one that best fits your needs/cost/package. There are also some that output PWM which can be more accurate to work with than the ADC on most cheap microcontrollers. You just measure the pulse width using a timer and usually either a pin with external interrupt or a comparator input.

  • \$\begingroup\$ Ouch.. no way. Foldback is something I'd never wish for a lab PSU. What is really desiderable is a nice rectangular I/V characteristic so I can use it both as voltage and current source. Heating up issue addressed by foldback is really no concern, lab environment is nearly always attended. \$\endgroup\$
    – carloc
    Dec 13, 2017 at 8:01

The most simple solution is to use a differential amplifier stage across your high side resistor to measure the current, and measure that value with your microcontroller. You could much more easily add a second stage, probably, to your power supply to make a current limit.

If you already have a regulating transistor in place, you can probably make a little comperator that compares your set current (a reference voltage) against the measured voltage (representing your current). If you include that in the feedback loop of your power supply, it should regulate rather easily.

I wouldn't do low-side sensing because that makes your ground not fixed (i.e. if you draw 2A, the ground potential shifts when the current drops). Also, if the ground terminal is shorted with a low-side resistor in place, the power supply has not current limit set. This could unbalance your load.

I would also stay with an analog regulation; analog electronics are much easier to set up (it's a few resistors and opamps, maybe a few caps required) instead of a proccesor + some kind of PI regulator.

  • \$\begingroup\$ I was thinking the same thing. An Instrumentation Amplifier would be a good type of Differential Amplifier to look at. The designer needs to make certain that the amplifier has enough common mode rejection (CMMR), and that the device supports the common mode voltage of your hide side. e.g. If you are on a 24V high side, your maximum common mode voltage of the amplifier should be at least 24V, and the rejection capability should be such that very little of the 24V creeps through to offset the output. \$\endgroup\$
    – Fuzz
    Oct 6, 2010 at 4:16
  • \$\begingroup\$ hard limiting a linear supply is usually not a good idea, especially for a hobby project. The result will be the current limit being held at the max for the linear regulator which if proper thermal conditions are not met (usually the norm for hobby projects) the linear regulator will cook at max power dissipation. \$\endgroup\$
    – Mark
    Oct 6, 2010 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.