in my project i need to check whether the diesel engine is moving or not?.is there any sensor that could detect the shaft of the engine is moving or not?
a mic (or piezo) can detect an engine running. If it makes noise.. 'something' is moving inside.
Google tells me that some alternators have connections for a tach so check if yours has one.
Else perhaps a magnet on something you can see turning- alternator, water pump pulley?- and a Hall sensor?
Try a voltage output from an alternator winding before the high side rectifier stack. Use a single diode and look for positive pulses. The frequency is related to engine RPM through the pulley ratio.
can hall effect sensors be used?
Yes. (or no) U'll need to attach a magnet (or two for balance) to the rotating part. This can be difficult if the shaft is fast_rotating
You can use one of several different types of proximity sensors if you have an obvious disruption on the surface of a rotating part. A notch or hole in the crankshaft front dampener pulley would work.