I was building a Arduino toy car which looks like this
and below is the motor shield I am using
The ultrasonic sensors work just fine when the motor is turned off. However, they start to receive duration around 0.05 when the motors starts turning. The problem stil remained when I tried isolate the arduino UNO from the motors (i.e. lifting the UNO with my hands).
The manual of the motor shield says that the pins that are free are all the analog pins and pin 2, 9, 10, 13.
I really have no idea how is this happening. Please help!