A drug delivery device is provided comprising or adapted to receive a cartridge with an axially displaceable piston. The drug delivery device comprises a housing, a stationary capacitive sensor assembly, and a moveable indicator element comprising a surface with a code pattern detectable by the stationary capacitive sensor. The code pattern is formed from conductive markings printed onto the surface. The capacitive sensor is formed on a flexible sheet mounted at least in part to the exterior of the housing.L'invention concerne un dispositif d'administration de médicament comprenant ou adapté pour recevoir une cartouche avec un piston axialement mobile. Le dispositif d'administration de médicament comprend un boîtier, un ensemble capteur capacitif fixe, et un élément d'indicateur mobile comprenant une surface avec un motif de code détectable par le capteur capacitif fixe. Le motif de code est formé à partir de repères conducteurs imprimés sur la surface. Le capteur capacitif est formé sur une feuille souple montée au moins en partie à l'extérieur du boîtier.