Diamond films were deposited by microwave plasma chemical vapor deposition with ps mixtures of CH4, CO, H-2, O2 and CO2. Up to 60% CH4 in O2 and 40% CH4 in CO2 gas mixtures were used. High quality diamond films were deposited with different combinations of methane, hydrogen (with or without) and oxygen (or CO2). Raman spectroscopy and scanning electron microscopy were used to determine the quality of the diamond films. Using the optical emission spectra of the microwave plasma, we were able to control the quality of diamond films by using different combinations of methane, hydrogen and oxygen (or CO2). Dramatic changes were observed in the relative signal intensities between OH and CO, and between C2 and CO when the flow rate of different gases, the microwave power, and the total gas pressure were changed. The region of diamond formation was determined by optical emission spectroscopy to coincide with a specific plasma condition which has the signal intensity of OH (at 308.9 nm) lower than that of CO (at 313.4 nm) and the intensity of C2 (at 516.5 nm) lower than that of CO (at 519.8 nm). The deposition conditions for good quality diamond films were easily determined in this system.