The circuit diagram below shows a design where a single power transformer is used for inverting purpose as well as for charging the battery when mains is present.
The good thing about the circuit is that the transformer doesn't employ separate winding for this, rather works with the same input winding and reverts DC to the battery with the help of a few DPDT relays.
The circuit can be understood with the following points:
The inverter section can be easiy recognized in the diagram, R1 to R6, including the T1 and T2 forms a general astable multivibrator circuit for producing the required 50 or 60 Hz pulses.
These pulses drive the mosfets alternately which in turn saturate the transformer by switching the battery voltage in it. The secondary of the transformer generates the corresponding magnitude of AC which is finally used for operating the connected appliances.
The above configuration suggests an normal or ordinary inverter operation.
By adding a couple of DPDT relays in the above discussed operation, we can force the circuit to charge the battery in the prsence of an AC mains source.
The coils of the two relays are powered through a capacitive low current compact power supply, involving C6, C5, D1----D5.
The above circuit is connected to a mains AC source, this source is also connected to RL1 poles.
The second relay RL2 is wired up with input winding of the transformer.
In the absence of mains AC, the position of the relay contacts are in the N/C as shown in the figure.
In this position the mosfets get linked with the transformer input winding, and thea battery with the circuit so that the inverter starts oscillating and the output appliances gets the AC power from the battery.
In the presence of mains AC the relay coils instantly get the required DC power and the contacts activate.
RL1 activates and connects the mains input to the transformer, the appliances also get connected with the mains AC in the process.
Also due to the action of RL2 the mosfets get disconnected from the transformer, while the the lower tap connects with D6. Since the center is already connected to battery positive, the inclusion of D6 provides a half wave rectified voltage to the battery, which is effectively filtered by C3 so that the battery is able to get the required sufficient charging voltage.
The above charging process continues until mains is present, so it should be monitored manually. When mains fails, the action reverts into inverting mode without interrupting the appliance operations and by using a single transformer for both the operations.
C4 makes sure that RL1 always activates a shade later than RL2 for safety reasons.
CAUTION: THIS CIRCUIT IS DEFINITELY NOT FOR THE NEW HOBBYISTS, IT'S PRESENTED ONLY FOR THE EXPERTS. IF YOU ARE A NOVICE AND INTERESTED TO TRY THIS.... BUILD IT AT YOUR OWN RISK.
R1, R2 = 27K,
R3, R4, R5, R6 = 470 Ohms,
C1,C2 = 0.47uF/100V metallized
T1, T2 = BC547,
T3, T4 = any 30V, 10amp mosfet, N-channel.
C3 = 47000uF/25V
C4 = 220uF/25v
C5 = 47uF/100v
C6 = 105/400V
R7 = 1M
D1---D5 = 1N4007
D6 = 1N5402
RL1, RL2 = DPDT, 400 OHMS, 12V, 7 AMPS/220V
Transformer = 12-0-12V, current as per requirement.
For only inverter design please refer to this ARTICLE