An arrangement for controlling performance of a phototransistor (Q) in an electronic circuit, where the phototransistor (Q) is configured to be sensitive to light, the arrangement comprising: - a positive supply voltage (V cc ) port and a ground (GND) port where the phototransistor (Q) is connected in the electronic circuit between these ports indirectly, - wherein the phototransistor (Q) is coupled via a main resistor (R L ) to the positive supply voltage (V cc ) port, - wherein an external bias resistor (R L2 ) is connectable in parallel to the main resistor (R L ) so that the external bias resistor (R L2 ) and the main resistor (R L ) are both connected to a collector of the phototransistor (Q), - a microcontroller which is configured to switch on the external bias resistor (R L2 ) at a time by an output signal of the microcontroller, - a switch (S2) connected in series with the external bias resistor (R L2 ), where the switch (S2) is configured to be controlled by the microcontroller, or the external bias resistor (R L2 ) is connected directly to a microcontroller output port where the microcontroller directly controls this output branch by supplying a desired voltage via the output port to the external bias resistor (R L2 ), - so that when the electronic circuit is configured to be switched on, the microcontroller switches the external bias resistor (R L2 ) on by the switch (S2) or by the direct voltage supply, between the phototransistor (Q) and the positive supply voltage (V cc ) port, for a time period enabling a bias to set for the phototransistor (Q), and - when the bias has been set, the microcontroller is configured to switch off the external bias resistor (R L2 ) from the electronic circuit by the switch (S2) or by the direct voltage supply, while maintaining the connection through the main resistor (R L ) active, during an actual measurement after the biasing. - a positive supply voltage (V cc ) port and a ground (GND) port where the phototransistor (Q) is connected in the electronic circuit between these ports indirectly, - wherein the phototransistor (Q) is coupled via a main resistor (R L ) to the positive supply voltage (V cc ) port, - wherein an external bias resistor (R L2 ) is connectable in parallel to the main resistor (R L ) so that the external bias resistor (R L2 ) and the main resistor (R L ) are both connected to a collector of the phototransistor (Q), - a microcontroller which is configured to switch on the external bias resistor (R L2 ) at a time by an output signal of the microcontroller, - a switch (S2) connected in series with the external bias resistor (R L2 ), where the switch (S2) is configured to be controlled by the microcontroller, or the external bias resistor (R L2 ) is connected directly to a microcontroller output port where the microcontroller directly controls this output branch by supplying a desired voltage via the output port to the external bias resistor (R L2 ), - so that when the electronic circuit is configured to be switched on, the microcontroller switches the external bias resistor (R L2 ) on by the switch (S2) or by the direct voltage supply, between the phototransistor (Q) and the positive supply voltage (V cc ) port, for a time period enabling a bias to set for the phototransistor (Q), and - when the bias has been set, the microcontroller is configured to switch off the external bias resistor (R L2 ) from the electronic circuit by the switch (S2) or by the direct voltage supply, while maintaining the connection through the main resistor (R L ) active, during an actual measurement after the biasing. <EOS>