I am working on an appliance project in which I have been tasked with the design of the power supply. The project specifications hold that from a 230v 50Hz wall supply two voltage rails of 5v (for small dc motors and some ICs) and 3.3v (for micro controllers) are to be supplied to other subsystems. In addition the power subsystem will need to keep a small fully charged battery and be able to detect when mains power is cut and supply the 5v and 3.3v rails from the battery instead. The aim of the project is to do as much of the design with discrete components where possible without being unreasonable (i.e we are allowed to use ICs if it would prove unnecessarily difficult to implement with discrete components.)
I also found this circuit that makes use of transistors to replace a regulator IC. I was thinking of repeating this circuit twice with different values of the variable resistor (which is R4 in the circuit) in each to adjust the output to the desired 5v and 3.3v from 12v.
I'm now trying to figure out the best way to implement the backup system. I was thinking of using a LiPo 1000 mAh 7.4V battery (https://www.robotics.org.za/603450?search=lipo) together with a charging IC to charge the circuit and then use the same regulator circuits to get 3.3v and 5v. The problem with this is that that R4 resistor is tweaked for a 12v input and not a 7.4v (which would of course get less as the charge dies). I'm not sure what the best approach would be in terms of the regulators although I would like to keep these as low level as possible rather than buying ICs off the shelf.
I will obviously need a way to detect when mains power is cut but I also need to be able to charge the battery from mains when it is connected. I am a very inexperienced designer and so any tips or pointers in the right direction on the best way to do this would be much appreciated.