Drug delivery device adapted to receive a drug-filled cartridge comprises a piston drive member for expelling a dose of drug from a loaded cartridge, a motor for driving the piston drive member, a rechargeable electric power source, an electrical connector allowing an external connector of a power source to be connected for recharging the power source, and a controller for controlling operation of the motor. The controller is adapted to detect a condition indicative of an external power source being connected to the electrical connector and subsequently disable the expelling assembly to thereby prevent that drug can be expelled from a loaded cartridge when an external power source has been connected to the electrical connector.