The right digital potentiometer to control a Buck and a Boost Converters   - Page 1
Forum section: electronics / projects

author: shamooooot
author_rank: Regular Contributor
timestamp: January 20, 2025, 10:50:45 am
content: Hello guysI have two circuits (a buck and a boost) based on LM2673 powered from 20V power supply, and I would like to control them using a uC preferably through i2c.The output ranges of these circuits should be adjustable with one being ~0 - 18V while the other -18V - ~0.I am thinking of digital potentiometers, but I am not sure how to pick the one with correct parameters.For example how about the MCP45HVX1:https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP45HVX1-Data-Sheet-DS20005304.pdf

author: shamooooot
author_rank: Regular Contributor
timestamp: January 21, 2025, 09:14:41 am
content: Seems like MCP45HV is a good fit, but I learned that I need at least +18V and -18V on the analog voltage supplies to achieve the required range.I will have to invert my 20V source into -20V. The simplest way seems to be a charge pump, but the IC's with this voltage range looks expensive.

author: ledtester
author_rank: Super Contributor
timestamp: January 21, 2025, 09:41:49 am
content: Doing a search for:control a buck converter with a digital potentiometeron electronics.stackexchange.com comes up with discussions like:https://electronics.stackexchange.com/questions/630076/buck-converter-adjustable-output-voltage-using-digital-potentiometerhttps://electronics.stackexchange.com/questions/92995/can-i-use-digital-pots-for-my-feedback-resistors-to-a-buck-boost-regulatorhttps://electronics.stackexchange.com/questions/472588/how-to-replace-a-potentiometer-with-a-digital-solution-in-a-buck-feedback-loop...Common critiques are that the digipot may not operate in the desired voltage range and will also introduce capacitance which will affect stability.A frequently suggested alternative is to use a DAC to inject current into the feedback pin. The DAC could be implemented with PWM from a microcontroller.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 21, 2025, 12:07:43 pm
content: Quote from: ledtester on January 21, 2025, 09:41:49 amThank you very much.I have updated the schematic using DS4432https://www.analog.com/media/en/technical-documentation/data-sheets/DS4432.pdf.My calculations:Vfb= Vout x R0B/(R0A+R0B)R0A= 1.5 x R0BVfb= 1.21VVout= 18VR0A= 13.88 x R0BAssuming R0B= 10K, R0A= 138.8K

author: mtwieg
author_rank: Frequent Contributor
timestamp: January 21, 2025, 01:28:26 pm
content: Injecting current into the feedback network via a DAC is indeed the better approach. But there are some issues with your schematic:First of all, your buckboost converter won't work as shown in your schematic. See AN-1157 for an example of using the LM2673 in a buckboost circuit. This approach means that the FB will usually be negative (with respect to your GND), meaning you can't connect it directly to your DAC (unless that DAC is also reverenced to Vout, or some other interface circuitry is used).Also it looks like your equations show the nominal resistor values to get Vout=18V, but nothing to do with the adjustment range.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 21, 2025, 03:41:22 pm
content: Quote from: mtwieg on January 21, 2025, 01:28:26 pmThank you for the valuable input..I can't seem to find how it can be done with the Buck-boost!, Would feeding the DAC output into an Op-amp shift the voltage?, but then I again need to invert the supply voltage to power the op-amp.Regarding the equations:for Vfb= 1.21 and Vout=18:R0B=0.072 x R0A100uA = IR0B - IR0AWhen I solved the equations on Page 9 of the datasheet I got:R0A=155.5Ω and R0B=11.2Ω

author: PGPG
author_rank: Frequent Contributor
timestamp: January 21, 2025, 05:35:58 pm
content: Quote from: shamooooot on January 20, 2025, 10:50:45 amI suppose they have poor total accuracy while more precise relative accuracy. So I think application should be designed the way to use them as potentiometers and not regulated resistors.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 21, 2025, 07:10:02 pm
content: How about this?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 22, 2025, 02:12:38 am
content: Quote from: shamooooot on January 20, 2025, 10:50:45 amYou should search for best tolerance, and lowest ppm/°C. A 20% pot is not much use for setting voltage.Some have EEPROMs or proms to store a calibrated set point, as a default power-up value, you can then modify.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 22, 2025, 05:20:35 am
content: Quote from: PCB.Wiz on January 22, 2025, 02:12:38 amThank you. Yes as suggested above I switched to DAC..

author: mtwieg
author_rank: Frequent Contributor
timestamp: January 22, 2025, 02:27:21 pm
content: Quote from: shamooooot on January 21, 2025, 03:41:22 pmI don't think there's any simple approach to level-shifting a bidirectional current source.Do you need the positive and negative outputs to have independently set voltages, or is it ok if they "track" each other (meaning they always have equal magnitude but opposite sign). If the latter, I think there are some tricks you can use to simplify things....QuoteThe equations in the datasheet assume you have a nominal Vout (2V in their example), and want to adjust that by some percentage (+/-20% in their example). In your case, the middle of your Vout range is 9V, so you get R0A = 6.438*R0B.To get a +/-9V adjustment range with a DAC current range of +/-100uA, you need R0A = 9V/100uA, so R0A = 90K.Then you calculate R0B = 90K/6.438, so R0B = 13.98K.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 22, 2025, 03:56:48 pm
content: Quote from: mtwieg on January 22, 2025, 02:27:21 pmThank you very much for helping me to understand it..I actually want to control each rail separately, and what I understood is that my circuit won't work for the negative voltage..