Digitally programmable switching PSU - Page 1
Forum section: electronics / projects

author: bogdan2014
author_rank: Regular Contributor
timestamp: September 23, 2019, 06:25:55 am
content: Greetings,I'm building a programmable switching lab PSU that uses an MCU and has input for voltage, current, mode selection (CC/CV) and an LCD display.Since I'm not that comfortable with digital electronics, I'm looking for the best way to implement this (in terms of precision and stability).Options are:- a buck converter with a dedicated control chip (analog) and an MCU that measures the output (voltage and current) with an ADC and drives the feedback pin of the control chip. It also handles inputs and LCD.- same as before, but using a digital pot in the voltage feedback section, and another one for the current threshold- an MCU that generates a complementary PWM signal that drives the buck power section. It measures the output and controls the PWM accordingly. It will also have to handle inputs and LCD, but I'm concerned that those might cause delays in the control loop.The output limits are irrelevant since it could be scaled up to whatever voltage and current I need. However, precision should be at least 10mV and maybe 10mA, so I'm guessing a 10bit DAC would cover it.

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: September 23, 2019, 06:22:44 pm
content: Some high-end digital gear implements digital voltage selection by injecting current into the feedback node of a four-terminal regulator of your choice, reducing the current required through the upper resistor in the feedback divider to develop the nominal feedback voltage across the lower resistor, negatively offsetting the output voltage. See the LM10010 for a concrete example, but any old current-sourcing DAC would do. It's especially nice for a bench-type supply because you can push the output voltage below the reference voltage of the regulator if desired. Current limits can be handled by the usual current sensor and error amplifier, pushing but not pulling the feedback node when output current exceeds the limit.Electrical stability, over long time, starts with thermal stability and therefore with minimizing power dissipation. You've got the right idea by using a switching topology. The Hall-sensor-based ACS723 is worth a look, as it is electrically isolated and has sub-milliohm resistance in the measurement path, but its output is ratiometric so you will need a well-regulated auxiliary supply of 5V to feed it and to generate any other reference voltages of interest. For loop stability, you will also need to account for the ACS723's mediocre response time (microseconds). Alternatively, you could use the usual current sense resistor and amplifier arrangement, which solves the ratiometry problem, but you will need to weigh thermal imbalance on your control board against noise pickup when positioning the current sense resistor and the amplifier.I don't recommend options 1 and 2 because they will be slow, as you noted in option 3, and prone to overshoot or worse in the event of fast load variations. Option 3, ironically, is the least bad of the lot, iff your ADC and MCU are fast enough AND your design rules allow for some sort of preemption of the UI code for things that are actually important. Even mere interrupts on a timer are enough. Note that integrated buck converters provide a lot of neat protection features like switch overcurrent protection and temperature monitoring, which you would need to implement yourself, and which may require special features of the microcontroller.

author: chickenHeadKnob
author_rank: Super Contributor
timestamp: September 23, 2019, 08:45:22 pm
content: ST micro has this:https://www.st.com/en/evaluation-tools/32f3348discovery.htmlinexpensive Discovery board.I can't vouch for how good (or bad) it is but they do provide some sample code, and it appears to be something like what you are looking for.