Automatic control of pressure