I think the If,And,Or gates for the electricity are not needed, all we really need is a switch for two inputs one output (switch between inputs i.e solar panel->generator to charge battery banks for instance), and allowing more than one input for charging the battery banks. At the moment, the...