A ventilator, or a breathing assistance apparatus, is provided to ventilate patients who may have breathing difficulties, said device comprising a inspiratory pressure control duct a positive end-expiratory pressure control duct at least one valve connected to the peak inspiratory pressure control duct and to the positive end-expiratory pressure control duct, and at least one controller communicably connected to the valve to control rate of cycling of the valve, thereby controlling number of breaths per minute, and to control the duration of peak inspiratory pressure also known as inspiratory time.