A modular optical device comprising: a single lens block (103, 503) including both a first receptacle for receiving a first lens pin and a second receptacle for receiving a second lens pin, a first and a second lens pin being received in the first and second receptacles, respectively, a first collimating lens element located in the first receptacle, and a second collimating lens element located in the second receptacle, the single lens block being configured to mechanically couple to a single molded package (101, 501); and the single molded package being mechanically coupled to the lens block, the single molded package including both a light source (151, 551) and a light detector (152, 552), the molded package including a connection portion configured for direct electrical coupling to an external substrate; and the light source being optically aligned with the first lens pin when the molded package is mechanically coupled to the lens block and the light detector being optically aligned with the second lens pin when the molded package is mechanically coupled to the lens block; the first and second lens pins each including a lens element and being received at a defined distance apart by the first and second receptacles, the first and second lens pins being configured and arranged for directing an optical signal between the light source and the light detector and corresponding external components received within openings of the first and second lens pins, the modular optical device being characterised in that each lens pin includes a second lens element in addition to the first lens element, and in that the first and second collimating lens are positioned outside the lens pins and are held by the lens holder in the corresponding receptacles of the lens holder, wherein the first collimating lens element of the single lens block is for collimating an optical signal transferred between the light source and the first lens pin, and the second collimating lens element of the single lens block is for collimating an optical signal transferred between the light detector and the second lens pin. a single lens block (103, 503) including both a first receptacle for receiving a first lens pin and a second receptacle for receiving a second lens pin, a first and a second lens pin being received in the first and second receptacles, respectively, a first collimating lens element located in the first receptacle, and a second collimating lens element located in the second receptacle, the single lens block being configured to mechanically couple to a single molded package (101, 501); and the single molded package being mechanically coupled to the lens block, the single molded package including both a light source (151, 551) and a light detector (152, 552), the molded package including a connection portion configured for direct electrical coupling to an external substrate; and the light source being optically aligned with the first lens pin when the molded package is mechanically coupled to the lens block and the light detector being optically aligned with the second lens pin when the molded package is mechanically coupled to the lens block; the first and second lens pins each including a lens element and being received at a defined distance apart by the first and second receptacles, the first and second lens pins being configured and arranged for directing an optical signal between the light source and the light detector and corresponding external components received within openings of the first and second lens pins, the modular optical device being characterised in that each lens pin includes a second lens element in addition to the first lens element, and in that the first and second collimating lens are positioned outside the lens pins and are held by the lens holder in the corresponding receptacles of the lens holder, wherein the first collimating lens element of the single lens block is for collimating an optical signal transferred between the light source and the first lens pin, and the second collimating lens element of the single lens block is for collimating an optical signal transferred between the light detector and the second lens pin.