Every now and then someone asks on different forums if there is an way to control cheap LM2596 modules with an Arduino or another microcontroller. I decided to demonstrate one solution that might be basic electronics for some, but still many donβt know about.Those buck converters will change the output voltage to make the feedback pin, connected to the output via a voltage divider, become 1.25V or so. If feedback is higher, output gets lower and vice versa. If one changes the ratio of resistors in voltage divider, output voltage will change. This is usually done by turning a trimmer resistor with a screwdriver. That is good enough for many applications where voltage will be set only once, but sometimes there is a need to adjust the output voltage more frequently.
External voltage can pull the feedback pinβs voltage higher or lower when applied to it through a resistor. That would make a summer circuit where output voltage of buck converter and external voltage are inputs and output is junction which connects to the feedback pin connects. That external voltage can be generated with just about any microcontroller. Microcontroller generates PWM signal, which is smoothed with RC low pass filter and then buffered with an operational amplifier configured as a voltage follower. Thanks to Hackadayβs Al Williams for pointing this out: I didnβt remember to mention this clearly enough in the video: Circuit shown in this demonstration needs to have
For more detail:How to control LM2596 buck-converter with microcontrollerΒ