Ocular fluid management systems and methods of operating the same. One ocular fluid management system includes a chamber, a diaphragm, a sensor, and a controller. The chamber includes a first portion and a second portion. The first portion is connected to an input line for receiving fluids into the first portion and an output line for discharging fluids from the first portion. The diaphragm is contained in the chamber and changes position based on a pressure difference between the first and second portions. The sensor detects a position of the diaphragm and transmits a signal based on the detected position. The controller is configured to receive the signal and control operation of at least one of a peristaltic pump and a vacuum pump based on the signal to maintain the diaphragm in a predetermined position.