An injection device for administering a dose of a liquid medicament includes an elongated housing having a dispensing end and being configured to accommodate a cartridge filled with the liquid medicament, a drive mechanism configured to operably engage with the cartridge for expelling of a dose of the medicament from the cartridge via the dispensing end, a protective cap releasably attachable to the housing to cover the dispensing end, a first electronic circuit attached to the protective cap and electrically connected to at least a first cap electrode arranged on the protective cap, and a second electronic circuit arranged inside the housing, coupled to the drive mechanism and electrically connected to at least a first housing electrode that is located on the housing.