A device for amplifying and detecting biological material in a biological sample, comprising a heating arrangement for heating the sample, the heating arrangement comprising a first heating element, a second heating element, a first controller for the first heating element, a second controller for the second heating element, an interface to a power source, the power source providing an available source voltage and an available source power to the device, wherein the device is configured to determine power values for the heating elements (RB, RR) by a method comprising: - a step of setting a second heating element power as determined by a predetermined pulse width of current pulses for the second heating element; - a step of ramping up a first heating element power as determined by a pulse width of current pulses for the first heating element by incrementally increasing the pulse width for the first heating element; - a step of checking the available source voltage after the step of ramping up the first heating element power; - a step of checking whether the available source power decreases; - a step of checking whether a predetermined maximum first heating element power value is reached; - iterating the step of ramping up the first heating element power if the available source voltage is above a first predetermined minimum voltage, and the available source power has not decreased, and the first heating element power is below the predetermined maximum first heating element power value; and - a step of storing and setting a present first heating element power as a set first heating element power value when at least one of the following conditions is fulfilled: the available source voltage is below the first predetermined minimum voltage, or the available source power decreases, or the first heating element power reaches the predetermined maximum first heating element power value. - a step of setting a second heating element power as determined by a predetermined pulse width of current pulses for the second heating element; - a step of ramping up a first heating element power as determined by a pulse width of current pulses for the first heating element by incrementally increasing the pulse width for the first heating element; - a step of checking the available source voltage after the step of ramping up the first heating element power; - a step of checking whether the available source power decreases; - a step of checking whether a predetermined maximum first heating element power value is reached; - iterating the step of ramping up the first heating element power if the available source voltage is above a first predetermined minimum voltage, and the available source power has not decreased, and the first heating element power is below the predetermined maximum first heating element power value; and - a step of storing and setting a present first heating element power as a set first heating element power value when at least one of the following conditions is fulfilled: the available source voltage is below the first predetermined minimum voltage, or the available source power decreases, or the first heating element power reaches the predetermined maximum first heating element power value. the available source voltage is below the first predetermined minimum voltage, or the available source power decreases, or the first heating element power reaches the predetermined maximum first heating element power value.