A battery assembly (301) for use with a surgical device (300) having a battery terminal and operational parameters includes a housing having a shape formed to removably connect with the terminal. The housing contains a modular battery operable to supply power to the device at the terminal and has a control circuit with a microprocessor, a memory, and a real-time clock. The control circuit is communicatively coupled to the battery and is operable to detect an identity of the surgical device (300), to determine at least one piece of information pertaining to at least one of the operational parameters of the surgical device (300) based upon the detected identity, to record the piece of information at least in the memory, and to selectively allow or prevent the battery from supplying power to the surgical device (300) dependent upon the piece of information.