I'm having problems with powering a 5V relay from my NodeMCU. The relay that I am using is the following 2 channel relay: https://www.amazon.com/dp/B0057OC6D8/ref=cm_sw_su_dp
The NodeMCU is powered via USB, so my understanding is that I can power the relay using the Vin pin (3.3V is not enough to power this relay on its own). The relay ground is connected to NodeMCU ground and I have a pin set up to provide the switching signal.
When I power on the NodeMCU without the relay connected, the Node boots as expected and I can ping its IP. If I then connect the relay power to the Vin pin, the relay fires up and I can control it perfectly.
However, if I power the NodeMCU with the relay already connected, the NodeMCU fails to boot and is unreachable on the network (ie. can't be pinged). In this situation, the NodeMCU and the relay are both unusable until I disconnect the relay and power cycle the Node. The relay is definitely getting power as the led is lit, but it is almost like it is stealing power from the NodeMCU and making it unable to boot.
Wondering if anyone has any ideas on how to make this setup work? A separate power supply or a boost converter might be able to be used, but I'm trying to keep parts as minimal as possible for this application.
Thanks!