The invention relates to a device for treating raw materials, comprising at least two spaced-apart electrodes, which electrodes are in contact with a controlled electrical energy source, wherein the electrodes are each formed by at least two electrically separated electrode segments of which each segment is electrically connected to the electrical energy source in a controlled manner and each electrode segment is connected to a measuring apparatus designed to determinate the electrical conductivity between electrode segments, wherein the electrical energy source is controlled by a control unit and the electrical energy source is controlled and is set up to respectively apply electrical energy at least to the two electrode segments between which the lowest electrical conductivity is determined.