A method of detecting gas with a photoionization detector, PID, system (1, 100), comprising: powering on a photoionization detector (4, 104, 106, 108, 112, 116), turning off an ultraviolet lamp of the photoionization detector (4, 104, 106, 108, 112, 116) by a controller (2, 102) of the photoionization detector system (1, 100) and keeping it turned off during the zero calibration procedure, flowing ambient air from a surrounding environment by a fan of the photoionization detector system (1, 100) past a detector electrode of the photoionization detector (4, 104, 106, 108, 112, 116); processing an output of the detector electrode by the controller (2, 102) to determine a zero level of the photoionization detector (4, 104, 106, 108, 112, 1 16), storing the zero level by the controller (2, 102) in a memory of the photoionization detector system (1, 100), wherein the photoionization detector system (1, 100) in a detecting mode compares an output of the detector electrode to the zero level to determine if a threshold concentration of a gas is present; after storing the zero level, turning on and off the ultraviolet lamp by the controller (2, 102) with an on duty cycle of less than 50 percent, sampling, by the controller (2, 102), an output of the detector electrode in both on and off states of the ultraviolet lamp; comparing, by the controller (2, 102), the sampled output of the detector electrode by the controller (2, 102) to the stored zero level, wherein the photoionization detector system (1, 100) senses ambient temperature and algorithmically adapts the stored zero level based on changes in the sensed ambient temperature. powering on a photoionization detector (4, 104, 106, 108, 112, 116), turning off an ultraviolet lamp of the photoionization detector (4, 104, 106, 108, 112, 116) by a controller (2, 102) of the photoionization detector system (1, 100) and keeping it turned off during the zero calibration procedure, flowing ambient air from a surrounding environment by a fan of the photoionization detector system (1, 100) past a detector electrode of the photoionization detector (4, 104, 106, 108, 112, 116); processing an output of the detector electrode by the controller (2, 102) to determine a zero level of the photoionization detector (4, 104, 106, 108, 112, 1 16), storing the zero level by the controller (2, 102) in a memory of the photoionization detector system (1, 100), wherein the photoionization detector system (1, 100) in a detecting mode compares an output of the detector electrode to the zero level to determine if a threshold concentration of a gas is present; after storing the zero level, turning on and off the ultraviolet lamp by the controller (2, 102) with an on duty cycle of less than 50 percent, sampling, by the controller (2, 102), an output of the detector electrode in both on and off states of the ultraviolet lamp; comparing, by the controller (2, 102), the sampled output of the detector electrode by the controller (2, 102) to the stored zero level, wherein the photoionization detector system (1, 100) senses ambient temperature and algorithmically adapts the stored zero level based on changes in the sensed ambient temperature.