How to control LM2596 buck-converter with microcontroller

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 

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter