I have a simple pre-made buck converter that looks something like this:
The output voltage can be easily adjusted, by turning the R2 trimpot, which adjusts the voltage the feedback pin is getting.
What I would like to do, is to take this mechanical way of setting the output voltage and change it to a digital one, where I can set the output voltage I want with something like an Arduino.
My first idea was to simply rip out the R2 trimpot and replace it with a digital potentiometer, but this turned out to be a no-go, since the digital pots I have (and most cheap digi pots I have seen) have voltage limits of around 0 – 5V, and I will be outputting voltages between 1.2 – 23V (The power source feeding the buck is 24V)
My second idea would be to somehow use an op amp to replace the R2 trimpot, but I have not been able to figure out how to go about this.
What would be some simple way to achieve my goal?
Best Answer
Put the digipot in R1's position. The max normal voltage seen at the FB pin will only be +1.25 volts so a 5 volt device will be fine. However, there might be fault circumstances when this might rise above 5 volts so put a zener diode across that point.
The other end of the digipot will be at 0 volts so this is another advantage. However, a digipot will introduce capacitance that may cause ringing in the regulator's output voltage and this might require you to have a small capacitor across R2 (about 47 pF).
You should also consider that using a digipot as a rheostat has two disadvantages: -