Micromotion minimization using Ramsey interferometry