I have tried this way to construct a circuit, but the ir sensor didn't show any result in my arduino mega.......... I had tried 3 pair IR components already but failed to show any voltage difference........ then i tried to use LDR and LED to replace IR pair, it works http://tutorial.cytron.com.my/2012/09/07/how-to-use-ir-sensor/
the polarity of the receiver need to be observed. the shorter leg or the cathode need to be connect to positive and vice versa. the receiver need to be reverse biased.