I have a circuit with two DC Power sources, one is a 12 V, 1 A adapter and the other is an 18 V, 150 W solar panel.
I have a DC buck converter LM2546 which turns that 18 V into 12.4 V. The 12 V power source isn't always available due to power cuts, mostly during daytime. The solar panel is available for most of day. I would like to build a circuit that will use the 12 V if it's there, and 'fall back' to the solar power source when the electricity isn't available.
I'm using it for my router, I have made something that works 90% for me. There's one issue: switching delay. I'm using an SPDT 12V relay and a diode. When the adapter power is cut, the router restarts. However, when the adapter comes on, it doesn't restart. Below is the diagram (along with measured voltages input and output) I created in MS paint.
It sounds simple, but I'm guessing it isn't. How can this delay be eliminated? I don't want my router to restart when power source switches.