An optical decoding system comprising: an optical sensor integral with or attachable to a housing of a drug delivery device and configured to be directed at first and second rotatable components of a dose setting and dispensing mechanism of the drug delivery device; a processor configured to: cause the optical sensor to capture encoded images of the first and second rotatable components at least at the beginning and end of a medicament dose dispensing process; determine a rotational position of both the first and second rotatable components in each of the encoded images; determine from the rotational positions of the first and second rotatable components an amount of medicament delivered by the dose setting and dispensing mechanism of the drug delivery device; wherein determination of the rotational position of the first end second components comprises identifying the encoded images associated with each of the first and second rotatable components, each encoded image encoding a different rotational orientation of the respective rotatable component, wherein the lowest common multiple of the number of unique rotational orientations of the first and second rotatable components is higher than a maximum number of dose units which can be dialled into the drug delivery device. an optical sensor integral with or attachable to a housing of a drug delivery device and configured to be directed at first and second rotatable components of a dose setting and dispensing mechanism of the drug delivery device; a processor configured to: cause the optical sensor to capture encoded images of the first and second rotatable components at least at the beginning and end of a medicament dose dispensing process; determine a rotational position of both the first and second rotatable components in each of the encoded images; determine from the rotational positions of the first and second rotatable components an amount of medicament delivered by the dose setting and dispensing mechanism of the drug delivery device; wherein determination of the rotational position of the first end second components comprises identifying the encoded images associated with each of the first and second rotatable components, each encoded image encoding a different rotational orientation of the respective rotatable component, wherein the lowest common multiple of the number of unique rotational orientations of the first and second rotatable components is higher than a maximum number of dose units which can be dialled into the drug delivery device. cause the optical sensor to capture encoded images of the first and second rotatable components at least at the beginning and end of a medicament dose dispensing process; determine a rotational position of both the first and second rotatable components in each of the encoded images; determine from the rotational positions of the first and second rotatable components an amount of medicament delivered by the dose setting and dispensing mechanism of the drug delivery device; wherein determination of the rotational position of the first end second components comprises identifying the encoded images associated with each of the first and second rotatable components, each encoded image encoding a different rotational orientation of the respective rotatable component, wherein the lowest common multiple of the number of unique rotational orientations of the first and second rotatable components is higher than a maximum number of dose units which can be dialled into the drug delivery device.