In the robot research field, ultrasonic sensors have been highly employed for a long time. However, the sensors have used in the limited applications for near distance measuring, because ultrasonic sensor has some following limitations: low sampling rate, short detection range, and vulnerable to environmental noise. To overcome these limitations, the goal of this research is proposing new operating algorithm for ultrasonic sensors and examining the algorithm in real time by comparing with the conventional algorithm. The proposed algorithm can improve sampling rate of ultrasonic sensor highly. As a result, signal to noise ratio (SNR) is enhanced largely and detection range also becomes longer compared to conventional operating algorithm.