An apparatus to provide breathing support to a patient comprising: a valve comprising at least three ports, said three ports comprising one inlet port, a first outlet port and a second outlet port, the inlet port adapted for connection to a patient interface via a primary duct configured for flow of a gas; at least one peak inspiratory pressure control duct (516, 517) connected to the first outlet port of the valve; at least one positive end-expiratory pressure (PEEP) control duct (520, 521) connected to the second outlet port of the valve; wherein the valve is configured to cycle between the first outlet port and the second outlet port thereby switching flow of the gas from the inlet port to only the first outlet port and from the inlet port to only the second outlet port; wherein a cycle corresponds to one breath; wherein: the PIP control duct (516, 517) has a length immersed in a body of fluid (518, 522, 523) and the PEEP control duct (520, 521) has a length (520, 521) immersed in the body of fluid (518, 522, 523), the immersed length of PIP control duct (516, 517) being greater than the immersed length of the PEEP control duct (520, 521); the apparatus is configured to direct the flow of the gas in a first sequence from a pressurized gas supply to the patient interface, to the valve, through the valve, to the PIP control duct (516, 517), when the valve switches flow of the gas from the inlet port to the first outlet port, and the apparatus is configured to direct the flow of the gas in a second sequence from the pressurized gas supply to the patient interface, to the valve, through the valve, to the PEEP control duct (520 521), when the valve switches flow of the gas from the inlet port to the second outlet port, whereby when the gas flows from the inlet port to the first outlet port of the valve, the gas flows through the PIP control duct (516, 517), thereby controlling PIP in the apparatus so that the patient receives PIP, and when the gas flows from the inlet port to the second outlet port of the valve, the gas in the apparatus flows through the PEEP control duct (520, 521), thereby lowering pressure in the apparatus to PEEP so that the patient receives PEEP. a valve comprising at least three ports, said three ports comprising one inlet port, a first outlet port and a second outlet port, the inlet port adapted for connection to a patient interface via a primary duct configured for flow of a gas; at least one peak inspiratory pressure control duct (516, 517) connected to the first outlet port of the valve; at least one positive end-expiratory pressure (PEEP) control duct (520, 521) connected to the second outlet port of the valve; wherein the valve is configured to cycle between the first outlet port and the second outlet port thereby switching flow of the gas from the inlet port to only the first outlet port and from the inlet port to only the second outlet port; wherein a cycle corresponds to one breath; wherein: the PIP control duct (516, 517) has a length immersed in a body of fluid (518, 522, 523) and the PEEP control duct (520, 521) has a length (520, 521) immersed in the body of fluid (518, 522, 523), the immersed length of PIP control duct (516, 517) being greater than the immersed length of the PEEP control duct (520, 521); the apparatus is configured to direct the flow of the gas in a first sequence from a pressurized gas supply to the patient interface, to the valve, through the valve, to the PIP control duct (516, 517), when the valve switches flow of the gas from the inlet port to the first outlet port, and the apparatus is configured to direct the flow of the gas in a second sequence from the pressurized gas supply to the patient interface, to the valve, through the valve, to the PEEP control duct (520 521), when the valve switches flow of the gas from the inlet port to the second outlet port, whereby when the gas flows from the inlet port to the first outlet port of the valve, the gas flows through the PIP control duct (516, 517), thereby controlling PIP in the apparatus so that the patient receives PIP, and when the gas flows from the inlet port to the second outlet port of the valve, the gas in the apparatus flows through the PEEP control duct (520, 521), thereby lowering pressure in the apparatus to PEEP so that the patient receives PEEP. the PIP control duct (516, 517) has a length immersed in a body of fluid (518, 522, 523) and the PEEP control duct (520, 521) has a length (520, 521) immersed in the body of fluid (518, 522, 523), the immersed length of PIP control duct (516, 517) being greater than the immersed length of the PEEP control duct (520, 521); the apparatus is configured to direct the flow of the gas in a first sequence from a pressurized gas supply to the patient interface, to the valve, through the valve, to the PIP control duct (516, 517), when the valve switches flow of the gas from the inlet port to the first outlet port, and the apparatus is configured to direct the flow of the gas in a second sequence from the pressurized gas supply to the patient interface, to the valve, through the valve, to the PEEP control duct (520 521), when the valve switches flow of the gas from the inlet port to the second outlet port, whereby when the gas flows from the inlet port to the first outlet port of the valve, the gas flows through the PIP control duct (516, 517), thereby controlling PIP in the apparatus so that the patient receives PIP, and when the gas flows from the inlet port to the second outlet port of the valve, the gas in the apparatus flows through the PEEP control duct (520, 521), thereby lowering pressure in the apparatus to PEEP so that the patient receives PEEP.