Method for producing a light source for a sensor unit of a position measuring device, comprising the following steps: - providing at least one semiconductor component (1.1) constituted in such a way that light is emittable by the latter, - securing the semiconductor component (1.1) on a first auxiliary carrier, such that a first side (1.11) of the at least one semiconductor component (1.1) is arranged facing the first auxiliary carrier, wherein before or after securing the semiconductor component (1.1) on the first auxiliary carrier, an electrically conductive carrier body (1.3) is secured to the at least one semiconductor component (1.1), thus giving rise to a first assembly comprising the at least one semiconductor component (1.1) and the carrier body (1.3), - securing an electrically conductive body (1.4) on the first auxiliary carrier, such that the latter is arranged next to the carrier body (1.3), - producing a bond wire connection (1.6) between the electrically conductive body (1.4) and the carrier body (1.3), - applying a first potting compound (1.5), such that the carrier body (1.3) and the electrically conductive body (1.4) are fixed relative to one another by the first potting compound (1.5) and the bond wire connection (1.6) is potted, - removing the first auxiliary carrier, - producing a first test pad (1.822), which is electrically contacted with the first assembly, - producing a second test pad (1.922), which is electrically contacted with the electrically conductive body (1.4), wherein a panel arises comprising the first assembly, the first potting compound (1.5), the bond wire connection (1.6) and also the first test pad and the second test pad (1.922), - conducting an electric current via the first test pad (1.822) and the second test pad (1.922) in order to carry out temporary operation in which the semiconductor component (1.1) emits light, - subsequently dividing the panel, wherein the first and/or the second test pad (1.822, 1.922) are/is at least partly separated from the light source. - providing at least one semiconductor component (1.1) constituted in such a way that light is emittable by the latter, - securing the semiconductor component (1.1) on a first auxiliary carrier, such that a first side (1.11) of the at least one semiconductor component (1.1) is arranged facing the first auxiliary carrier, wherein before or after securing the semiconductor component (1.1) on the first auxiliary carrier, an electrically conductive carrier body (1.3) is secured to the at least one semiconductor component (1.1), thus giving rise to a first assembly comprising the at least one semiconductor component (1.1) and the carrier body (1.3), - securing an electrically conductive body (1.4) on the first auxiliary carrier, such that the latter is arranged next to the carrier body (1.3), - producing a bond wire connection (1.6) between the electrically conductive body (1.4) and the carrier body (1.3), - applying a first potting compound (1.5), such that the carrier body (1.3) and the electrically conductive body (1.4) are fixed relative to one another by the first potting compound (1.5) and the bond wire connection (1.6) is potted, - removing the first auxiliary carrier, - producing a first test pad (1.822), which is electrically contacted with the first assembly, - producing a second test pad (1.922), which is electrically contacted with the electrically conductive body (1.4), wherein a panel arises comprising the first assembly, the first potting compound (1.5), the bond wire connection (1.6) and also the first test pad and the second test pad (1.922), - conducting an electric current via the first test pad (1.822) and the second test pad (1.922) in order to carry out temporary operation in which the semiconductor component (1.1) emits light, - subsequently dividing the panel, wherein the first and/or the second test pad (1.822, 1.922) are/is at least partly separated from the light source.