Power / battery help on "old" project.

Alas things have not been going too well with my plant waterer project.

It needs a hefty power supply to drive the pump and solenoids.

As it will only need to run once a week (maybe), or "infrequently" I am thinking of being stingy with the power.

Instead of keeping it connected to the mains all the time, I was thinking of a small battery for when it is not doing the main work.

I have a 5 volt relay which is mains rated on the contacts, so that is a bonus for me. I'll explain in a second.

Idea: As most of the time not much is happening, a battery runs the "system" - which only needs to be the Arduino and RTC. When "time x" happens the Arduino puts a pin high and turns on the mains. It waits a while then does what it needs to do. Waits a while again then turns off the mains.

In theory that sounds easy, but I am wanting to ask if there are any problems I am not seeing in what I have explained.

Thanks in advance.

If you have a suitable mains relay that should work - but when you start fiddling with the mains you introduce electric-shock and fire risks. Maybe you should consult a qualified electrician to be certain your system is safe.

HOWEVER ... assuming the battery is recharged from the mains the total electrical consumption will actually be higher because of the inefficiencies associated with charging and discharging the battery.