An optical decoding system including 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 and a processor configured to: (i) cause the optical sensor to capture images of the first and second rotatable components at least at the beginning and end of a medicament dose dispensing process; (ii) determine a rotational position of both the first and second rotatable components in each of the captured images; and (iii) 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.