How to fit back-up battery into the controller board?
When I understand this correctly you want to have your MCU powered when the electricity is down. I'm not really sure what your input voltage is for your device. But I think your answer is by putting a relay which will be triggered by the main supply voltage. Connect your main supply also to the NO pin of your relay and put your battery to the NC pin. When the main supply dropped out the relay will automatically switch to its NC pin and use your battery as power supply.