I wanted a second try on my bench power supply build, something that would allow me to programmatically control the output voltage via an 'Arduino'. The supply already has two buck converters inside the unit, both controlled by their feedback resistors, so it was only natural to try to create a programmable resistor. Resolution The feedback resistors are in the potentiometer with ranges a few kiloohms. Since I'd like the output voltage to vary within 0 and 30V with a 50mV precision the needed resolution is 30/0.05 = 600 steps. That means a way to vary the output with 10 bits (1024 steps). A cheap 8-bit DAC ( PCF8591 ) would provide a resolution of only ~120mV. We should not confuse resolution and precision, but I will break the rules for now. Why a DAC does not work Third, just a DAC is not sufficient as we need to have the feedback voltage adapt to the output voltage. We could feed the input through and ADC, sample it, calculate and output the correct DAC value ...
Electronics and programming interspersed at various levels of difficulty.