This is my first post here. I don't own an Arduino yet as I'm trying to determine if any of the models are capable of performing what I hope to accomplish.
I have two devices that communication via IR (toys). You set one toy to perform a SEND action and the other to perform a RECEIVE action. Once set, the toys go into some sort of IR detection mode to negotiate with each other, perform a short communication then terminate the communication. In all this process lasts about 5-7 seconds.
I'm hoping capture the IR signals from one of the devices during a communication. Then examine those decoded signals to determine how to simulate IR signals with an arduino.
The Goal: Use an Arduino to SEND IR signals to a RECEIVING toy.
While researching Arduinos and IR decoding it seems most of the existing libraries/programs are for slowly decoding TV remotes one button push at a time. I have concerns that these types of scripts would not be able to keep up with recording a longer stream of IR signals between two toys that are communicating.
Any advice? Is Arduino w/ a IR receiver & LED capable with the right application?
An Arduino can do the job as well as any other controller. IR communication uses a certain wavelength, a (fix/variable?) carrier frequency, an encoding for the transmitted items, and a set of messages. It's up to you to figure out these parameters, or to find somebody who succeeded already.
I would start with the IRremote library (available through Sketch->Include Library->Manage Libraries...). You can use the File->Examples->IRremote->IRrecvDumpV2 example to see if the signal looks like a known IR protocol. You can look at the RAW data to see the nature of the signal. There will typically be two or three lengths of pulses. Remember that the library measures at 50-microsecond intervals so any pulse lengths that are within 50 microseconds of each other are probably the same length.
Show us the RAW data and maybe someone will recognize the encoding scheme: RZ, NRZ, NRZI, Manchester, etc.
Especially thanks Johnwasser! I need an Arduino anyway, so I'm going to get one ordered this evening along with the components I need for the IR capture. Assuming I can get the data collected I'll reach out back here if I can't figure anything out from the raw data to see if anyone has any ideas.
As for the type of toy, they are Tamagotchis and while someone has decoded the IR of a couple different types of tamagotchis they've not tackled this particular model. So far it seems all of them are slightly different in their IR protocols and communications (the latest models starting at a very fast speed).
Thankfully I'm using some older models of Tamagotchi so hopefully it won't be too difficult to at least capture raw data. I'll keep this thread updated in the next week or two when it all arrives and I've tinkered.
IR signals have a carrier wave to modulate the data. The first is usually 38 kHz or thereabouts, the protocol itself is a bit stream.
If you know the modulation frequency (if you don't you would be able to measure that quite easily with an IR photodiode or phototransistor connected to an Arduino) you can probably use a TSOP type receiver to produce you the zeros and ones of the signal. An Arduino can indeed easily read these bits and dump them to a Serial output or so. You will then have to (manually) figure out how the protocol is put together. You'll be able to find lots of example codes on how to receive and decode signals.
if your starting point would have to be the actual waveform, I'm afraid an Arduino is out due to the large amount of information you'd have to store as you sample the signal.