The problem is causing the idle speed to drop to 500 rpm, it should idle at 750rpm normally.
So what could that be? Have you checked all the intake hoses, could be a collapsed hose restricting air flow, or the air filter even.
After that you are looking at electrical gremlins which are harder to diagnose/fix.