The flow sensor comprises a heater arranged between two sensing thermopiles. In addition, at least one monitoring thermocouple is provided for measuring the temperature of the heater. The signal from the monitoring thermocouple is used as a reference voltage for an A/D converter, which converts the signals from the sensing thermopiles. This allows to increase the resolution of the converter at higher flows, which results in more accurate measurements.