Connect external light source A to MEMS optical attenuator unit which was connected by both optical splitter and Signal processing unit. Then connect the optical splitter to both big photosensitive surface PD detection A and attenuated optical output. Between the big photosensitive surface PD detection A and Center MCU is  small-amplitude-signal detected amplification circuit. To connect with central MCU, there are also USB, the signal processing unite,button circuit, PC monitor and big photosensitive surface PD detection B which was connected by external light source B.  The adjustable digital programmable optical attenuator with optical power detection adopts big photosensitive PD. It can detect wavelength from 1260nm to 1630nm. At the same time, the wide dynamic microcurrent transformed by big photosensitive surface PD is amplified by small-amplitude-signal detected amplification circuit. Then slope curve calibration is calculated by Single Chip. Thus, the Optical power attenuation and detection from +10dBm to -45dBm can be implemented.