issue with using stepper motor and US sensor SR04

system has one bipolar stepper motor (5 pin)

Bipolar motors have 4 or 6 connections. 5 connections usually indicates unipolar. Have you verified the coil wiring. Incorrect connections can lead to the symptoms observed.