A drug delivery device is presented comprising of a housing, a plurality of contacts, a rod disposed within the housing, and an encoded member configured to be rotatably supported inside the housing, to engage with the rod and to be rotatable with respect to the rod, and to be axially constrained with respect to the housing such that axial advancement of the rod in a first direction relative to the housing causes rotation of the encoded member, wherein the outer surface of the encoded member is provided with a plurality of tracks together forming an encoder, each track comprising conductive segments and non-conductive segments and wherein the encoded member is supported in the housing such that each track is engaged by a respective one of the plurality of contacts.