A moisture sensor (100) for a forage harvester is described, the moisture sensor comprising a sensing device (110/400/600), a processing unit (130) and an output terminal (140). The sensing device is configured to sense an electrical characteristic of a harvested crop and generate a sensor signal (120/440) representative of the electrical characteristic. The processing unit (130) is configured to receive the sensor signal from the sensing device (110/400/600) and to process the sensor signal (120/440) to derive a moisture level of the harvested crop. The output terminal (140) is connected to the processing unit (130) for outputting an output signal representative of the moisture level as derived by the processing unit. The sensing device (110/400/600) is further configured to operate in one of a plurality of different operating modes when sensing the electrical characteristic, each operating mode having a different moisture level sensitivity characteristic, and to receive an operating parameter and to select an operating mode of the plurality of operating modes for the sensing device (110/400/600), based on the operating parameter.