Construction and calibration of a low cost and fully automated vibrating sample magnetometer