An instrument for measuring respiratory rates and volumes