In this article, we present the preparation of a novel
heteroatom
halogen (fluorine) and nonmetal phosphorus-doped layered graphitic
carbon nitride, via the thermal decomposition technique, and examined
its electrochemical monitoring ability for vanillin detection. The
materials’ basic properties have been observed with various
analytical analyses such as X-ray diffractometry, field-emission scanning
electron microscopy, X-ray photoelectron spectroscopy, and transmission
electron microscopy. The proposed electrochemical sensor material
was examined under various operating conditions to demonstrate a good
current response for vanillin sensing. The sensor has a wide linear
range (0.2–100 μM) and a lower limit of detection (LoD
= 15 nM) with an enhanced sensitivity of 1.80 μA μM–1 cm–2. Ultimately, the potential
utility of the suggested sensor was effectively tested on food samples,
demonstrating exceptional recoveries of 99.46 and 96.76% for coffee
and vanilla ice cream, respectively, with corresponding relative standard
deviations of 1.83 and 1.21 for each.