At first I thought it was as simple as finding the right wavelength receiver, but now I understand the photodiode detect a range of wavelengths and the receiver's have filters so they only work when it get that frequency. I have all my other projects with ir sorted, but I have 2 more I am wanting to work out.
1st, I have some old laser tag guns and would like to test to see what frequency they put out, what would I need to look for in a photodiode to make sure it can see the full signal?
Would the basic atmega328 be able to read the signal fast enough to tell me if it's 10khz 30khz etc..
If not what would I need to research to understand the capture speed of the MC?
The other project is basically like the first, but would need an op amp I want to build a ir remote extender but, need to find the the frequency first so the question above sorts that out.
Its not clear from your question whether you want to ascertain the frequency of the LIGHT or the frequency of the carrier signal.
Photodiodes are used in fiber optic communication and can easily handle signals in the hundreds of MHz.
You cant measure frequencies in tens of kHz with an arduino, and would probably be best advised to use a frequency to voltage converter as described here
That's great will give it a read. (*Edit that is pure gold. I was concerned with my lack of an oscilloscope and the max samples I could get from an diy dso from an atmega32u4 or 328 was very low. Need to read more but that may have me covered I think.)
In short I want to be able to use existing store bought laser tag guns with homemade projects. I need to be able to detect the signal it puts out so I can buy the correct sensor.
I believe that this is the same thing I want to do with my ir extender project. Be able to detect the signal from a remote so I can then buy correct sensors to build with.
An Arduino won't do analogRead() fast enough to capture the modulated waveform from an IR device, but it will do digitalRead() fast enough. Thus you could buy or build a photodiode or phototransistor circuit with a comparator to get a digital output of the IR signal.
Then you could put together a sketch to measure the interval between "On" and "Off" for the IR transmitter, buffer these up, and send to the serial port when the buffer fills. Alternately, there are very inexpensive USB logic analyzers available that are very handy for this sort of reverse engineering work.
Here, for instance is the "on" button waveform of a TV remote I had at hand, captured with a photodiode module and logic analyzer similar to those linked above. This capture was made using the open source sigrok/pulseview package.
johnerrington:
You cant measure frequencies in tens of kHz with an arduino,
Nonsense. That's not a particularly high frequency signal for an Arduino to count. Even SoftwareSerial can do 57600 bps.
I routinely count frequencies of ~300 kHz, and have done signals of a few MHz on a 16 MHz Arduino.
If you have no clue at all, try to measure the carrier wave frequency. It's probably 38 or 40 kHz or thereabouts, that are standard carrier frequencies used by IR remote controls and I would expect that your laser tag device uses one of those. When you have that frequency, get the matching TSOP sensor that can decode the signal for you.
johnerrington:
Photodiodes are used in fiber optic communication and can easily handle signals in the hundreds of MHz.
Ultra-fast comms photodiodes are exotic and probably expensive. Standard silicon photodiodes are not
normally this fast.
But if you're only looking to perform upto 100's of kHz to MHz, the standard reverse-biased transconductance
amplifier approach is the best for generic photo-diodes. The opamp will need to be fast (such as a video opamp).
I have no idea what your laser tag gun is or how it works.
However, what is known as "customer IR" uses light with wave length 940-950 nm. (IRDA devices use 890 nm.) Receivers for these devices are typically rather forgiving, for example 850-1050nm.
So I shall assume that you want to measure the modulation frequency, typically 36-40kHz, sometimes 56kHz, in some cases (old Bang & Olufsen) 455kHz.
For this (not 455kHz though), I recommend a dedicated "learner receiver" like the TSMP58000 or similar. (You local component dealer does not stock it; mouser.com is a reliable source.) The experiments I made with photo diodes indicated a very low sensitiviry, i.e. a very short range, only in the mm range, but they are definitely fast enough. A photo transistor however is more sensitive, but I suspect it is not fast enough; have not tried it though.
Here is a project using it. It can reliably measure the carrier of "normal" IR signals. Suitable software is Infrared4Arduino, available in the Arduino library manager with the name "Infrared", possibly together with AGirs (also available in the library manager).
Bad advice. These are demodulating receivers. "Demodulating" means that they remove the carrier signal. But they are good for their intended purpose...
bengtmartensson:
Bad advice. These are demodulating receivers. "Demodulating" means that they remove the carrier signal. But they are good for their intended purpose...
Which, in I estimate at least 99% of the situations, is exactly what you want to do. Also with a laser tag game - the moment OP knows the carrier frequency, they will have to demodulate it to get to the relevant part of the transmission: information such as a transmitter ID.