Narrative:

About 50 minutes after taking off for a single-pilot night IFR flight; my aircraft lost all electrical power. After some unsuccessful attempts to resolve the problem; I attempted to re-energize the transponder to at least briefly squawk an emergency code and to contact ATC via a handheld navcom device. The success of either action remained unknown. If I would have continued my flight to its original destination in accordance with far 91.185 I would have had to fly my aircraft into the busy airspace of a commercial airport not just without communication but also without transponder; anti-collision lights; and landing lights. My aircraft would have been invisible to any TCAS of any larger aircraft operating in that airspace while ATC would have seen the flight as a passive target with unknown altitude.furthermore I had only handheld devices with limited battery life left available for navigation; so I decided to treat the situation not just as a loss of communication but as an emergency.I made another attempt to contact ATC using the handheld navcom; declaring an emergency and stating my situation and intentions. I received no readable response from ATC or otherwise. Upon reaching VFR conditions; I landed without further issues at a nearby non-towered airport thus deviating from my clearance.

Google
 

Original NASA ASRS Text

Title: A PA28 pilot on a night IFR flight suffered the loss of all electrical and; thus; communications and navigation capability. Rather than proceeding to his destination using lost comm procedures he opted to take emergency measures and diverted to a VFR airport for a safe landing.

Narrative: About 50 minutes after taking off for a single-pilot night IFR flight; my aircraft lost all electrical power. After some unsuccessful attempts to resolve the problem; I attempted to re-energize the transponder to at least briefly squawk an emergency code and to contact ATC via a handheld NavCom device. The success of either action remained unknown. If I would have continued my flight to its original destination in accordance with FAR 91.185 I would have had to fly my aircraft into the busy airspace of a commercial airport not just without communication but also without transponder; anti-collision lights; and landing lights. My aircraft would have been invisible to any TCAS of any larger aircraft operating in that airspace while ATC would have seen the flight as a passive target with unknown altitude.Furthermore I had only handheld devices with limited battery life left available for navigation; so I decided to treat the situation not just as a loss of communication but as an emergency.I made another attempt to contact ATC using the handheld NavCom; declaring an emergency and stating my situation and intentions. I received no readable response from ATC or otherwise. Upon reaching VFR conditions; I landed without further issues at a nearby non-towered airport thus deviating from my clearance.

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.