We consider an ordered array of semiconductor single-electron quantum dots located in the antinode of a mode of a microcavity based on a two-dimensional photonic crystal. The influence of Coulomb effects on the energy exchange between quantum dots and the mode is studied in arrays for different numbers of dots. The stability of resonant electron – photon dynamics is analysed as a function of technological deviations of the dot parameters caused by the imperfection of the manufacturing procedure. Using the data of numerical simulation of the spectroscopic response of the system, criteria are formulated for using such a structure as a detector of localised charges. The parameters of the photonic crystal are chosen, which make it possible to implement the proposed measurement scheme.