A medical ventilator having a valve which controls the flow of gas from a pressurized gas source to a patient for inhalation. Flow through the valve is choked and pressure upstream of the valve is held stable so that a known relationship exists between the position of the valve and the flow rate through the valve. An open loop control system causes the valve to open or close as needed to deliver a preselected tidal volume of gas to the patient on each breath. Since the flow rate is known, no feedback to the controller regarding actual flow conditions is required. The exact positioning of the valve and length of time that the valve is to be held open is predetermined by the controller before the breath is delivered, and is repeated for subsequent breaths. Preferably, the valve is driven by a stepping motor, and the controller comprises a microcomputer. The controller compensates for ramping of the stepping motor as the valve opens and closes in determining the positions of the valve required to deliver the preselected tidal volume. To ensure precise engagement between a valve member and a valve seat, the valve member is mounted on a flexible, linear wire. Additionally, a spirally-wound spring surrounds a stepping motor shaft and biases the shaft so as to close the valve in the event of a power loss.