The Arduino can be used to transmit the 1200 Hz signal with 38 KHz carrier required, using any of the several Arduino IR libraries out there. One such is described in A Multi-Protocol Infrared Remote Library for the Arduino.
Use the raw send mode of this library, which takes duration of on and off ("mark" and "space") in microseconds. Specify a sequence of equal mark and space duration, for the desired 600 to 1200 Hertz signals: That would be between 417 and 833 microseconds of mark and of space.
If you want it to be close to 1200 Hz the 417 number applies.
Regarding the matter of having both a carrier frequency and a code frequency: Typically, implementation of such sensors uses "TV remote sensor" IR receivers designed for a specific carrier frequency, such as the Vishay TSOP and TSSP integrated IR sensor modules, e.g. TSOP1738.
This part detects IR signals coming at it with a carrier frequency of 38 KHz, and ignores all baseline (no carrier) IR signals or with carriers of significantly higher or lower frequency. This means stray IR such as from heat sources or daylight, or signals from a remote control other than the one of interest, will be ignored.
Similar modules are available for other carrier frequencies as well:
The output of this part is low when a 38 KHz signal is present, high when it is not (inverted logic), and this resultant pulse stream is typically used to carry a remote control protocol.
Some examples are the Phillips RC-5 protocol (which originally was designated for 36 KHz carrier, not 38 KHz) or the Sony InfraRed Control protocol (SIrC) used in many TVs and other consumer devices.
The sensor in the question most likely uses a device like the TSOP1738 or its smaller SMD equivalents, for its ubiquitousness and low cost. It tests the output of the part for a pulse rising (or falling) edge at 600 to 1200 times per second, to identify the source as a designated one, and acts upon it if such is found.
A signal processing way of looking at this is:
- Pass incoming infrared through a colored plastic filter that passes only Infrared, not visible light.
- Use a photodiode or similar to convert this incident IR light to electrical signal.
- Pass the resultant signal through a very narrow band-pass filter of 38 KHz, thus ignoring any signal with a different carrier frequency
- Integrate the resultant output, i.e. peak-detect it
- Pass this resultant signal through another not-so-narrow band-pass filter of 600 to 1200 hertz, thus ignoring any signals that do not fall within this range
- If a resultant signal is found by integrating this output, then indicate a "success" condition
For further understanding perhaps my other answer here may be useful, it includes a detailed analogy for the working of such IR devices.
Best Answer
If you salvage an IR receiver from existing equipment, make sure you determine what the pinout is. They have 3 pins, and all permutations of ground, power and output seem to exist. Instead of guessing you might want to buy a receiver of a known type so you can find a datasheet, they should be < $1. My favourite yellybean is tsop34838, but the US seems to prefer other types.
Also make sure you know the operating voltage. 5V types won't work well belove 4.5V or so. I don't know whether 3.3V-only types exist, 3-5V types do exist (I prefer those).
The output of such receivers is an open-collector, the types I know have a weak internal pullup.
If you connect the receiver correctly and put a LED + 100 Ohm resistor (LED in the correct direction) from power to output, you should get the LED to light light up when you point a suitable IR source at the receiver.
Note that the above pinout is for a receiver I happen to use, yours may or may not be the same.