In one aspect the present invention relates to a sensor for measuring at least one physical or chemical parameter of a
cartridge (10) or
syringe filled with a liquid substance. In further aspects theinvention relates to a
cartridge (10) equipped with such a sensor as well as to a
drug delivery device (1, 2, 3) equipped with such a
cartridge (10), wherein the sensor comprises: a planar flexible foil (101) arrangeable to an outer circumference of a
barrel (11) of the cartridge (10) or
syringe, at least a first and a second measuring
electrode (102, 104) arranged on said foil (101), and at leasta first and a second
contact electrode (106, 108) arranged on said foil (101), a processor (110) connected to the first and to the second measurement electrodes (102, 104), a
transceiver (120) arranged on said foil (101) and connected to the processor (110), wherein the first
contact electrode (106) and the second
contact electrode (108) are connected to the processor (110).