I am building a NodeMCU-controlled 12 V solenoid. I am hoping to add an emergency backup battery supply, but the emergency backup supply should not power anything but the solenoid. In other words, if the SPDT switch is activated, the solenoid will always open (as long as the switch is active). I have the following circuit diagram:
The "DC Switching Module" referred to in the circuit diagram can be found here.
I have the following questions:
In researching other posts for this question, I found a lot of suggestions to use a relay as a backup power switching circuit instead of the DC switching module linked above. Is swapping out the module with a relay acceptable? What other features is that board providing? (note: I don't need the charging capacity of that board.)
Assuming I use that power switching board, my original plan was to use an 8-cell AA battery holder to provide the 12 V battery backup. The module states that when Vsource > Vbatt, it will attempt to charge the batteries. As the batteries get older and drop slightly below 12 V, what are the repercussions of the module attempting to charge regular AA batteries? Is this something I have to be worried about?
As stated above, I don't want the battery backup to power the nodeMCU or any other electronics if the power goes out, only if the SPDT switch is activated. However, if the switch is activated, is it possible to then power the nodeMCU and "know" that the emergency system has been activated? In other words, if the power goes out, nothing should be powered. If the SPDT switch is activated, the solenoid should open, and the nodeMCU should power up and have an indication that the emergency battery pack was used. My initial idea was to step down the 12 V from the battery to a digital in pin on the nodeMCU, but I don't know how to go about powering the nodeMCU only when the SPDT switch is active.