A single photon avalanche diode (201; 301; 401; 501), comprising: a first doped structure (111, 113), doped with a first type of material and forming at least part of an isolation structure for the single photon avalanche diode; at least one contact structure, highly doped with the first type of material, located within the first doped structure (111, 113), the at least one contact structure forming one of the cathode or anode of the single photon avalanche diode; a second doped structure, doped with a second type of material, and forming at least one depletion region with the first doped structure (111, 113); at least one second contact structure, highly doped with the second type of material, located within the second doped structure, the at least one second contact structure (109; 309) forming the other of the anode or the cathode of the single photon avalanche diode; at least one further contact structure (203; 303), doped with the first type of material, the at least one further contact structure (203; 303) forming at least one further depletion region (205; 305); wherein the at least one contact structure is arranged to be coupled to a first voltage such that the at least one depletion region is reverse biased above a breakdown voltage; characterized by at least one switch to selectively couple the at least one further contact structure (203; 303) to a regulated voltage (207; 307, 561), such that when the switch is closed the at least one further contact structure (203; 303) is connected to the regulated voltage (207; 307, 561) and the at least one further depletion region (205; 305) is reverse biased below the breakdown voltage, such that the at least one further depletion region (205; 305) steers charge from the at least one depletion region and thus decreases the sensitivity of the single photon avalanche diode, and when the switch is open the at least one further contact structure (203; 303) is not connected to the regulated voltage (207; 307, 561), such that the single photon avalanche diode operates as normal. a first doped structure (111, 113), doped with a first type of material and forming at least part of an isolation structure for the single photon avalanche diode; at least one contact structure, highly doped with the first type of material, located within the first doped structure (111, 113), the at least one contact structure forming one of the cathode or anode of the single photon avalanche diode; a second doped structure, doped with a second type of material, and forming at least one depletion region with the first doped structure (111, 113); at least one second contact structure, highly doped with the second type of material, located within the second doped structure, the at least one second contact structure (109; 309) forming the other of the anode or the cathode of the single photon avalanche diode; at least one further contact structure (203; 303), doped with the first type of material, the at least one further contact structure (203; 303) forming at least one further depletion region (205; 305); wherein the at least one contact structure is arranged to be coupled to a first voltage such that the at least one depletion region is reverse biased above a breakdown voltage; characterized by at least one switch to selectively couple the at least one further contact structure (203; 303) to a regulated voltage (207; 307, 561), such that when the switch is closed the at least one further contact structure (203; 303) is connected to the regulated voltage (207; 307, 561) and the at least one further depletion region (205; 305) is reverse biased below the breakdown voltage, such that the at least one further depletion region (205; 305) steers charge from the at least one depletion region and thus decreases the sensitivity of the single photon avalanche diode, and when the switch is open the at least one further contact structure (203; 303) is not connected to the regulated voltage (207; 307, 561), such that the single photon avalanche diode operates as normal.