Go Down

Topic: Conrol the voltage of a buck converter .... (Read 15422 times) previous topic - next topic


Does anyone have any clever methods to modify one of these [url]http://www.ebay.ca/itm/1pcs-1-23V-30V-DC-DC-Buck-Converter-Step-Down-Module-LM2596-Power-Supply-Output-/110950894139?pt=LH_DefaultDomain_0&hash=item19d5304a3b&_uhb=1/url]to be able to control the output voltage from the arduino?

Or maybe there is a better way?


The advert implies that the unit has a controllable output voltage and the only candidate I can see for adjusting it is that screw, on what I'd guess is a multi-turn potentiometer. If that guess is right, perhaps you could replace that potentiometer with a digital potentiometer. Rather than guessing, I suggest you ask the supplier. If they're any good, they'll know or be able to find out.


The typical approach is to apply a voltage to the feedback pin to fake the output.

If you apply a voltage higher than the rated voltage for that pin (3.3v/5v/etc. for fixed output or 1.23v for the adj version), the output voltage will go down. and vice versa.

The relative gain depends on the resistor mix (from  your control pin to feedback pin and from the output to the feedback pin).


Here is the datasheet for the voltage regulator: http://www.ti.com/lit/ds/symlink/lm2596.pdf

Keep in mind that this regulator comes in either various fixed voltage output or an adjustable voltage output. The ebay module you linked too is of course the adjustable version and uses that multiturn pot to set the output voltage. The bottom example in figure 8 shows the adjustable version and the calculation needed for the external voltage divider resistors (in your case one fixed R1, and one adjustable R2). The current requirement to drive the feedback input pins is quite low so that is not a problem, but trying to replace the R2 component with a digital pot IC may run into a voltage limit size as the digital pot would have to be rated to handle the maximum rated output voltage you plan on running the regulator at. Using an arduino to read the output voltage of the module and apply a nominal (but adjustable) 1.23 adjustable voltage (say from a low pass filtered PWM output pin) to the regulator feedback pin might work in theory but I think you would have problems with the low resolution of the standard arduino PWM command (only 256 step values and only a few counts would be in the 'control range' of the module as there is most likely a high 'gain factor'. Also timing might be critical.

So not saying it can't be done (arduino controlling output voltage value of this regulator) but it would be a project for someone with good experience in electronics. Perhaps an arduino controled 'motorized pot' as used in stereo equipment could be used with the motorized pot replacing the blue pot in that module? Of course the motorized pot variable resistor range would have to be of the same ohm range (and have a linear 'taper' Vs 'log taper') as the pot used in the regulator module and you probably would need a second pot 'gang' on the motorized pot to give position feedback to the arduino and of course finally you would need a motor H-drive to power the motor on the pot. Example:


Again not the simplest of projects to take on, put certainly could be a useful one if actually accomplishable with reasonable costs and size.



If you take a look at the LM2596 datasheet at http://www.ti.com/lit/ds/symlink/lm2596.pdf, on page 12 there is a schematic labelled "Adjustable output voltage versions". That board is probably using that design, with R2 replaced by the helical potentiometer. To control the output voltage, I would use a variable voltage applied to pin 4 of the LM2596 through a third resistor. If the control voltage you use is 0 to 5V, then the resistor should be about 3K. You can generate the control voltage from a DAC connected to the Arduino or from a PWM pin and low-pass filter.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


The last suggestion is probably the best offered, I would add that there must be a provision to control the switcher so that when initially powering the device it doesn't come on in an unknown state.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


Thanks for the input guys! So I guess the proper step here is to ask if anyone knows of some proper boards that are set up to be controlled instead of trying to find a hack that would make these cheap boards usable in that manner !

Are there any similar boards designed to be controlled for current/voltage from a micro controller signal?


There's nothing wrong with hacking a low-cost switching regulator, just don't connect anything expensive to the output until you have tested it. The hack I suggested should give a maximum output (as set by the pot on the board) when the control voltage is at 0V, down to a very low voltage or even off when the control voltage is at +5V.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


The blue box looks like one of these to me: http://www.google.com/search?q=multi+turn+cermet&tbm=isch

All you need to do is find out what the pins are connected to and replace it with a digital equivalent.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)


Dec 24, 2014, 12:06 am Last Edit: Dec 24, 2014, 12:06 am by aravinda
I have managed to build a hack.
In my case the R2 needs to be about 17k for 12V.
It will reach 5V (the limit for my digital potentiometer at around 5.6k.
So I use a 5k 128 step and 2 relays to switch through other 6k resistors to keep the wiper voltage under 5V.
Testing it works fine. Have I overlooked something?

I have contacted the manufacturer of the Buck converter (5A) to supply them whithout the manual potentiometer.
It will take a month to get them (I am in Hong Kong).



A digital potentiometer would do the job as well . 


Sorry I forgot to write the word digital potentiometer.

I use a 5k 128 step digital potetiometer. I found new problem with that.
To let the voltage at the wiper not exceed the 5V the digital potentiometer allows at the wiper,
I switch a resistor between the wiper and the pin on the buck. everything works fine but then I discovered a current leak the stronger the higher the Vout gets, o an extent of 0.6A at 13V. As I am a total noob to electronics and read myself into every detail, I am getting stuck here.

An obvious but more complicated and expensive solution would be a digital potentiometer with Vdd 5-15V. I hope it is avoidable as they are not available as DIP.


Mcp41010  / 10k digital pot 8pin dip.


Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter


Dec 25, 2014, 12:06 am Last Edit: Dec 25, 2014, 12:12 am by aravinda
I need one with Vdd allowing at least 15V. This one only 5.5 that is my problem. Max voltage at resistor terminals is Vdd. There is my only problem. I could use THE ad5291, but need it soldered onto an adapter. Has anyone come across another one available as DIP?

I start to believe the cheapest solution is a motor driven potentiometer. Found a 20k multiturn (3600 degrees, 1.25 USD in China) and a cheap servo motor (1.20 USD) and will try.

Go Up