I have a Wemos D1 Mini with a relay shield and a HC-SR04P.
I soldered the pin bars on the D1 Mini and the relay, flashed the D1 Mini with Tasmota (faster than coding I guess) and wired everything up:
- Stacked the shield on top of the D1 Mini
- Plugged echo (D6), trigger (D7), vcc (3.3v) and ground (G) from the HC-SR04P to the Relay Shield (stacked with the D1 Mini)
- Configured Tasmota for the said pins (D1 for relay and D6 and D& for HC-SR04P)
And... nothing worked. So I detached the relay shield and grabbed a protoboard and connected everything through there and... it worked. Kinda. I soon found out it was not consistent.
I realised that when I held the d1 mini a certain way, it worked! So I tracked the the problem to the ground female connector on the D1 Mini. When I pressed the male pin so it would touch the enclosing on the inside, it worked fine. So... I broke the ground pin that I had soldered to the relay shield and soldered a cable from the D1 Mini ground pin to the relay shield ground. Things should work now and I sure would be able to connect the female on the relay shield to wire the HC-SR04P ground. But it didn't work.
Not even wiring just HC-SR04P. Nor relay only. So I measured voltage on the pins and things went crazy (for me since I have almost no idea of what I'm doing):
- Checking voltage on the 5V pin gives me a 4.5V read (close enough I guess)
- Checking voltage on 3.3V pin gives me a 3.3V read
- Checking voltage on D1 pin on the board (where relay is connected) gives me 0V most of the times (even if set to LOW or HIGH)
- Why most of the times? One time I had a -2.5V read when pin was LOW. And 0V when pin was HIGH.
- When I connect the HC-SR04P, the 5V goes to ~1.3V, the 3.3V to <1V;
- The VCC pin on the HC-SR04P fluctuates between 0V and 0.2V, with spikes to 1V or something
- D3 and D4 pins are always HIGH
- If I set the relay to D3 or D4 on the D1 Mini, then they are always LOW or always HIGH, although the relay doesn't turn on
I have to admit that I might have connected and disconnected pins while I the board was hooked to USB port on my Mac. Oh and I did tried using a phone charger on the wall just to be sure it wasn't a low current/voltage coming from the notebook, but it didn't work as well.
So my question is... I'm not actually sure. But is it possible that I fried something? Maybe I'm lucky and got a faulty D1 Mini? Is it possible to recover from that? Should that be my second and last project because I'm going crazy trying to make it work?
Thanks in advance.