I am designing a line following sensor and for this project i am confused between using an infrared diode reciever or an infra red transistor. I dont know the difference between them(as for a long time i thought they where the same). Please I need a full explanation about how they work and how they are used. And which one is better for a line follower. And if there is a specific model please tell me. Any help is appreciated! Thanks in advance.
You can think of a phototransistor as a photodiode integrated with a transistor. The diode does the detection and allows reverse current thru it when illuminated, and the transistor amplifies this current. In reality is it actually more like one device, but that doesn't really matter to the circuit design.
Both a phototransistor and a photodiode are used to permit some current thru them when illuminated. The phototransistor has more gain, hence more current for the same illumination. However, it is usually slower. This should not be a issue for a line follower robot. It can matter with a fast communication protocol.
A photodiode can also be operated in "forward" or "photocell" mode. The diode is usually shorted, and it produces a small current proportional to the light intensity. This can be convenient in some circumstances. I've designed photodiode circuits both ways.
For a line following robot, my first reaction is to use a phototransistor.
The photo-diode is a PN junction just like a normal diode. In your case you are talking about IR diode, so whenever the diode is exposed do IR light it acts like a normal diode ( if voltage at anode is higher than in kathode the diode lets current through, other wise it doesn't let the current pass). When it isn't exposed to IR light it doesn't let current pass in both cases ( even if anode voltage is higher than kathode).
The photo-transistor acts the same way except it is a transistor, so it has gain. The more the light hits the gate the more the current flows from source to drain. If no IR light hits the gate the transistor doesn't let current flow.
P.S: this is not a full explanation, but it's a start, I guess ^^