Pages: [1]   Go Down
Author Topic: ultrasonic sensor noise filter  (Read 1697 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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??? smiley-confuse

 
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 301
Posts: 26240
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

here is code for ping, hope this clears up what i meant about 2, 5 microseconds smiley-lol
Code:
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;
 
}

Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 301
Posts: 26240
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 301
Posts: 26240
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html


* maxbotix.PNG (154.38 KB, 633x239 - viewed 121 times.)
Logged

Pages: [1]   Go Up
Jump to: