I want to make a battery powered, adjustable SMPS for use in situations when I cannot have an outlet near me, so I would like some more information or suggestions about this topic. The SMPS chip I am basing this off is a LM2733.

The power source would be a LiPo, voltage output 3V to 25V, and at most 500mA.

There are a few ways I think I can control a SMPS chip digitally: one is a digital pot controlled with a MCU via SPI or I2C. A 1024 step pot would give me 20mV stepping, which is more than enough. What I saw in datasheets is that the pots are only able to go up to 5V for the digital resistor. Would that be a limiting factor in such a design? This way seems the simplest and least demanding way from what I see.

Another way would be using a DAC, but I am not sure if it would need to go faster than the switching speed of the SMPS, because in data sheets I always see the voltage dividers before the output capacitor. Problem is that I do not know what the feedback pin wants to see. Does it want the entire ramp up and down from the inductor and compare it to the reference voltage, or does it just find the average voltage of each cycle?

I know it is similar to {this question}, but I'm looking for some more information or discussion.

  • 4
    \$\begingroup\$ I saw a project somewhere where someone just implemented a SMPS with a microcontroller in place of a dedicated chip. If you were up to it the result would be adjustable completely in software. \$\endgroup\$
    – joeforker
    Feb 21, 2011 at 18:40

4 Answers 4


The feedback pin is expecting a DC error voltage, with some usual stuff (ripple, noise, etc.) riding on it. The analog voltage loop is bandwidth-limited so that only useful information is used to determine the duty cycle of the converter.

The easiest way is to use a DAC output and a series resistor to either sink or source amount of current out of / into the FB node. The size of the injection resistor will determine the adjustment range. The FB reference voltage is 1.23V, so as long as the DAC can go above and below that reference, you can control the voltage both up and down.

This is the digital equivalent of having the bottom resistor adjustable.


What about adding several bottom resistors to the feedback divider and switching one of them (or several at once) to ground with an NPN array to switch the output voltage?

EDIT: You should be able to do this with only normal GPIO pins since they really should not see more than 1.23V (the feedback voltage) so they can work as open collector/drain switches.

  • \$\begingroup\$ PS. I would draw a schematic in case I my explanation is not clear enough but I still haven't finished the HTML5 schematic capture tool. ;] Please leave me a comment if you think a schematic would help here. \$\endgroup\$
    – jpc
    Mar 23, 2011 at 21:07

Having read the datasheet I'm going to venture a guess. The chip expects 1.23V at the FB pin when the output is at the desired level. Usually this is set by a resistive divider, but I don't think it will be too much of a problem to generate it with a D/A. However, the 13.3K resistor seems to be important, so I'd leave that there but remove the other resistor that connects to the output voltage and basically replace it with your microcontroller/DAC combo.

I think that all you should have to do is ensure that the output of the DAC is 1.23V when the output voltage is where you want it. To keep things realistic You'll probably want to make the output of the DAC mimic a resistive divider - just divide the output voltage of the SMPS by a magic number that gives you 1.23V at the FB pin when you have the desired output voltage.

You are however right to question how fast you have to update the DAC. While the switching frequency of the SMPS is either 600KHz or 1.6MHz this is NOT the bandwidth of the control loop in the chip. I don't see much in the datasheet about what it is, but it does mention using CF to put a zero in the root-locus at 8KHz. So by wild-guess I'd say try to change your DAC at 10KHz - every 100us if possible.

  • \$\begingroup\$ Put the feedback resistors down first and route (but don't populate) a series resistor in line with the DAC output. Measured the desired/steady state feedback voltage. Then remove the feedback resistors and populate the series DAC resistor with a 0 Ohm, setting the DAC voltage equal to the measured voltage. To change the output voltage, simply add or subtract from the DAC voltage according to the change you want to see. \$\endgroup\$
    – Joel B
    Feb 21, 2011 at 21:40
  • 4
    \$\begingroup\$ This is a bad idea. The FB pin voltage won't be precisely 1.23V, and there's a good chance that you won't be able to keep it stable. A digital pot is a much better choice for this application. \$\endgroup\$ Feb 22, 2011 at 2:03
  • \$\begingroup\$ He asked, I answered. I don't disagree with you - it'd be a fair bit of work to make this happen practically but I don't see any major issues with it theoretically. The only hitch is how they implement the feedback control system in the SMPS. Without being sure what its bandwidth, gain, etc is I imagine it wouldn't be straightforward to do this. \$\endgroup\$
    – AngryEE
    Feb 22, 2011 at 3:06
  • 1
    \$\begingroup\$ Talking about over engineering. You don't want to implement the whole gain loop of the SMPS digitally. You just want to influence or offset it slighty with a digital circuit. Using a DAC and a additional resistor is the easiest way. You're setting the SMPS up in a stable situation , and add the extra resistor to apply an offset. You can calculate how the voltage will divide over all 3 resistors, and how much effect that has on the output voltage. Do some math with superposition... Or simulate it. \$\endgroup\$
    – Hans
    Mar 28, 2011 at 9:49

I'm not sure how committed you are to the LM2733. You may want to look for a chip that provides output voltage control separate from the main feedback path. For example, LT3495. This will let you adjust the voltage without worrying about what you're doing to the stability of the regulator.


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.