New technique for measuring Newton's constantG