Shop OBEX P1 Docs P2 Docs Learn Events
28041 PING Laser sensor — Parallax Forums

28041 PING Laser sensor

BIKRBIKR Posts: 3
edited 2020-07-09 23:56 in BASIC Stamp
Hi,
I am using the PING Laser sensor 28041 on a BS2 and am having some odd fluctuation in the time signal returned. It varies from 1181 to 1404 (approximately) with a static setup, no movement. Do I need to do averaging of a number of data points to get a stable response (would this be accurate, I doubt it) or is there something else I should be doing to get a stable signal? The Ping ultrasonic sensor returns a rock solid signal using the standard Parallax Ping Test program (copy below), same program is used for both sensors.

Thanks for looking at this,
Bob
' {$STAMP BS2}
' {$PBASIC 2.5}

time VAR Word

DO
  PULSOUT 15, 5
  PULSIN 15, 1, time

  DEBUG HOME, "time = ", DEC5 time

  PAUSE 250

LOOP

Comments

  • Check the signal with your scope if you have one. Could be the reflective surface, distance, color etc.. Spec. sheet list -/+ 15% accuracy at short range.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2020-08-08 17:27
    Take a look at this thread, laser-ping-2m-rangefinder-how-dust-luminosity-and-vibration-affect-measurements. I posted data collected at 240mm, where I found a spread of 7.5% (232 to 252) from the lowest to highest reading. That is half of the 15% you reported. The standard deviation and quartiles were much tighter, 2mm spread, so averaging/filtering definitely improved the result. The thread gets into strategies for the math.
Sign In or Register to comment.