Purpose of attached circuit: driving a solenoid (cabinet lock) from microcontroller through relay with a 5 volt coil.
- Relay 5 volt with NO Contact
- Solenoid 12 volt
- power supply 12 volt
- Regulator 7805 to generate 5 volts
- On state of controller pin: relay is energized and the contacts close and 12 volt feeds the solenoid and it is working well.
- Off state of controller pin: relay is still energized and for sure the solenoid is still active. ( 3.9 volt is still there on the output pin of the controller.)
- Off state of controller pin (in case the solenoid is disconnected from the circuit): relay is ee-energized, and it is working well as expected.
Logic in controller drives the output only.
The 7805 regulator is not mentioned in the above circuit.
Can you help me to find the issue which leads the output of the controller to be forced to high when the solenoid is connected and the controller output should be low?