The MAF sensor or mass airflow sensor has one very important job; measuring the amount of air entering the engine for an optimal air-fuel ratio. Without this information, the ECU will not be able to accurately control fuel injection, resulting in an engine that will either idle roughly, or worst case, not at all.
There are two common types of mass airflow sensors in use on automotive engines. These are the vane meter and the hot wire. Neither design employs technology that measures air mass directly. However, with additional sensors and inputs, an engine's ECU can determine the mass flow rate of intake air.
Here's how they work. A constant voltage is applied to the heated film or heated
wire. This film or wire is positioned in the air stream or in an air
flow sampling channel and is heated by the electrical current that
the voltage produces. As air flows across it, it cools down. The
heated wire or film is a positive temperature coefficient (ptc) resistor.
This means that it's resistance drops when it's temperature drops.
The drop in resistance allows more current to flow through it in order
to maintain the programmed temperature. This current is changed
to a frequency or a voltage which is sent to the computer and
interpreted as air flow. Adjustments for air temperature and humidity
are taken into consideration since they also affect the temperature
of the heated wire or film.