C172 flight instructor and student reported during climb the airplane began to shake and run rough; and they could smell electrical smoke. Flight crew diverted to a nearby airport and landed safely. Reportedly; a magneto was causing the problems.
Synopsis
C172 flight instructor and student reported during climb the airplane began to shake and run rough; and they could smell electrical smoke. Flight crew diverted to a nearby airport and landed safely. Reportedly; a magneto was causing the problems.
Narrative
After completing a checkride at ZZZ. Myself and my instructor were flying back to our home airport of ZZZ1. We did our runup on the ground and saw no issues with any systems. RPMs; magnetos; oil; fuel; and electrical looked good.We took off and turned on course. Upon reaching 4500; my instructor noticed some sort of burning smell and I noticed engine roughness and a drop in RPM. He asked me if I smelled what he did and I said that I did. The plane was visibly shaking from something inside the engine. We kept climbing up to 6000 while trying to decide what we should do.We decided that continuing 100 miles to ZZZ1 was not the safest choice and that we should divert somewhere close by. We considered ZZZ2 as we know they have maintenance and a way to get back home. However; between discussion with myself and my instructor we decided whatever the issue was; it was better to land as soon as possible. ZZZ2 was still 30 miles away from us; but there was an airport ZZZ3 that was only 7 miles away.Since we knew that the issue was with the engine and that it could fail at any time; we squawked 7700 and did our diversion to ZZZ3. We circled over the field to lose altitude before landing on Runway XX.Upon reaching the ramp; we checked the magnetos and that's when we saw the right magneto was causing all our issues. It was causing the entire plane to shake and ran the engine really rough. We tried to see if was a lead buildup; but after trying to burn it off; it did not get any better. We taxied into a tie-down spot and shut down the engine. After a little bit; we saw 2 helicopters flying out to the general area we were in; and 2 local officials arrived at the airport to make sure we were safe.Conclusion:Student and Instructor noticed the issue at the same time and had plenty of altitude and power to divert to an airport. The squawk of 7700 was for the general situation we were in; if anything had gotten worse (i.e. complete engine failure). Everything was done by the book and everyone remained safe throughout this entire situation. Our quick thinking to divert to the closest airport was the best decision we made. Landed on the ground with no issues - as we conveyed to the officers when they came to check that we were OK.
Second reporter narrative
At approximately XA:55 I; along with my students; Student A and Student B; were taking off from airport ZZZ on our way to ZZZ1. Student A took off from Runway XX and made a left turn towards the southeast on our way to ZZZ1. At about 3500 feet MSL; we engaged the autopilot to climb at 80 knots up to 7500 feet. At about 4000 feet; I realized the engine started losing RPM. A few moments later; we felt the airplane starting to shake. I immediately disengaged the autopilot and hand flew the airplane up to about 5500. After a while; the smell of an electrical smoke could be smelled in the cockpit. I immediately turned towards ZZZ2 airport with the intent to [request priority handling]. Student A set up all the frequencies and got the ATIS for ZZZ2. We were approximately 20 miles southwest of the airport. Soon after we started to lose RPM really bad and I was prepared for the engine to quit. We decided that we could not make ZZZ2 but ZZZ3 was 8 miles in front of us. I told my student to squawk 7700 and I flew the plane to ZZZ3 circled the airport to lose altitude and landed safely on Runway XY.
NASA callback
The reporter learned during the post flight maintenance inspection the right magneto lost its proper timing causing two spark plugs to fail. The reporter had no further information to share.
Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.