C172 Flight Instructor reported an electrical failure inflight during a cross-country training flight.
Synopsis
C172 Flight Instructor reported an electrical failure inflight during a cross-country training flight.
Narrative
Inbound to ZZZ1 approximately 6 NM southeast ZZZ2; student and I began to hear a beating/knocking sound. A couple of seconds later; the comm/nav units started to blink and then they went out completely along with the transponder and engine indicating system. Observed a slight discharge on the ammeter. Went through the checklist; cycled everything; still no change. My phone was dead but the student's phone was not; so I attempted to call Dispatch but could not hear anything; so I let go of that option.I made the choice to land at ZZZ because I was unsure about the volume of traffic at ZZZ1 and did not want to enter a potentially high traffic area without comms. I descended and circled outside of ZZZ's airspace in order to determine traffic. Did not observe traffic around airport or in approach path; so I proceeded to enter a final for Runway XX based on prevailing winds for the day. I watched for light gun signals to no avail. I rocked my wings in order to try to get the attention of the ATCer. I observed traffic about 2 miles ahead turning downwind to base; so I did a right 360 to enter final again. After verifying traffic in sight; I continued to the runway; continuing to observe the area. Landed and taxied off at [Taxiway] XX and sat. Waited a couple of minutes; and we got a light gun signal to taxi. Parked in front of [the] FBO. Going across Runway XY bump into ramp; electrical system re-upped [and] low voltage light illuminated; but ammeter showed positive charge. Shut aircraft down.I was unsure about the cause of the event. After discussing it with my Chief Flight Instructor; he indicated that it may have resulted from a possible master contactor issue. I contacted ZZZ Tower today; and asked for feedback on the event. Was told everything was done correctly. I am considering multiple solutions to mitigate a situation like this in the future. These include purchasing a handheld radio; ensuring that I have the numbers of all towers expected in use when going on cross-countries; ensuring I carry an external power bank for my phone and other electronics on every cross-country; etc. I monitor instruments during flights with an instrument scan; but I need to make my scan even more comprehensive and avoid the error of omission. I should have included the ammeter in my scan; as it likely indicated that an electrical failure was imminent. ZZZ3 or another non-towered airport may have also been a better option for a landing airport. I chose ZZZ because I did not know how busy the traffic would be at ZZZ1 as it typically is; and because I was more familiar with the resources there [at] ZZZ than at ZZZ3. Other recommendations are welcome.
Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.