The n-type doping of diamond with phosphorus suffers from defects reducing the electron mobilities and inducing some degree of compensation. In addition, the relatively high ionization energy (0.6 eV) of phosphorus severely limits the electrical activity of the dopants. Here, we present two recent advances of the n-type doping of diamond. One is based on the significant reduction of the compensation ratio of highly compensated phosphorus-doped diamond by thermal annealings. The second one presents the possibility of converting p-type boron-doped diamond into n-type by deuterium diffusion and formation of deuterium-related shallow donors with ionization energy of 0.33 eV.