Concentration dependencies of the Helmholtz free energy of mixing are calculated for liquid Li-Rb, K-Rb and Li-Na alloys at different temperatures by using the variational method of the thermodynamic perturbation theory and the first-principle pseudopotential with the true wave functions instead of the pseudo-wave ones employed for calculation the screening potential. An excellent agreement with the experimental phase diagram is achieved in description of the phase separation in Li-Rb alloy. The ideal mixing in K-Rb alloy and the phase-separation tendency in Li-Na alloy are obtained only at temperatures that are higher than ones observed experimentally.