Abstract The anion PW 12O 3− 40 is very sparingly soluble in concentrated mineral acid solutions. This shortcoming has impeded the kind of study that demonstrated the merging of the first two waves of SiW 12O 4− 40 and P 2W 18O 6− 62 by an EEC mechanism in aqueous solutions. Entrapment of PW 12O 3− 40 in protonated slightly quaternized poly(4-vinylpyridine) films (QPVP) or in polyaniline films (PANI) has now permitted such a study. As also observed previously, a negative potential shift of the first redox wave of the heteropolyanion is obtained when the acid concentration in the bathing solution increases. All the results are compared with those obtained for QPVP–SiW 12O 4− 40, QPVP–P 2W 18O 6− 62, PANI–SiW 12O 4− 40 and PANI–P 2W 18O 6− 62 composites. In each case, the same EEC mechanism is operative. EQCM experiments were also very useful in this issue. Except for the case of PW 12 O3− 40 which could not be studied in concentrated acid solutions, all other systems show that the merging of waves necessitates higher acid concentrations in solution than when the heteropolyanions are entrapped in polymer matrices. This observation was termed the ‘microenvironment effect’. In the present work, confocal microscopy measurements of fluorescence intensity variation between bathing solutions and appropriate composites show directly the existence of differences of pH between the two phases. The results concord with predictions from Donnan effects, and reinforce such an explanation for the ‘microenvironment effect’.