I've used a known circuit design to successfully (wait for it!) control a 12V relay using a 3.3V MCU pin, from the pictures you can check that I am using the same 12V power source for both (relay and MCU) but the MCU is being supplied by the output from a L78L voltage regulator that converts 12 to 3.3V. The problem appears when I use this relay to drive a solenoid (1A current and using the same 12V power source for it), after the NO switch is closed all current goes to the solenoid and none is reaching my MCU (consequently turning it off), only after 1 second the current flow is established again in the MCU and it is reset.
My question: Is there any other way apart from inserting big capacitors (>100uF) on the L78L output to try to keep my MCU powered on when the relay is active (thus making a 1A current flows to the solenoid) ?
EDIT: The issue here is that both my circuit (MCU+Relay driver) and the solenoid are connected in the same power source (12V) and the solenoid is draining all the power source current for about 1 sec. Summary:
12V -> Solenoid and circuit
12V_Protect -> Relay Driver and L78L
TP_3.3 -> MCU
If I use a different power source for the solenoid the circuit works fine.