Erratic speedometer

What might cause the speedometer needle to fluctuate erratically, sometimes indicating 0 even when the car is moving, sometimes bouncing around? The check engine light is on, and before I take it to a mechanic I’d like to get some possible causes. I have a 2000 Dodge Caravan with about 45,000 miles.

A faulty Vehicle Speed Sensor (VSS) could make the speedometer jump around. This may or may not be related to the Check Engine Light.