Smoke detectors are normally installed in the ceiling or high on the wall, with the top of the detector not closer than 4 inches nor further than 12 inches from the ceiling.
Don't put your detector near heating and cooling vents (they might blow on the detector, preventing it from seeing smoke).
Also, avoid installing your smoke alarm near a kitchen or a bathroom (steam can set off the alarm when the door is opened.)
Smoke detectors should be tested at least once a month by pressing the test button, which comes standard on all smoke detectors.
Never use and open flame (like a lighter or burning paper) to test a smoke detector.
Smoke detectors need no maintenance other than changing batteries annually, and an occasional vacuuming of dust or cobwebs.
Smoke detectors are highly reliable but can sometimes be fooled by cooking or steam. If it sets off when there is no fire, it may need to be moved a few feet to a new position where it is not in the way of cooking vapors or steam.
Smoke detectors have a useful life of about ten years. At that age they should be replaced, even if they seem to be in working order.