A semiconductor photodetector consisting of a diode with at least two heterojunctions comprising two external layers (1, 2), a first layer (1) with a given kind or type of doping and a second layer (2) with a kind or type of doping opposite to that of the first layer (1) respectively, the bandgap width of these two layers being determined as a function of the energy and hence the wavelength or wavelength band that they are each intended to detect, these two layers being separated from each other by an intermediate layer (3) having the same kind or type of doping as one of said first and second layers, said diode being subjected to a bias voltage of adjustable value between the two external layers (1) and (2), characterised in that the bandgap width of the intermediate layer (3) is greater than that of the layer which has the same type of doping as layer (3).