PA-28 Cherokee/Archer/Dakota/Pillan/Warrior
Flight Crew Commercial; Flight Crew Instrument
Flight Crew Last 90 Days 60; Flight Crew Total 570; Flight Crew Type 450
Aircraft Equipment Problem Critical; Flight Deck / Cabin / Aircraft Event Smoke / Fire / Fumes / Odor
Air Traffic Control Issued New Clearance; Air Traffic Control Provided Assistance; Flight Crew Landed in Emergency Condition; Flight Crew Diverted; Flight Crew Landed As Precaution; Flight Crew Requested ATC Assistance / Clarification
Aircraft
Shortly after switching to ZZZ Approach while in cruise at 4;500 feet; smoke began to spill out into the cockpit from behind the panel in the region of the fuel tank level indicators and the fuel pressure gauge.  I immediately began to assess the situation and had not just done anything that may have triggered this event to start.  I started flipping the light circuits off in the plane but the smoke continued.  I keyed the mike with ZZZ Approach and stated there was smoke in the cockpit; and requested nearest airport for [expedited] landing.  ATC notified me that nearest airport was approximately 10 miles at roughly 10 o'clock.  I made the turn in that general direction; requested a vector and was given the vector immediately.  I told them it appeared to be electrical.  The smoke was still coming out from behind the panel and I had run out of switches to de-energize with the exception of the avionics master and the master switch.  I told ATC that I was going to turn off the master to let them know my transponder and radios were going dark; they gave me a final vector and distance to ZZZ and I de-energized the master switch.  Upon turning off the master; the smoke stopped and there was no further smoke or fire indication in the cockpit.  I had a handheld radio with me and was able to use the hand-held to communicate on the CTAF frequency where the FBO attendant was able to communicate that the field was currently devoid of traffic and he also volunteered to call services if we needed them.  We let the attendant know that we currently had the situation under control; but were going to be coming in for the landing.  Upon landing; we disembarked the aircraft and called [ATC] and informed them of my name; tail number; phone number; and that we were on the ground safely.  The aircraft is still currently waiting the maintenance shop on the field to reopen on Date to examine the plane and hopefully resolve the issue.
PA-28 pilot reported safely diverting to an alternate airport after experiencing smoke in the cockpit related to an electrical system issue.