The traditional constant current source is subject to problems such as low output current accuracy, instability and large size, which can no longer accommodate the needs of the increasingly demanding industrial production. A stable constant current source can enable instruments and equipment to work efficiently, so it bears great significance to study a constant current source with high output accuracy and stability. The system is designed based on incremental (proportion integration differentiation) PID control of the computer numerical control (CNC) constant current source. The microcontroller samples the current output from the constant current source module, compares it with the set current, then calculates and adjusts the pulse width of the pulse width modulation (PMW) by incremental PID algorithm, and thus obtains a constant current. Experiments verified that the design achieves constant current in the range of 200 mA-2000 mA, with a step of 10 mA and high precision.