Why are ammonium chloride and ammonium hydroxide used in calcium salt detection?

On adding $\ce{ (NH4)2CO3 }$ solution to $\ce{ Ca^{2+} }$ aqueous salt solution, $\ce{ CaCO3 }$ is formed as a white precipitate, which confirms the presence of the cation.


While doing the test in my school laboratory, we were given a list of procedures to follow; for $\ce{ Ca^{2+} }$ it read:



> 
> Experiment: To the original solution added a small amount of $\ce{ NH4Cl }$, and an excess of $\ce{ NH4OH }$, followed by solid $\ce{ (NH4)2CO3 }$
> 
> 
> Observation: white ppt
> 
> 
> 


Why do we need to add $\ce{ NH4Cl }$ and $\ce{ NH4OH }$?




You want to fix the carbon in solution so it doesn't volatize as $\ce{CO2}$, since the equilibrium $$\ce{H2CO3 <=> CO2 + H2O}$$ favours the product side. By adding a base ($\ce{NH4OH}$), you shift the water ionization equilibrium, which in turn shifts the carbonic acid dissociation equilibrium. $\ce{NH4Cl}$ serves to regulate the $pH$ as a buffer. With your carbonate in solution, it is then able to precipitate as a solid by adding calcium. 


Using a strong base would hinder the solid precipation by favouring the solubilization of ions, justifying the use of ammonium hydroxide.


 3