Microcontrollers Arduino Uno and Arduino Due were used to design and construct a gradient control system. These controlled circuits were given digitally signals for selection gradient, frequency encoding gradient and phase encoding gradient. The controlled parameters were performed with Visual C#, a user interface program. Signal levels were adjusted by a digital potentiometer, and converted to analog signals. Both positive and negative signals for those gradients could be produced by a differential amplifier circuits. The output signals were corresponding the designed signals.