JSN-SR04T v3.0 inconsistent readings

Issue #63 resolved
Juan Fernando Semaán Lince created an issue

Hi,

I have two kinds of sensors:

  1. AJ-SR04M
  2. JSN-SR04T-V3.0

Using the Single Pin Sketch, Sensor (1) gets consistent readings and works fine. But sensor (2), gets inconsistent readings, I get some times 23 cm and sometimes the real distance which is 200 cm. I thought it was a hardware issue, but all of the JSN-SR04T-V3.0 I bought gave me the same results. Is there something I can do to get good readings?

Thanks.

Comments (3)

  1. Tim Eckel repo owner

    First, I would change the delay between pings from 50ms to 1000ms to see if it’s an echo problem. Next, I would change the MAX_SENSOR_DELAY value in NewPing.h to something like 20000.

    If it still doesn’t work, it’s possible the sensor just isn’t stable when using a single pin. The single pin interface is a bit of a hack, that happens to work on some sensors. You can try to install a 0.1 uf capacitor on the trigger and echo pins of the sensor to see if that increases stability.

    If none of this works, it just means that sensor doesn’t support (at least stably) being used with a single pin.

  2. Log in to comment