Device for controlling an optical recognition unit with the help of a capacitive filling level measurement in liquid containers, in particular containers for reagents or sample tubes, comprising: - the optical recognition unit with an optical sensor element; - a sensor having a measurement electrode; - a conductive base plate suitable for arranging at least one liquid container or a carrier unit having at least one receptacle for receiving a liquid container, in particular a sample tube; - a sensor electronic unit which is connected to the measurement electrode and the base plate and is adapted to determine a capacitance between the measurement electrode and the base plate; - an evaluation unit; and - a control unit for controlling the optical recognition unit, wherein the measurement electrode is arranged substantially perpendicularly to the base plate, in particular is arranged vertically to the horizontally arranged base plate, and wherein the evaluation unit is adapted to determine, based on the capacitance, at least one from the following list: - a filling level of the liquid container, in particular of the sample tube, in particular whether the liquid container, in particular the sample tube, is empty and/or exceeds or is below a predetermined filling level; - whether a liquid container, in particular a sample tube, is present in the at least one receptacle; - different carrier units, such as carrier units for differently sized liquid containers, in particular sample tubes; - different characteristics on a carrier unit, such as individual receptacles, in particular partitions between the receptacles, and wherein the control unit is connected to the sensor electronics unit or the evaluation unit, and a control signal (sc) can be generated by the sensor electronics unit or the evaluation unit depending on the capacitance, and the optical recognition unit is controllable depending on the control signal (sc), in particular a process can be activated for recognizing identifiers on and/or characteristics of the liquid container, in particular a sample tube, and/or of a reagent or sample contained therein. - the optical recognition unit with an optical sensor element; - a sensor having a measurement electrode; - a conductive base plate suitable for arranging at least one liquid container or a carrier unit having at least one receptacle for receiving a liquid container, in particular a sample tube; - a sensor electronic unit which is connected to the measurement electrode and the base plate and is adapted to determine a capacitance between the measurement electrode and the base plate; - an evaluation unit; and - a control unit for controlling the optical recognition unit, wherein the measurement electrode is arranged substantially perpendicularly to the base plate, in particular is arranged vertically to the horizontally arranged base plate, and wherein the evaluation unit is adapted to determine, based on the capacitance, at least one from the following list: - a filling level of the liquid container, in particular of the sample tube, in particular whether the liquid container, in particular the sample tube, is empty and/or exceeds or is below a predetermined filling level; - whether a liquid container, in particular a sample tube, is present in the at least one receptacle; - different carrier units, such as carrier units for differently sized liquid containers, in particular sample tubes; - different characteristics on a carrier unit, such as individual receptacles, in particular partitions between the receptacles, - a filling level of the liquid container, in particular of the sample tube, in particular whether the liquid container, in particular the sample tube, is empty and/or exceeds or is below a predetermined filling level; - whether a liquid container, in particular a sample tube, is present in the at least one receptacle; - different carrier units, such as carrier units for differently sized liquid containers, in particular sample tubes; - different characteristics on a carrier unit, such as individual receptacles, in particular partitions between the receptacles,