ultrasonic sensor noise filter

so my ultrasonic rangefinder "pin11" is sending off a ping every 2, 5 microseconds like most ping codes. The thing is it is set if off the reverse signal on 2nd motor on motor controller board "pin7,6" every time it sends a ping signal. Is there a way to filter out noise coming from ultrasonic sensor ( i.e. resistor,capacitor) or something??? :~

so my ultrasonic rangefinder "pin11" is sending off a ping every 2, 5 microseconds like most ping codes.

The period of a 40kHz signal is 25 microseconds, so a 2.5 microsecond ping is not "like most ping codes", which often consist of bursts of around 8 full cycles (200 microseconds), plus transducer ringing.

Can you explain (with code and diagrams if necessary) your problem?

here is code for ping, hope this clears up what i meant about 2, 5 microseconds XD

long ping(){                                     
  
  // Send out PING))) signal pulse
  pinMode(ultraSoundSignal, OUTPUT);
  digitalWrite(ultraSoundSignal, LOW);
  delayMicroseconds(2);------------------------------->this is what i was referring too
  digitalWrite(ultraSoundSignal, HIGH);
  delayMicroseconds(5);----------------------------->this is what i was referring too
  digitalWrite(ultraSoundSignal, LOW);
 
  //Get duration it takes to receive echo
  pinMode(ultraSoundSignal, INPUT);
  duration = pulseIn(ultraSoundSignal, HIGH);
 
  //Convert duration into distance
  return duration / 29 / 2;
  
}

Ah!
OK, yes, some decoupling is probably in order.
Most likely, it isn't the pulse that causes the problem, but what the pulse initiates ie. the extra current draw caused by the ping transmitting.
You could try a 10V 100uF across the supply pins of the ping.

when you say supply pins are you referring to power supply pins to the ping device

Yes - the cap will be polarised, so be careful.
If you haven't got a 10V, a 16 or 25V will do.

Here is a schematic that Maxbotix suggests. I assume that it would work for a Parallax or other ultrasonic sensor as well. Here is a page that Grumpy_Mike supplied on a similar topic:De-coupling

maxbotix.PNG