Large aperture ground-based segmented telescopes typically use electrical edge sensors to detect co-phase errors. However, complex observing environments can lead to zero-point drift of the edge sensors, making it challenging to maintain the long-term co-phase of the segmented primary mirror using only edge sensors. Therefore, employing optical piston error detection methods for short-term calibration of edge sensors can address the issue of zero-point drift in the sensors. However, atmospheric turbulence can affect calibration accuracy based on the observational target. To achieve high-precision calibration of electrical edge sensors, this study investigates the impact of atmospheric turbulence on optical piston error detection. Based on simulated results, it is found that the actual measured piston error in the presence of atmospheric turbulence is the difference between the average phases of the two segments. Subsequently, optical piston error detection experiments were conducted in a segmented mirror system under simulated turbulent conditions with varying turbulence intensities. Experimental studies have shown that the detection accuracy of the optical method is almost the same as without turbulence when using a detection aperture size that is 0.82 times the atmospheric coherence length and an exposure time of at least 40 ms. The root mean square of the cross-calibration is better than 3nm. These experimental results indicate that under conditions of good atmospheric seeing, the optical piston error detection method can meet the short-term calibration requirements of edge sensors by setting reasonable detection area size and exposure time. It may even be possible to directly use optical detection methods to replace edge sensors for real-time detection of piston errors.