3D printer Proximity switch