Smoke Detector Alarm keeps on beeping
I've had similar problems from several smoke detectors at different job sites. Here is what I learned in the process:

Smoke alarms have expiration dates. That is they will work for a finite period of time before you will need to replace them. 5-6 years approximately is the length of time to replace (or when the manufacturer recommends). Look on the back side for a production date.

There should be a code explanation for the blinking lights or the beeping on the back of the unit. Most beeping is for a low battery that needs replacing.

RC states all new houses will be fitted with battery back-up powered smoke alarms with the main power supply as house current. Further all smoke alarms will be Daisy Chained so that when one alarm is activated all the other alarms will sound an alert.

All alarms are not created the same. If you purchase the least expensive alarm you can expect to replace much sooner or have more problems with it than a more costly alarm. Most manufacturers warranty their devices for no more than a year and most will replace a faulty one with proof of purchase.