Can't get this relay to respond (ESP-RFID / Wemos D1 Shield / NodeMCU )

So I’m toying with the suggested relay option that DrZzs talks about in his video at the 3:10 mark to implement a magnetic door lock with the NodeMCU using the ESP-RFID setup from this repo.

I’ve managed to flash the NodeMCU and configure the WIFI and hardware settings such that the RFID tags are detected correctly…so I know that the RFID reader (RC522) and the NodeMCU are working properly.

I’m stuck on the relay part. According to all of the information I’ve found, the relay is supposed to be activated through Pin D1 on the relay shield via the GPIO4 (D2 on the NodeMCU) pin.

When I use the Test button in the Hardware settings in the ESP-RFID web interface, nothing happens.

Since I’m a bit new at this, I’m not certain what I should be doing to troubleshoot the problem.

This is my wiring diagram. Do you see any problems? What’s the basic troubleshooting test to confirm that everything is actually getting the right signals?

Thanks.

Impossible to know without knowing what your relay device is.

I’m fairly sure there should be a common ground between the mcu and relay.

Hope it helps

1 Like

It turns out that the relay in fact needed to be powered and grounded by the NodeMCU itself. I’m not sure how I’m going to solve the next problem, however. I was intending to power the NodeMCU with a 12V power supply on the VIN pin and simultaneously power the magentic door lock from the same wart. I may have to figure out some sort of power step down device that can take a single 12V and drop it to 5V and then wire up both off of the same 120V feed.

something like this ?

Something like that. I’m actually going to be stepping down from 120V, splitting the power, and pulling 5V and 12V to the appropriate devices. So far, everything seems to be working. I’ll do a full report when I get the entire thing up and running.