Take it to Autozone and tell them your check engine light is on and they will diagnose it for free just so they can sell you the part(s). The way you explained the light going on and off , it sounds like the EGR valve... and most of the time you can just clean this part and if it is the EGR get...