Add probe to the heads for height detection similar to a regular 3d printer. I think you could probably just use a button or a limit switch