In this paper, we present the design and characterization of a novel GaN based ultraviolet (UV) detector. The detector consists of two GaN PIN diodes, connected in antiparallel configuration. Two layers of AlGaN, a 100 nm Al<sub>0.4</sub>Ga<sub>0.6</sub>N barrier layer and a 400 nm Al<sub>0.33</sub>Ga<sub>0.67</sub>N filter layer are deposited on top of one of the PIN diodes. The filter layer exhibits strong absorption of photons at about 310 nm and below. The barrier layer improves the short wave rejection ratio as it can prevent the diffusion of the carriers generated in the filter layer. Due to the antiparallel connection of the two diodes, the cutoff wavelength of the detector is 300 nm and the overall photocurrent of the detector provides good similarity to the Erythemal action spectrum.