Skyhawk 172/Cutlass 172
Flight Crew Commercial; Flight Crew Flight Instructor; Flight Crew Instrument
Flight Crew Last 90 Days 200; Flight Crew Total 975; Flight Crew Type 880
Troubleshooting
Aircraft Equipment Problem Critical; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Published Material / Policy; Inflight Event / Encounter Weather / Turbulence
Air Traffic Control Issued Advisory / Alert; Air Traffic Control Provided Assistance; Flight Crew Landed in Emergency Condition; General Maintenance Action
Aircraft
Left ZZZ at XA10 with a private student to go practice landings in ZZZ1 with three hours of fuel. Left ZZZ1 to go back to ZZZ at XB30 when the field went IFR which was not predicted to happen in the TAF. Was then vectored out very far due to heavy inbound traffic advised ATC due to engine roughness while in IMC conditions and getting vectored. Was then cleared direct ZZZ via the ILS XXL. Transponder was reporting 300 ft. off which then was given low altitude alerts from ATC while shooting the ILS XXL. Then went full scale deflection while trying to fix the transponder and engine roughness during the approach. Was then offered to go to ZZZ which was reporting VFR; was not VFR by the time of arrival. Was then offered to go to ZZZ2 which was reporting VFR. Landed with 30 minutes of fuel.
C172 Flight Instructor reported engine roughness while IFR with malfunctioning transponder; resulted in a divert to a VFR airport.