An optical rain sensor device, comprising: first and second light emitting elements (220, 225) adapted to emit first and second light pulses towards an inner surface of a transparent substrate; a photodetector adapted to detect the light from the first and second light pulses that is reflected by the inner surface of the transparent substrate; a rain sensor controller comprising: a first driver adapted to output a first driver current pulse on a first channel for driving the first light emitting element to emit the first light pulse; and a second driver adapted to output a second driver current pulse on a second channel for driving the second light emitting element to emit the second light pulse; and a regulated current source connected to a current path between the second channel of the rain sensor controller and a terminal of the second light emitting element; wherein the regulated current source is adapted to apply a compensation current signal at said terminal of the second light emitting element based on a regulation signal so that the total current across the second light emitting element is increased or decreased for reducing an imbalance between the first and second light pulses, characterized by: the compensation current signal being superimposed onto the second driver current pulse, and the regulated current source including: a variable current source adapted to supply, at an output terminal of the variable current source, an output current (I out) with a constant intensity that is adjustable based on said regulation signal; and a controlled switch adapted to be connected between said terminal of the second light emitting device and said output terminal of the variable current source; wherein the controlled switch is adapted to switch between an on state and an off state in synchronization with the second driver current pulse for connecting and disconnecting said variable current source from and to said terminal of the light emitting device, respectively, to generate a compensation current signal (l c) based on said regulation signal. first and second light emitting elements (220, 225) adapted to emit first and second light pulses towards an inner surface of a transparent substrate; a photodetector adapted to detect the light from the first and second light pulses that is reflected by the inner surface of the transparent substrate; a rain sensor controller comprising: a first driver adapted to output a first driver current pulse on a first channel for driving the first light emitting element to emit the first light pulse; and a second driver adapted to output a second driver current pulse on a second channel for driving the second light emitting element to emit the second light pulse; and a first driver adapted to output a first driver current pulse on a first channel for driving the first light emitting element to emit the first light pulse; and a second driver adapted to output a second driver current pulse on a second channel for driving the second light emitting element to emit the second light pulse; and a regulated current source connected to a current path between the second channel of the rain sensor controller and a terminal of the second light emitting element; wherein the regulated current source is adapted to apply a compensation current signal at said terminal of the second light emitting element based on a regulation signal so that the total current across the second light emitting element is increased or decreased for reducing an imbalance between the first and second light pulses, characterized by: the compensation current signal being superimposed onto the second driver current pulse, and the regulated current source including: a variable current source adapted to supply, at an output terminal of the variable current source, an output current (I out) with a constant intensity that is adjustable based on said regulation signal; and a controlled switch adapted to be connected between said terminal of the second light emitting device and said output terminal of the variable current source; wherein the controlled switch is adapted to switch between an on state and an off state in synchronization with the second driver current pulse for connecting and disconnecting said variable current source from and to said terminal of the light emitting device, respectively, to generate a compensation current signal (l c) based on said regulation signal. the compensation current signal being superimposed onto the second driver current pulse, and the regulated current source including: a variable current source adapted to supply, at an output terminal of the variable current source, an output current (I out) with a constant intensity that is adjustable based on said regulation signal; and a controlled switch adapted to be connected between said terminal of the second light emitting device and said output terminal of the variable current source; a variable current source adapted to supply, at an output terminal of the variable current source, an output current (I out) with a constant intensity that is adjustable based on said regulation signal; and a controlled switch adapted to be connected between said terminal of the second light emitting device and said output terminal of the variable current source; wherein the controlled switch is adapted to switch between an on state and an off state in synchronization with the second driver current pulse for connecting and disconnecting said variable current source from and to said terminal of the light emitting device, respectively, to generate a compensation current signal (l c) based on said regulation signal.