Controlling TIP120 Switch from both Arduino and NodeMCU

Hello, amazing people.

I have built an arduino based keypad lock that uses a TIP 120 transistor switch to activate a solenoid lock if the correct combination is entered.

I want to add WiFi control to it as a fail-safe so if the user forgets his PIN, he can unlock using his phone. For this, I plan to use a NodeMCU as AP to set a pin high or low wirelessly. I want to connect that pin to the same TIP 120 I am using with the arduino so the transistor switch can be activated (and the lock be unlocked) with both the NodeMCU and the Arduino.

But when I connect that NodeMCU pin to the base of the TIP 120, the lock does not unlock even on entering the correct combination. Will using a diode on both the arduino and NodeMCU pin solve the problem?

Kindly guide me about what I'm doing wrong.

TL;DR: How to control a TIP 120 transistor switch from two microcontrollers so that it can be activated by either of them independent of the other?

Hope I am clear. Thanks a ton.

Yes, you can make a logical "OR" with a pair of diodes.

I want to add WiFi control to it as a fail-safe so if the user forgets his PIN, he can unlock using his phone

Do you have a way of handling a power failure/dead battery, or other electrical/mechanical failure?

You could ofcourse replace the Arduino with the NodeMCU (and a keyboard port expander).
Leo..

TIP120 is a Darlington transistor and needs at least 1.5-2.5V on the base so driving it from a 5V MCU to a 3.3V MCU you would likely have to lower the base-drive resistor. I would guess under 470 ohms for a medium current solenoid under 2A.

You can make an OR gate with two Schottky diodes from the two MCU's and the one resistor.
NodeMCU is a 3.3V MCU so make sure the TIP120 is driven hard enough to saturate and not get hot.