A plasma- or serum-collecting device with simple structure and easy to handle is provided. A programmable portion may include logic circuits that are configurable by a user. An optical encoder comprises a scale and a sensor head that is arranged opposite to the scale and can move relative to the scale.