A drug delivery device 100 comprising: a housing 102; a cylindrical member 406 rotatably supported within the housing; and a plurality of sensors 212a-212g; wherein: the outer surface of the cylindrical member is provided with a single track 300, the track forming an encoder and having a plurality of first track segments 302 and a plurality of second track segments 304 arranged along the length of the track which are respectively capable of inducing first and second responses in the sensors; and in each rotational position of the cylindrical member relative to the housing at least one different first track segment is capable of inducing a first response in at least one said sensor, thereby enabling the rotational position of the cylindrical member relative to the housing to be determined.