solar mains switchover over

Submitted by Andre on Sun, 10/23/2022 - 20:06

Hi,

I have a cctv system running in my garden shed using around 11W, running from a small UPS connected to mains power.

On the roof I have a 19V 40W solar panel connected to a charge controller charging 12V battery. That is hardly being used so I want to use that to run the CCTV during the day and switch over to mains when the output on the solar panel drops to below threshold.

What I was thinking is to have ESP32 connected to a relay and the UPS power supply connected to NO, mains connected to COM and solar inverter output to NC.

Would that work?

Or is there a better way of doing it?

Thanks