Power Supply is probably the most common electronics project you can build.This is a basic design for digital power supply. It was built around 3 main components. Digital potentiometer – MCP4251-502E/P
Briefly about power supply operation: Input voltage 14-16V can be controlled by SW2 from 2.5V to 12V in 1 V steps. Push/release SW2 to cycle through different voltage values. Default voltage is 2.5V.Currently the voltage values are predefined in the software. If a custom voltage is required just change the resistors values in R_Value0, 1.For more details see attached assembly code at the bottom of the page. Output voltage and current are shown on a standard LCD Display.
If 400mA is reached in any voltage range the PIC over current function will shut down the LDO resulting in zero voltage and current and LED will be ON until SW1 is pushed to release it.Future possible improvements. Presently only basic over current capabilities are implemented. The design can be upgraded to include Constant Current\Voltage feature, also instead of cycling through predefined voltage values a keypad can be used to directly enter the voltage value. Digital Power Supply software – Assembly/Hex Ver 1.0.0