Narrative:

On a VFR flight to ZZZ I received a message on my garmin GTN750 that the transponder was not operative; but then only after I had pressed the msgs button about 15 minutes into the trip. (Normally the transponder turns on automatically with the master avionics switch that turns on the gtn 750 and all other avionics. Then the remote transponder switches from standby to mode C operation when exceeding a certain speed on takeoff.) upon discovering this; I tried to recycle the GTX345-right transponder several times; but it would not turn on. I made a u-turn back to ZZZ airport due to the faulty equipment. I was flying part of the time within the mode C veil around ZZZ1. I was under class B airspace and not within it. On the way home to ZZZ; I saw aircraft Y on my gtn navigation screen coming at me southbound at same altitude from right to left. I dived down in time to go under aircraft Y by about 500 feet and directly above my aircraft. A traffic alert on my gtn was given just before doing so. I doubt that aircraft Y's pilot observed my aircraft because it did not deviate at all. The lack of a transponder output by my aircraft may have prevented any presentation on aircraft Y's ads-B display; the aircraft Y's pilot may have been expecting one from any other aircraft within the mode C veil.I recommend that the transponder window on the GTN750 should have a bright red alert flashing icon when the transponder is inoperative. There is nothing noticeable currently other than the small abbreviation for standby. I should have included that window in my scan after takeoff.

Google
 

Original NASA ASRS Text

Title: AA5 pilot reported an NMAC with a light twin at 7;000 feet in the vicinity of ZZZ; citing the failure of his transponder as possibly contributing.

Narrative: On a VFR flight to ZZZ I received a message on my Garmin GTN750 that the transponder was not operative; but then only after I had pressed the MSGS button about 15 minutes into the trip. (Normally the transponder turns on automatically with the master avionics switch that turns on the GTN 750 and all other avionics. Then the remote transponder switches from Standby to Mode C operation when exceeding a certain speed on takeoff.) Upon discovering this; I tried to recycle the GTX345-R transponder several times; but it would not turn on. I made a U-turn back to ZZZ airport due to the faulty equipment. I was flying part of the time within the Mode C veil around ZZZ1. I was under Class B airspace and not within it. On the way home to ZZZ; I saw Aircraft Y on my GTN navigation screen coming at me southbound at same altitude from right to left. I dived down in time to go under Aircraft Y by about 500 feet and directly above my aircraft. A traffic alert on my GTN was given just before doing so. I doubt that Aircraft Y's pilot observed my aircraft because it did not deviate at all. The lack of a transponder output by my aircraft may have prevented any presentation on Aircraft Y's ADS-B display; the Aircraft Y's pilot may have been expecting one from any other aircraft within the Mode C veil.I recommend that the transponder window on the GTN750 should have a bright red alert flashing icon when the transponder is inoperative. There is nothing noticeable currently other than the small abbreviation for Standby. I should have included that window in my scan after takeoff.

Data retrieved from NASA's ASRS site 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.