An oxygen concentrator comprising: an ambient air inlet; an oxygen reservoir; a vacuum pump; a plurality of gas separation columns containing an adsorbent material that preferentially adsorbs nitrogen, each column having an inlet port at a first end and an outlet port at a second end; a rotary valve connected to the inlet and outlet ports (132,134) of each column for selectively connecting the columns as the valve rotates so that during one revolution of the rotary valve each column sequentially is in a feed phase, an evacuation phase and a repressurization phase of a vacuum swing adsorption cycle, and so that the columns are in different phases from one another at all times; a motor for rotating the rotary valve; at least one flow sensor near the column inlet, the column outlet port, or similar place where the flow rate being measured is accessible; the oxygen concentrator comprising a control module which is configured to control the rotary valve so that during the feed phase the rotary valve connects the ambient air inlet to the inlet port and the oxygen reservoir to the outlet port of one of the columns; during the evacuation phase the rotary valve connects the vacuum pump to the inlet port of one of the columns; and during the repressurization phase the rotary valve connects the inlet port of one of the columns to the ambient air supply; characterized in that the control module is configured to detect when the leading edge of a mass transfer zone in which nitrogen is being absorbed has just reached the outlet port of a column for determining the end of the feed phase by (a) maintaining the inflow rate to the column constant and monitoring the gas flow rate at the outlet port of the column by means of the at least one flow sensor for detecting a significant rise in slope of said outflow rate; or (b) maintaining the outflow rate to the column constant and monitoring the gas flow rate at the inlet of the column by means of the at least one flow sensor for detecting a falling slope of said inflow rate; or (c) monitoring the ratio of flow at the inlet and the outlet port of the column by means of the flow sensors for detecting a significant change in the ratio of flows toward a ratio of 1:1. an ambient air inlet; an oxygen reservoir; a vacuum pump; a plurality of gas separation columns containing an adsorbent material that preferentially adsorbs nitrogen, each column having an inlet port at a first end and an outlet port at a second end; a rotary valve connected to the inlet and outlet ports (132,134) of each column for selectively connecting the columns as the valve rotates so that during one revolution of the rotary valve each column sequentially is in a feed phase, an evacuation phase and a repressurization phase of a vacuum swing adsorption cycle, and so that the columns are in different phases from one another at all times; a motor for rotating the rotary valve; at least one flow sensor near the column inlet, the column outlet port, or similar place where the flow rate being measured is accessible; the oxygen concentrator comprising a control module which is configured to control the rotary valve so that during the feed phase the rotary valve connects the ambient air inlet to the inlet port and the oxygen reservoir to the outlet port of one of the columns; during the evacuation phase the rotary valve connects the vacuum pump to the inlet port of one of the columns; and during the repressurization phase the rotary valve connects the inlet port of one of the columns to the ambient air supply; characterized in that the control module is configured to detect when the leading edge of a mass transfer zone in which nitrogen is being absorbed has just reached the outlet port of a column for determining the end of the feed phase by (a) maintaining the inflow rate to the column constant and monitoring the gas flow rate at the outlet port of the column by means of the at least one flow sensor for detecting a significant rise in slope of said outflow rate; or (b) maintaining the outflow rate to the column constant and monitoring the gas flow rate at the inlet of the column by means of the at least one flow sensor for detecting a falling slope of said inflow rate; or (c) monitoring the ratio of flow at the inlet and the outlet port of the column by means of the flow sensors for detecting a significant change in the ratio of flows toward a ratio of 1:1. (a) maintaining the inflow rate to the column constant and monitoring the gas flow rate at the outlet port of the column by means of the at least one flow sensor for detecting a significant rise in slope of said outflow rate; or (b) maintaining the outflow rate to the column constant and monitoring the gas flow rate at the inlet of the column by means of the at least one flow sensor for detecting a falling slope of said inflow rate; or (c) monitoring the ratio of flow at the inlet and the outlet port of the column by means of the flow sensors for detecting a significant change in the ratio of flows toward a ratio of 1:1.