hi,
>> i want to calculate speed and direction of rotating disk colored by black and white,what type of sensor i have to use
Use a reflective IR sensor pair module, TX and RX in one small plastic housing.
There are versions available that give a TTL level ouput.
[Black/White == Dark/Light == Low/High signal]
>> and how can i calculate the speed of the rotating disk
By knowing the distance from the centre of the disk to the point where the detector is located. Circ= 2 * pi * R. you can work out the linear speed.
For the rpm of the disk you count the Light/Dark transistions of the detector over a known time, say 60secs.
>> and direction??
The easiest way is you have a second IR detector pair 90deg [quadrature] from the first detector, from the two detectors you work out the direction.
A PIC would be my first choice for this application.