This paper presents the design of a microcontroller controlled buck-boost DC-to-DC power converter system. The system contains two major subsystems, a Zeta type buck-boost power converter and a control unit and it contains two control loops. The inner-loop is a voltage regulator based on a Zeta type buck-boost converter. The outer-loop is for voltage and current regulation. The voltage/current regulation is achieved by controlling a light dependent resistor from the control unit. Computer simulations based on a MATLAB/SIMULINK model were successfully conducted to verify the design. In addition, a prototype system was built and successfully tested for a Li-ion battery charging application.