It is shown that the ratio of Pd-0/Pd2+ in polyaniline (PANI) has a major e
ffect on the response of film to hydrogen. The palladium clusters were inco
rporated in PANI as the result of spontaneous reduction of PdSO4 by electro
active PANI in the leucoemeraldine or nigraline form, respectively. The two
forms of PANI were prepared by terminating the electrochemical deposition
at -0.1 V (PANI-(0.1V)) and by terminating it at +0.7 V (PANI(0.7 V)). A hi
gher amount of Pd is incorporated in the in PANI when the reduction of Pd2 is initiated from the leucoemeraldine form. The ratio of the amine/imine u
nits correlates well with the changes of the Pd-0/Pd2+ ratio as shown by th
e XPS. The changes of the work function were measured by a Kelvin Probe. A
substantial decrease of WF was observed when the PANI-(0.1V)-Pd composite f
ilm was exposed to hydrogen. On the other hand the WF of PANI(0.7V)-Pd film
increases upon exposure to hydrogen. The change in the electron donor/elec
tron acceptor behavior towards hydrogen is governed by the Pd-0/Pd2+ ratio
in the PANI/Pd matrix.