Turn the power off in the area you are working.
Remove the alarm from the mounting bracket. If it won't come loose, it's locked, so unlock it. Insert a flathead screwdriver between the mounting bracket pin and the mounting bracket. The pin is in the base by the gap between the mounting bracket and the smoke detector.
Pry the smoke detector away from the bracket by turning the screwdriver and the alarm counter-clockwise. Turn them simultaneously.
Remove the battery and hold the test button to discharge the branch circuit.
Remove the quick connect power connector from the smoke alarm and discard the alarm.
Insert a fresh battery into the alarm. Connect the quick connect power connector. It just slides in like a plug.
Insert the locking pin into the lock on the base and re-attach the smoke detector to the mounting bracket. It will lock as the pin head fits into a notch.
Power the circuit and press the Test/Silence button. All the smoke detectors interconnected should sound and the green light should remain lit.