This Mazda had several problems, most of which were caused by previous work done to vehicle by others. The P0300 code is for random general misfires, P0304 is also for a misfire but is specific to cylinder #4 and P0401 is for insufficient EGR flow. I started with the easiest code which is the EGR code. The first step was to confirm that the EGR Valve was good. With the engine running, apply vacuum to the EGR vacuum port and see if the engine stalls or nearly stalls. It should. The EGR valve is the round object on the left hand side of the picture with the vacuum hose elbow on top. The engine did stall so that confirms that the EGR Valve will open and the ports are not restricted. If the valve had moved and held vacuum but not stalled or nearly stalled it would have indicated that the EGR ports were restricted and would have to be cleaned out. If the valve did not hold vacuum it would have indicated the valve itself was faulty. Not all valves operate in this manner so please follow guidelines for the vehicle on which you will be repairing. Some of the EGR Valves actually bleed off vacuum until sufficient back pressure is present in the exhaust. However in this case the valve was good and data on my scan tool indicated that the DPFE sensor reading was fixed. I disconnected the sensor leads and made sure there was a voltage change to near 5 volts and I jumped the signal wire to sensor ground wire to make sure the voltage went down to near 0 Volts in the data stream. This test can only be done if you have a scan tool that reads data and if you have access to wiring diagrams. The testing showed that the computer and wiring were okay. Diagnosis and replacement of faulty DPFE sensor. Later test driving confirmed the repair with voltage switching between .5 and 3 volts under fairly normal driving conditions. The DPFE sensor or Delta Pressure Feedback Exhaust Sensor is in the middle of the picture. One wiring harness and two rubber (actually high temp silicone) hoses attached. Most of you will notice that it looks like a Ford. That is because Mazda and Ford both use the same engine and controls on some of their models.
Way too many EGR valves are being replaced when the actual problem is a faulty DPFE sensor or restricted EGR ports. A little testing can save a lot of time and money.
I will get back to the misfire codes in another post.