Power supply smoke detectors
Batteries versus power current
A smoke detector that runs on batteries can be placed anywhere in your home, both on the ceiling or the wall. You're not bound to an existing power socket, which is convenient, because sockets don't always perfectly align with your base plate. When you want to place a smoke detector in your bedroom, you usually need to choose a smoke detector that runs on batteries. Not all spaces in your home come equipped with a power socket in the ceiling.
Smoke detectors that run on grid current can be connected to the existing power grind in the ceiling. This power supply works automatically, which means you'll never have to deal with empty batteries. Power outages might occasionally happen, that's why most grid current smoke detectors come equipped with backup batteries. In case of a power outage, the smoke detector immediately switches to the batteries, meaning that it'll always work.
There are also smoke detectors that work on alkaline batteries. Think of AA and AAA batteries, for example. The advantage of alkaline batteries is that they are universally available. A smoke detector that works on alkaline batteries averagely lasts for up to 2 or 3 years before the batteries need replacement.
Lithium batteries have the longest lifespan out of all battery types that work with smoke detectors. A smoke detector with a lithium battery usually lasts for up to 10 years. That's why a smoke detector with a lithium battery is often slightly more expensive than comparable smoke detectors that run on different battery types.
A 9V or 3V battery is the most common battery for smoke detectors. On average, a smoke detector that runs on a 9V or 3V battery will last up to 1 to 2 years. After that, you'll need to replace the battery.