I bought an ultrasonic distance transducer but I'm having issue using it.
The exact model is this one: https://it.aliexpress.com/item/1005006814323837.htm and it's called JSN-SR04T / AJ-SR04M
I'm using an ESP32 and EspHome.
I started with an LM7805 for power supply (down from 11.2V), esp has an external switching power supply.
The problem is that with default settings (trig with 20us) only 1 of 10 triggers are followed by a response.
Most of times when triggered the module remains silent.
Good trigger:
Bad trigger:
Trig chan was first connected directly but having problem I tried with a 2N7000 with a 10k Pull up to 5V to ensure a clean 5V signal instead of a 3.3V. No differences
Echo is read from ESP32 with a voltage divider 2k-1k
After many tests I increased the pulse for trigger to 80us increasing the good response to ~80%, or to 120us to have ~100%.
Is that something known? Also checking amazon or other revies I can see many people founding the same problem, is there a better solution than mine?
For next applications I also would know:
is 3.3V enough to trigger the board?
can I read the 5V from an ESP32 with a 10k input resistance? (1.7mA is not much)
Thanks