A while back, I built a small solution to measure my 5t rainwater tank. It's a esp8266 running esphome with a waterproof SR04 attached. I'm currently only measuring the first tank as it's near a powerplug. The next tank is about 7m further away. I won't be able to reach it with the SR04 cable (~2m). For a different project, I started experimenting with using Cat6 cables to extend sensor cables (DS18b20 in the other case) which worked really well.
For the SR04, I thought it'd be easiest to mount a small box with the small eletronics board close to the tank and then run the two signal + 5v + gnd back to the main esp8266 by the first tank. I connected each of the twisted pairs to one of the four needed lines (trigger/echo/5v/gnd). For testing, I'm using a Wemos D1 Mini, powered via usb. Now to the problem:
When I connect the wires and start up the Mini, nothing happens. When I start it without the 5v connected (side note, same behavior on the 3.3v pin) connected, it boots up and gives 0cm measurements. If I then plug the 5v in, the measurements are correct.
I'm not particularly knowledgable about electronics. My very amateur reasoning was that the long cable creates a higher-than-spec amp draw which kills the Wemos. Is that correct? What can I do to prevent that? My currently only plan would be to put the 5v behind a mosfet and switch it 'live' only after a few ms after boot.