The main purpose of this study is completed, "Alter the Pulse Width charging to battery for energy storage by using Microcontroller," this system comprises a buck converter circuit, a pulse width modulation circuit and the battery of Boston; the main purpose of it is change the charging form according to the battery capacity in order to prevent overcharging the battery to shorten the battery life, the system uses a step-down DC to DC converter, and use the PWM signal conducted by microcontroller of Arduino UNO and enhanced pulse voltage by photocoupler IC of PC923, reaches the charge control of system. Finally, this study use the modify code by the microcontroller to alter PWM signal cycle for the battery charge piecewise management.