sir, do you think i can use any ir sensor for the IR receiver ?A\wild guess would be its an automated car park gate station, where you type a code in and the stepper motor opens the gate, the sensors are to find out the position of the vehicle, possibly to make sure the vehicle isnt in the way of the gate before it moves.
THANKS! this was very helpful, btw, i have another question,. When i connect the ir receiver to the microcontroller, how do i program it? is a simple on off state do the job, or is there another code that is needed to be used? I am using PIC16f77a by the way.Depends on the range, for a meter or so you could use an infra red led and something like a bpw 41 pin diode, however if you want longer range then I'd be inclined to use a tv type remote control infra red receiver and for the transmitter an infra red led connected to a 40khz source such as a 555 circuit or direct from a microcontroller.
Heres an interesting circuit, in the receiver you wouldnt need the 555 or the 4017, you could connect the o/p of the infra red receiver direct to a micrcontroller.