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 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 captured images; anddetermine 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.