LM2596 - SMPS buck converter - adjust ouput voltage with PWM

Hello,

It may be not possible but I have a theory.

LM2596-ADJ ICs have a voltage divider on the output to get the desired output voltage. What if PWM pin of arduino is connected (galvanically separated by opto-isolator or something else) and changing the duty cycle initially by POT (for testing) and then via code and in effect changing the voltage at the divider and thus at the feedback pin.

I may be way out but it’s just a theory, experienced members can comment and guide more on this.

What I am not sure about is what is the range of the voltage at the feedback pin and can we map the same on the arduino with reference to the duty cycle (0% is min Volt of reference pin and 100% is max V of ref pin)?

LM2596 Datasheet

Please explain what you are trying to achieve.

wolframore:
Please explain what you are trying to achieve.

I am trying to get variable PWM signal and thus changing the output voltage to be used as MPPT solar charge controller.

LM2596 is essentially a switching buck converter with variable output as per the manual pot which what i understand is basically a voltage divider. Thus if we can achieve the same voltage divider effect via PWM pin then we can get rid of the manual POT and do the same with arduino digitally.

Thus if we can achieve the same voltage divider effect via PWM pin

You can’t. The whole point about that pot is that it feeds back a proportion of the output back to the input to achieve control. It is not just supplying a simple voltage.

You might be able to use a digital pot but with those you need a supply voltage to it that is at lease equal to the voltages it will see.

Switching regulators are very hard to design, you can not use a bread board and are super critical on layout and on component specification.

puneet1984:
Hello,

It may be not possible but I have a theory.

LM2596-ADJ ICs have a voltage divider on the output to get the desired output voltage. What if PWM pin of arduino is connected (galvanically separated by opto-isolator or something else) and changing the duty cycle initially by POT (for testing) and then via code and in effect changing the voltage at the divider and thus at the feedback pin.

Its way out. That's a tight feedback loop that has to be just right for stable operation of the chip, and free from
noise.

It might be possible to use a digital pot to control it, but you'd have to be careful about adding
too much stray capacitance into a critical part of the circuit.

If you want a voltage controlled SMPS, you'll need a chip that supports it.

If you are trying to make an MPPT type controller, a conventional buck converter is not what you want.
Normal buck converters are designed to provide a stable output voltage regardless of what the input voltage is , and to do this they provide a tight feedback loop between the output voltage and the comparator in the switcher.
A MPPT type controller isnt designed to provide a stable output voltage, but is designed to provide a variable load to match the peak power point of a solar panel as its shifts around with varying levels of illumination.
To do this , you need part of the circuitry of a buck converter, but not all of it , and some additional circuitry to measure input power to the controller, usually a current sensor of some kind and voltage sensor.
The aim of the exercise is to continuously monitor the input power to keep it as high as possible, and there are various algorithms that do this .

There was a very good Arduino based MPPT charger around some years ago by Tim Nolan, which shows the basics of how to build one .
Try a search in this forums and you may find the details.