solar inverter/mains switch over

Thread Starter

alfwro13

Joined Oct 23, 2022
2
Hi,
I am looking for some advice - I have a CCTV system running in my garden workshop using approximately 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 NodeMCU ESP32 gpio pin connected to a relay and the UPS power supply connected to NO, mains connected to COM and solar inverter output to NC.
The relay I have in mind is this one: https://www.aliexpress.com/item/32649659086.html

Would that work?
Thanks
 

Ian0

Joined Aug 7, 2020
6,706
You need about 250Wh per day. A 40W solar panel isn't going to supply much of that. 40Wh per day in a British winter (You don't specify where in the world you are).b Why don't you spend your money on more solar panels so that you won't need to put in any effort designing a switchover system?
 

Jerry-Hat-Trick

Joined Aug 31, 2022
208
I have a CCTV system running in my garden workshop using approximately 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
I'm not sure I understand the full system but I question whether you need an MCU to control this - maybe just a voltage controlled relay with some hysterisis so it doesn't kick in and out when the solar panel voltage is marginal. Is the CCTV working off mains voltage and is the 12V battery being used to generate mains voltage for the Uninterruptible Power Supply (UPS) when the mains supply is not available? If the 12V battery provides power for the UPS/CCTV when mains power is not available the easiest solution is to trigger the mains on only when the battery voltage drops below a specific threshold and to turn it back off when the battery is receiving charge current from the solar panel. But if the mains voltage is also charging the battery it gets more complicated - hence the need to understand the system setup more clearly....
 

Dodgydave

Joined Jun 22, 2012
10,591
Yes the relay will work, you can have the solar panel charging the battery and switch to ups in weak sunlight, are you running the CCTV off the same battery as the solar system?
 

Thread Starter

alfwro13

Joined Oct 23, 2022
2
Just to clarify:
1. The CCTV system is currently connected to a small UPS that is connected to mains power.
2. Solar panel, battery, charge controller and inverter are currently setup as a standalone system (that was installed in the workshop before it was connected to mains).
3. I am not planing to run the system of solar I am aware that I would need few more panels and much larger battery to go off grid.
The aim is simply to utilise the solar existing solar installation with minimal cost - in this case I already have enough spare parts to put it together. I have a little experience putting together ESP32 project but considering that in this case I will be dealing with 240V AC I am looking for opinions if switching between solar charged battery and a mains charged UPS is safe using one relay module where the UPS is connected to the "COM" pin, Inverter connected to the solar charged battery is connected to the "Normally closed" pin and the mains power is connected to the "Normally open" pin.
Or is it safer to use two relays so first disconnect mains, then switch to inverter/solar?
 

Halfpint786

Joined Feb 19, 2018
95
I assume the camera system is 12v DC (mine uses 12v adapters). The solar controller charges a lead-acid battery (and I wouldn't expect the batery voltage to go over 13 because the controller would turn off the charging if it could). The voltage (12.6v for a fully charged battery) is passed through a diode to the same power plug on the camera system the mains adapter is connected to. In the event the mains power fails, the diode between the battery and camera will forward bias and instantly take over powering the camera system. When the mains comes back on, the diode will not be forward biased any more and essentially disconnect the battery.
IMG_20221023_125336321.jpg
 
Top