Can't get ultrasonic distance sensor to work SR04M-2

I bought a few of these units a while back and just can’t figure out how to use them. I think I have the esphome config correct because the LED on the sensor board changes to rapid flashing from solid when I flash the config. But I never get any readings. My boards do not have any area where it looks like I should put a resistor. I have swapped TX and RX just to make sure I didn’t have it backwards Are these just junk boards?


uart:
  id: uart_bus  
  tx_pin: 26
  rx_pin: 27
  baud_rate: 9600



sensor:
  - platform: jsn_sr04t
    name: "Oil Tank Level"
    update_interval: 1s
    uart_id: uart_bus

If you don’t have pads, post image of your module

I definitely don’t have anything labeled with the R19. I’ll get some good pictures.

It doesn’t have to be labeled…


120k or 47k

I’ll give it a shot. Documentation on these is not great. I can’t believe they expect you to solder on this. I’m not even sure I have a soldering iron

I agree, many models and versions around…

You can give it a try with default mode (pulse/echo) without soldering. With this component:

I tried that initially. It did not work

In theory it should… :wink:

#uart:
#  id: uart_bus  
#  tx_pin: 26
#  rx_pin: 27
#  baud_rate: 9600


sensor:
  - platform: ultrasonic
    trigger_pin: 27
    echo_pin: 26
    name: "Oil Tank Level"
#sensor:
#  - platform: jsn_sr04t
#    name: "Oil Tank Level"
#    update_interval: 1s
#    uart_id: uart_bus

I tried reversing TX and RX also

What exact esp board? Point it to flat wall at 1m distance.
What you get on logs?

Are you powering the sensor at 3V3 or 5V? If 5V, do you use level shifter?

[09:02:16.675][D][ultrasonic.sensor:035]: ‘Oil Tank Level’ - Distance measurement timed out!
[09:02:16.675][D][sensor:133]: ‘Oil Tank Level’: Sending state nan m with 2 decimals of accuracy

I think it is on 3.3v. This is just a generic ESP32 from aliexpress.

sensor:
  - platform: ultrasonic
    trigger_pin: 27
    echo_pin: 26
    name: "Oil Tank Level"
    timeout: 4m
    update_interval: 5s

Those sensors are designed to be powered at 5V, 3.3V might/might not work…

So I did confirm it is on 5v. I ordered resistors and a soldering iron. I am having zero luck getting the solder to stick. I have never had any success soldering anything electrical. Is there a solution that does not involve soldering? Do I need a new board? The sensor itself is already epoxied in so it has to be compatible with that.