I have never seen an application that needed 40 interconnected line volt smoke alarms. (The UL name for these)

At that quantity it is usually low volt smoke detectors connected to a fire panel


Bob Badger
Construction & Maintenance Electrician
Massachusetts