Relay not switching immediately from switching power supply to battery backup
Jesus wept. Moderators - please close this question. Poster is asking for help in building equipment which is likely to get people killed. Worse, folks are helping him.

That said, let me expand. I'm assuming that when you say "critical medical equipment" you mean exactly that. If you are exaggerating, then I'm overreacting. If you're not, then you really need to pay attention.

First, you don't know what you're doing. I'm sorry, this is not a form of disrespect, but you need to be aware of your limits. Under other circumstances this would be cause for a certain amount of hand-holding, but other circumstances don't include putting faulty medical equipment into practice. In the event of a failure, you are at best looking at the possibility of a major professional negligence lawsuit, and at worst criminal charges (negligent homicide). Grieving relatives can be remarkably vindictive.

The following list should not be considered a check list of what you need to address to finish your project. Please. I'm trying to indicate to you why you need to back off.


Are you aware of the certification requirements for medical equipment? Are you going to get your system certified? If not, why not?
Your delay is caused by the fact that, according to the data sheet, your relay dropout voltage is about 10% of nominal - that is, 1.2 volts, more or less. Once the relay operates (pulls in) it will remain in contact until the coil voltage drops below the dropout voltage. This is part of the data sheet, and is standard relay behavior.
Putting diodes (zener or otherwise) into the coil circuit will reduce the coil voltage, alright, and cause the relay to drop out earlier. And when the coil voltage is reduced to 80% of nominal the relays won't operate, either. Why don't you realize this?
A dropping diode (zener or otherwise) will dissipate exactly as much power as a resistor which drops the same voltage at the same current. Why don't you realize this?
Your relay coils are rated for a maximum continuous coil voltage of 110% of nominal, that is 13.2 volts. Until you put in a dropping diode you were exceeding the coil rating. Why don't you realize this?
As has been commented, after you charge one of your batteries you run the risk of burning the contacts on the charging relay. Why don't you realize this?
You're using a non-medical-rated power supply. This alone will get you sued if there's a problem. Why don't you realize this?
You're using the decay of your power supply to cause dropout of the relays. The fast way to do this is to directly monitor the power line input. Why don't you realize this?
You don't show it, but you need to monitor the DC power supply and the batteries, and the relay operation in the event of power failure, and provide an annoying alarm that cannot be silenced. Have you done so? If not, why not?
What provisions have you made for the effects of a lightning strike on the power lines?
Your power supply uses banana jacks for output power. What is the long-term reliability of banana jack/plug connections? What will prevent careless contact from disconnecting it? Do you have any idea how hard it is to make things foolproof? Fools can be so very clever.
If the power supply quietly fails, the batteries will take over - until they're discharged. See point 6. You cannot simply assume that someone will notice the failure condition before the equipment shuts down.
If the output is accidentally shorted, the output capacitors in your DC power supply may well burn or weld the contacts in your relay. What provision have you made against this possibility?


I'm sorry, but I'm out of energy here. But I could go on at length. Please, you are out of your depth in a pool where lives depend on your doing thing right.