Narrative:

While flying VFR at 7;500 ft AGL while utilizing flight following; I declared an emergency because my engine sputtered. I immediately changed from right fuel tank to left tank. After ATC advised the nearest airport was 10 miles away; I landed safely and the engine never stopped until I turned the engine off. I visually checked that the fuel was very low. Refueled and topped off both tanks; started the plane; performed preflight inspection. The fuel gauge indicated that both tanks were full as I had visually observed. I took off and circled the field 2 or 3 times to be sure that I had experienced faulty gauge or loose ground wire. While refueling; I spoke by phone to my mechanic who assured me that what I had experienced was a faulty gauge or loose ground wire and the plane should operate correctly to continue. After departing; I flew the aircraft on a 10 minute flight; landed and rechecked the fuel in both tanks. While on the ground I performed pre-flight check and all systems seemed good. Flew to destination without incident and did observe normal decrease of fuel from left tank. No recurrences in route and landed safely. A few days later; an a&P mechanic inspected the aircraft; de-fueled both tanks and determined that the plane had a faulty fuel sensor. Parts were ordered. The plane will be repaired in a few days.

Google
 

Original NASA ASRS Text

Title: DA40 pilot experiences a rough running engine at 7;500 FT; switches fuel selector from the right tank to the left; and diverts to the nearest airport. Low fuel and an inaccurate fuel gauge is determined to be the cause.

Narrative: While flying VFR at 7;500 FT AGL while utilizing flight following; I declared an emergency because my engine sputtered. I immediately changed from right fuel tank to left tank. After ATC advised the nearest airport was 10 miles away; I landed safely and the engine never stopped until I turned the engine off. I visually checked that the fuel was very low. Refueled and topped off both tanks; started the plane; performed preflight inspection. The fuel gauge indicated that both tanks were full as I had visually observed. I took off and circled the field 2 or 3 times to be sure that I had experienced faulty gauge or loose ground wire. While refueling; I spoke by phone to my Mechanic who assured me that what I had experienced was a faulty gauge or loose ground wire and the plane should operate correctly to continue. After departing; I flew the aircraft on a 10 minute flight; landed and rechecked the fuel in both tanks. While on the ground I performed pre-flight check and all systems seemed good. Flew to destination without incident and did observe normal decrease of fuel from left tank. No recurrences in route and landed safely. A few days later; an A&P Mechanic inspected the aircraft; de-fueled both tanks and determined that the plane had a faulty fuel sensor. Parts were ordered. The plane will be repaired in a few days.

Data retrieved from NASA's ASRS site as of July 2013 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.