Electromagnetic sensor embedded at the tip of the probe