How do I sense this with an arduino uno?
-theory
-which pins are needed
The receivers typically have +5V, GND and signal out (check the pinout as it varies for different models from the same suppliers)
In theory, you just need to connect the signal out to an interrupt pin on the Arduino (2 or 3 = INT0 or INT1 on Atmega328x Arduinos) and you should get a standard square wave 1kHz signal if you write the appropriate coded & Interrupt handler. If you are not comfortable with Interrupts you should be able to poll any pin - at that frequency(500Hz).
Just noticed 1ms on & 1ms off = 500Hz not 1kHz.
Caveat: some IR receivers cannot handle a continuous signal and turn off. You need to check the data sheet for your IR receiver.
Either of these should work fine: TSSP4038 TSSP58038 from Vishay (they run at 5V or 3.3V)
I think it will be easier with 2 sensors, facing in different directions about 30 degrees apart. With a single sensor, if the emitter moves and the sensor loses the signal, you can't tell which way to turn. With two sensors, one of the signals will be lost before the other one, and from which one loses the signal first, you can tell which way the servo needs to turn.
Yeah I am thinking about two or even three sensors.
Right now I am using one and the way I check if the signal is there or not that I measure the frequency with the arduino. So if I have a 500Hz signal then fond the direction.
What is the method usually used to check if the signal is there or not?
augre:
What is the method usually used to check if the signal is there or not?
Based on what I think you are trying to do - write an interrupt function (search for examples of attachinterrupt) and measure the the time it takes for the signal to change. If you get a time of 1ms then you are 'locked' on. (within the angle of the IR receiver which can be quite large, so read the data sheet of your sensor).
It is unlikely that this will work well with only one sensor(IR Receiver)
Those receivers often have a wide acceptance angle, so it might be a good idea to fit barn-door style baffles, or put them at the bottom of a short tube, so that the only way they can both "see" the source is in the straight ahead position.