We report on a direct comparison of the effect of the atmospheric contaminants on a-Si:H and μc-Si:H p-i-n solar cells deposited by plasma-enhanced chemical vapor deposition (PECVD) at 13.56 MHz. Nitrogen and oxygen were inserted by two types of controllable contamination sources: (i) directly into the plasma through a leak at the deposition chamber wall or (ii) into the process gas supply line. Similar critical concentrations in the range of 4-6×1018 cm-3 for nitrogen and 1.2-5×1019 cm-3 for oxygen were observed for both a-Si:H and μc-Si:H cells for the chamber wall leak. Above these critical concentrations the solar cell efficiency decreases for a-Si:H solar cells due to losses in the fill factor under red light illumination (FFred). For μc-Si:H cells the losses in FFred and in short-circuit current density deteriorate the device performance. Only for a-Si:H the critical oxygen concentration is found to depend on the contamination source. Conductivity measurements suggest that at the critical oxygen concentration the Fermi level is located about 0.05 eV above midgap for both a-Si:H and μc-Si:H.